Commit graph

99 commits

Author SHA1 Message Date
Thomas Ricouard e3180a37e8 Add basic search on timeline 2023-12-25 18:01:25 +01:00
Thomas Ricouard 5a2478c791
VisionOS native support (#1758)
* Initial support

* UI Adjustments

* WIP icons

* More UI
2023-12-19 09:51:20 +01:00
Thomas Ricouard 8ff3e22d9f SwiftFormat 2023-12-18 08:22:59 +01:00
Thomas Ricouard 8d7b6f382e Fixes & optimizations 2023-12-13 12:37:07 +01:00
Thomas Ricouard 232e031559 Add charts for tags 2023-12-13 09:05:30 +01:00
Thomas Ricouard fcaf48ce53 foregroundColor -> foregroundStyle 2023-12-04 15:49:44 +01:00
Thomas Ricouard 76219f553b Add tag status indicator for home timeline 2023-12-04 09:52:18 +01:00
Théo Arrouye 4266ac4b42
Improve SoundEffectManager & HapticManager (#1662)
* Remove unnecessary vars and switches

* Improve SoundEffectManager call-site API

* Improve HapticManager call-site API
2023-11-07 11:22:36 +01:00
Thomas Ricouard 3e3c69c41c format 2023-11-01 18:58:44 +01:00
Thomas Ricouard 1275b09f20 Add / Remove tag from tag groups from timeline view 2023-10-05 09:47:51 +02:00
Bosco Ho 1bf4d9e398
Feature: Tab bar scroll to top (#1598)
* - *WIP* Explore tab: Tap on tab to scroll to top.

* - Explore tab: Tap tab to scroll to top.

* - Explore: Tap tab again to focus on search bar.
- Explore: Set `.defaultMinListRowHeight` so scroll to view doesn't occupy more than 1pt height in grouped style list.
- Explore: Add padding to get Explore list view to look the same.

* - Explore: Minor adjust to padding.

* - Messages: Add tap tab to scroll to top.

* - Notifications: Add tap tab to scroll to top.

* - Profile: Add tap tab to scroll to top.

* Add `ScrollToView` that can be used across all views.

* Move scroll-to-top constants to ScrollToView.

* Format

---------

Co-authored-by: Thomas Ricouard <ricouard77@gmail.com>
2023-10-05 08:22:45 +02:00
Paul Schuetz 0b5e764556
Automatically remove spaces in server names (#1600)
* Automatically remove spaces in server names

If a server name includes a space (which can happen if the string is pasted /
autocompleted), this space is removed, which results in the app not crashing.
Fixes #1599

Signed-off-by: Paul Schuetz <pa.schuetz@web.de>

* Format

---------

Signed-off-by: Paul Schuetz <pa.schuetz@web.de>
Co-authored-by: Thomas Ricouard <ricouard77@gmail.com>
2023-10-01 09:37:09 +02:00
Thomas Ricouard 4870b202d6 Migrate TagGroup to SwiftData 2023-09-22 19:33:53 +02:00
Thomas Ricouard f9c0355f1d Convert Theme to Observable 2023-09-18 21:03:52 +02:00
Thomas Ricouard 4189a59cf6
iOS 17+ only support + migrating to Observation framework (#1571)
* Initial iOS 17 + Observable migration

* More Observation

* More observation

* Checkpoint

* Checkpoint

* Bump version to 1.8.0

* SwiftFormat

* Fix home timeline switch on login

* Fix sidebar routerPath

* Fixes on detail view

* Remove print changes

* Simply detail view

* More opt

* Migrate DisplaySettingsLocalValues

* Better post detail transition

* Status detail animation finally right

* Cleanup
2023-09-18 07:01:23 +02:00
Thomas Ricouard 8a3c971402 Swiftformat 2023-09-16 14:15:03 +02:00
Thomas Ricouard 4280764733 Edit tag groups 2023-08-04 12:40:21 +02:00
Thomas Ricouard bb4453c811 Scrollable + interactive Tag Group timeline header 2023-07-19 08:30:47 +02:00
Thomas Ricouard a2fe0511e0 Run swiftformat 2023-07-19 07:46:25 +02:00
Alejandro Martínez 5951bcec38
Tag groups (#1506)
* Implemented tag groups

* Cleanup

---------

Co-authored-by: Thomas Ricouard <ricouard77@gmail.com>
2023-07-19 07:44:35 +02:00
Thomas Ricouard 4a6f81f22e Fix Introspect warning 2023-07-18 13:58:00 +02:00
Thomas Ricouard 185f4b60e2 Update package + Switch to SwiftUIIntrospect for the Timeline 2023-07-18 09:45:39 +02:00
Thomas Ricouard 9897307c79 Better safeguard around timeline refresh 2023-04-09 15:11:02 +02:00
Chris Kolbu 9e347c75b9
Timeline & Timeline detail accessibility uplift (#1323)
* Improve accessibility of StatusPollView

Previously, this view did not provide the proper context to indicate that it represented a poll.

Now, we’ve added
- A container that will stay “Active poll” or “Poll results” when the cursor first hits one of the options;
- A prefix to say “Option X of Y” before each option;
- A Selected trait on the selected option(s), if present
- Consolidating and adding an `.updatesFrequently` trait to the footer view with the countdown.

* Add poll description in StatusRowView combinedAccessibilityLabel

This largely duplicates the logic in `StatusPollView`.

* Improve accessibility of media attachments

Previously, the media attachments without alt text would not show up in the consolidated `StatusRowView`, nor would they be meaningfully explained on the status detail screen.

Now, they are presented with their attachment type.

* Change accessibilityRepresentation of AppAcountsSelectorView

* Change Notifications tab title view accessibility representation to Menu

Previously it would present as a button

* Hide layout `Rectangle`s from accessibility

* Consolidate `StatusRowDetailView` accessibility representation

* Improve readability of Poll accessibility label

* Ensure poll options don’t present as interactive when the poll is finished

* Improve accessibility of StatusRowCardView

Previously, it would present as four separate elements, including an image without a description, all interactive, none with an interactive trait.

Now, it presents as a single element with the `.link` trait

* Improve accessibility of StatusRowHeaderView

Previously, it had no traits and no actions except inherited ones.

Now it presents as a button, triggering its primary action.

It also has custom actions corresponding to its context menu

* Avoid applying the StatusRowView custom actions to every view when contained

* Provide context for the application name

* Add pauses to StatusRowView combinedAccessibilityLabel

* Hide `TimelineView.scrollToTopView` from accessibility

* Set appropriate font style on Notification header

After the change the Text needed a `.headline` style to match the prior appearance.

* Fix bug in accessibilityRepresentation of TimelineView nav bar title

Previously, it would not display the proper label for .remoteLocal filter options.

* Ensure that pop-up button nav bar titles are interactive

* Ensure TextView responds to Environment.sizeCategory

This resolves #1309

* Fix button

---------

Co-authored-by: Thomas Ricouard <ricouard77@gmail.com>
2023-03-28 18:48:58 +02:00
Chris Kolbu b2f594f174
Accessibility tweaks + Notifications and Messages tab uplift (#1292)
* Improve StatusRowView accessibility actions

Previously, there was no way to interact with links and hashtags.

Now, these are added to the Actions rotor

* Hide `topPaddingView`s from accessibility

* Fix accessible header rendering in non-filterable TimelineViews

Previously, all navigation title views were assumed to be popup buttons.

Now, we only change the representation for timelines that are filterable.

* Combine tagHeaderView text elements

Previously, these were two separate items

* Prefer shorter Quote action label

* Improve accessibility of StatusEmbeddedView

Previously, this element would be three different ones, and include all the actions on the `StatusRowView` proper. Now, it presents as one element with no actions.

* Add haptics to StatusRowView accessibility actions

* Improve accessibility of ConversationsListRow

This commit adds:
- A combined representation of the component views
- “Unread” as the first part of the label (if this is the case)
- All relevant actions as custom actions
- Reply as magic tap

* Remove StatusRowView accessibilityActions if viewModel.showActions is false

* Hide media attachments from accessibility if the view is not focused

* Combine NotificationRowView accessibility elements; add user actions

Previously, there was no real way to interact with these notifications.

Now, the notifications that show the actions row have the appropriate StatusRowView-derived actions, and new followers notifications have more actions that let you see each user’s profile.

* Prefer @Environment’s `accessibilityEnabled` over `isVoiceOverRunning`

This way we can cater for Voice Control, Full Keyboard Access and Switch Control as well.

---------

Co-authored-by: Thomas Ricouard <ricouard77@gmail.com>
2023-03-24 07:52:29 +01:00
Chris Kolbu eab69ce9fa
Timeline tab accessibility uplift (#1277)
* Refine Profile tab VoiceOver order to prioritise user information

Previously, VoiceOver user would have to traverse through header image, “follows you”, and the profile image before getting to the display name of the user.

Now, this element is the first element after the navigation bar.

* Add accessibility label to Timeline Compose post button

Previously, this button was using the SF symbol fallback label.

Now, it has a localized equivalent in addition to two other options: “New”, and “Create”

* Change accessible representation of Timeline nav bar menu

Previously, this would present as a static text.

Now, it has the header trait. In addition, by changing the representation, VoiceOver will read it out as “Home, Pop-up button, Header”, indicating that it opens a menu.

* Add accessibilityHint to Timeline tab Accounts selector

* Add accessibilityLabel and hint to PendingStatusesObserver

Previously, this button would have a label equal to the count of unread posts. Now, it states “X new posts” with the hint “Scrolls the timeline”
2023-03-20 06:33:42 +01:00
Thomas Ricouard a3e2d3f8b3 Add sound effects 2023-02-28 18:55:08 +01:00
Thomas Ricouard 4bc2672583 Timeline: Fix trending refreshing when navigating back 2023-02-27 18:41:51 +01:00
Thomas Ricouard 83e4e74329 Swiftformat 2023-02-26 06:45:57 +01:00
Thomas Ricouard 93ee83c65d Timeline: Cleanup 2023-02-25 19:47:15 +01:00
Thomas Ricouard 151154b335 Timeline: Enable jump to latest + in place refresh for all other timeline types 2023-02-25 19:32:47 +01:00
Thomas Ricouard b036e90ce4 Simplify Timeline refresh 2023-02-25 10:10:27 +01:00
Thomas Ricouard 1a7ef62fd6 Fix trending refresh 2023-02-19 21:37:22 +01:00
Alex Grebenyuk a8459638e9
Add image prefetch to the timeline + resize close #931 (#930)
* Add image prefectch to the timeline

* Use preview url for post with multiple attachements

* Add image resize

* Prefetch link cards

---------

Co-authored-by: Thomas Ricouard <ricouard77@gmail.com>
2023-02-18 18:44:43 +01:00
Thomas Ricouard d958d10036 Remove Client and RouterPath from StatusRowView env object 2023-02-15 08:46:14 +01:00
Thomas Ricouard eb6050a38f Swiftformat 2023-02-12 16:29:41 +01:00
Sean Goldin 90ec3d419c
Clean up HapticManager (#678)
* Check for haptic capabilities

* Make manager do most of work

* ABC enum

* Fix spelling 😊

* Small tweak
2023-02-06 17:53:27 +01:00
Thomas Ricouard 5f76a8057c Filter remote local timeline 2023-02-06 12:24:48 +01:00
Thomas Ricouard b0630ae9c3 Add more safety to scroll to 2023-02-05 08:13:38 +01:00
Thomas Ricouard 5afd2dc73c Add Jump to Latest to clear out cache and reload home timeline 2023-02-04 21:21:36 +01:00
Thomas Ricouard 65ed2d871c Add settings for haptic feedbacks 2023-02-04 17:38:48 +01:00
Thomas Ricouard 6b285cdbcf Cleanup 2023-02-04 17:17:38 +01:00
Thomas Ricouard 427452db30 Don't update the timeline is the tab is not visible 2023-02-04 16:54:03 +01:00
Thomas Ricouard b57df4a9d7 Scroll to latest pending post on button tap 2023-02-04 14:05:30 +01:00
Thomas Ricouard 4104fdf4f5 Fix the crash once and for all by using Introspect 2023-02-03 16:24:09 +01:00
Thomas Ricouard eb80225bb0 Mitigate #623 2023-02-03 08:06:16 +01:00
Thomas Ricouard bb6910cd83 Centralize haptic feedbacks 2023-02-02 16:56:42 +01:00
Thomas Ricouard 262f7288ad Fix the crash while restoring position? 2023-02-02 16:38:19 +01:00
Thomas Ricouard 4e77669181 Swiftformat 2023-02-01 12:49:59 +01:00
Thomas Ricouard cdf45fa58c Refactor Timeline position management + add thin cache layer + fix crashes 2023-02-01 12:43:11 +01:00