Commit graph

126 commits

Author SHA1 Message Date
Thomas Ricouard 058500f91e Swiftformat . 2024-03-11 09:05:52 +01:00
Thomas Ricouard 9a7e6b7cb0 Various fixes for Xcode 15.3 2024-03-11 08:59:29 +01:00
Thomas Ricouard b56da94a7c Add more sheets to shared + link to filters in timeline top filters 2024-02-21 09:45:29 +01:00
Thomas Ricouard 1f858414d8 format . 2024-02-14 12:48:14 +01:00
Thomas Ricouard 3020d831e4 Various fixes 2024-02-06 19:19:53 +01:00
Thomas Ricouard f67163e4b0 Cleanup print + use OSLog 2024-02-02 18:26:24 +01:00
Thomas Ricouard 709dd79e25 Fix for visionOS + Remove shimmer 2024-01-19 08:51:29 +01:00
Thomas Ricouard b7e8f63e86 Multi window visionOS support 2024-01-09 13:28:57 +01:00
Thomas Ricouard 5d24c4d2e8 Fix #1836 2024-01-08 18:22:44 +01:00
Thomas Ricouard 7eb382c052 Status -> StatusKit 2024-01-06 19:27:26 +01:00
Thomas Ricouard 3229bf0cb5 Timeline: Add indicator when loading new posts 2024-01-04 12:56:46 +01:00
Thomas Ricouard ad4995ad70 Catalyst: Fix mention window 2024-01-03 13:40:53 +01:00
Thomas Ricouard f0061b36ca Account: Show nav bar title for main, followers, following 2024-01-01 17:29:15 +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 fcaf48ce53 foregroundColor -> foregroundStyle 2023-12-04 15:49:44 +01:00
Thomas Ricouard 2e2a9f5f14 Add more lists setttings 2023-11-28 09:18:52 +01:00
Thai D. V ea5480ef46
add account popovers for display name and handle (#1687) 2023-11-27 09:00:52 +01:00
Thai D. V 94172cef27
Feature: popover the account overview when hovering on the avatar (#1682)
* fix avatar scale

* refactor avatar  config data

* add `AvatarView_Previews`

* refactor shape and placeholder of avatar

* refactor `AvatarView` and add `AvatarPopup`

* add `hoverEffect` for iPad

* fix auto-dismiss bug

* fix `showPopup` bug

* disable inappropriate avatar popups
2023-11-20 10:59:49 +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
Chanhwi Joo 1bd9d15a8f
Update Korean localization & localize the user block confirmation dialog (#1616)
* Update Korean localization

* Localize the user block confirmation dialog
2023-10-10 18:49:16 +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
Eric 4bbfdcd256
Feature request: Block user confirmation dialog (#1606)
- Using State property and Binding between ContextMenu and AccountDetailView to show a confirmation dialog when the block button is pressed.

Co-authored-by: Eric Chaing <eric@Erics-MacBook-Pro.local>
2023-10-04 09:40:54 +02:00
Thomas Ricouard 6c23569d15 UserPreferences -> Observable 2023-09-19 09:18:20 +02:00
Thomas Ricouard f9c0355f1d Convert Theme to Observable 2023-09-18 21:03:52 +02:00
Thomas Ricouard 8bb102cd67 Fix #1466 2023-09-18 18:55:11 +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 113b28db18 Account context menu link to web based privacy settings 2023-08-29 08:58:07 +02:00
Thomas Ricouard a2fe0511e0 Run swiftformat 2023-07-19 07:46:25 +02:00
Thomas Ricouard 3525d94f71 Add a mention / reply button on user profile navigation 2023-07-18 08:21:34 +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
Thomas Ricouard df55028836 SwiftFormat . 2023-03-19 16:28:06 +01:00
Chris Kolbu 9a6b2129b2
Profile tab accessibility uplift (#1274)
* Combine `joinedAtView` into one accessibility element

Previously, the calendar image was visible with a nonsensical label.

We use the `.combine` operator here to maintain the proper string formatting of the date.

* Improve the accessibility of the AccountDetailHeaderView

Previously, this image had no description and no indication that it had an associated interaction. Now, we wrap it in a button that performs the tap gesture action, and remove the element altogether if there is no avatar image set.

This commit also handles the checkmark for supporter users

* Tweak accessibility of Profile CustomInfoLabels

This commit:
- Reverses the order of title and value
- Sets the value as an `accessibilityValue`
- Adds a hint indicating what the button does, as they perform slightly different actions

* Make Profile tab header image into a Button

This element has an action associated with it (quicklook), so it makes more sense to have it as a button, and hide it if the user does not have an image set.

Without the action it would have been considered decorative and should be hidden.

* Change accessibilityLabel of Profile tab nav bar item to ‘Options’

“More” is considered overly generic.

This commit also adds two additional user input label options

* Add accessibility labels for the Profile tab `Picker`

Previously, these labels were the default accessibility label provided by the SF symbol, that almost, but not quite, made sense

* Remove StatusRowView swipe actions if VoiceOver is running

These swipe actions are automagically added to the accessibility element’s custom actions, in addition to the ones already there, which means that there is a significant (and confusing) amount of doubling up going on.

* Fix typo in StatusRowView.accessibilityActions

* Add accessibilityLabels to all StatusRowActionsView actions

* Provide explicit combined accessibility label for unfocused StatusRowView

Previously, this was a synthesized label, which read the elements in their traversal order, and didn’t provide any context for which of the three numbers corresponded to replies, boosts or favourites.

Now, we create an explicit combined label when the post isn’t being viewed by itself.

* Improve accessibility of StatusRow(Reblog|Reply)View

They are now combined elements and don’t vend the icon as its own element.

* Add missing punctuation to accessibility hints

* Remove interaction from Profile tab @username and profile note elements

These elements open the profile photo url, which is already provided explicitly through the profile photo

* Prefer spoiler warning for StatusRowView accessibility label

…but place the full, unredacted content in an `AccessibilityCustomContent` field for easy access.

Additionally, if VoiceOver is running, an action to expand the warning is also available.

* Represent `FollowButton` elements as Toggles to accessibility

Since these buttons have two states (though arguable in the case of following, but handled here by not changing the representation if a request is pending), it makes sense to handle them as toggles, so they will be read as “Following, On, <Trait>”

* Remove errant comment

* Add “Verified” accessibilityValue to profile fields

* Fix bug StatusRowView default action bug affecting VoiceOver users

Previously, the default (‘Activate’) action for VoiceOver users would be to share a link to the toot, rather than navigate to its detail. It’s hard to say exactly what caused this, but the root was the inclusion of the `contextMenu` in the `accessibilityActions`.

Now, double-tapping on a a non-focused `StatusRowView` will take you to the toot detail.

* Add header trait to Profile tab display name and familiar followers

These stand out as being header-like in presentation and represent the beginning of specific parts of the screen.

* Add conditional accessibility modifier to Profile tab user-defined fields that opens the correct link

* Add accessibility container that contextualises the user-defined fields

When VoiceOver users first enter a user-defined field, the container label will be read out before the element’s spoken description.

* Improve StatusRowView combined accessibility label

It will now start with:

“X boosted Y”, “X replied to @Y”, or “X…” depending on the context of the toot.

* Change familiar follows thumbnail to a Button; add display name as accessibility label

Previously, this button had no context, and would just be a series of images with nothing to allow users to disambiguate them.

* Revert changes from ZStack with tap gesture to Button

Using a Button for this purpose caused high weirdness in tap zones. Basically everything down to the familiar followers triggered both image buttons.

* Add image alt text to StatusRowView and StatusRowMediaPreviewView

Previously, there was no way for the intended audience for the alt text to find said text. There is a tap gesture on each image in the focused status row, but this is not advertised to the user.

Now, the first image’s alt text is read as part of the non-focused, combined representation, and each image has its own alt text attributed in the focused representation.

* Add Profile tab accessibility labels to indicate private/bot/muted/blocked accounts

Previously, the icon did not have any accessible representation (an empty text string).

* Add header trait to Profile “pinned post”

* Use the Account.Field.name for the user input label

* Replace spaces with commas in StatusRowView.combinedAccessibilityLabel
2023-03-19 16:27:18 +01:00
Thomas Ricouard 6c307aba63 SwiftFormat 2023-03-13 13:38:28 +01:00
Thomas Ricouard c3d1c6d363 Add a Mastometrics link in account menu 2023-03-10 18:22:13 +01:00
Thomas Ricouard 15b704c97a All new accounts selector 2023-03-08 19:02:31 +01:00
Thomas Ricouard a9e935016f StatusDataController: update to fresh statuses data on user profile 2023-03-01 19:27:56 +01:00
Thomas Ricouard a3e2d3f8b3 Add sound effects 2023-02-28 18:55:08 +01:00
Peter-Josef Meisch a209c9d0c2
Edit Account should be possible for all accounts; fix type in variable name (#1097) 2023-02-27 18:42:21 +01:00
Jim Dovey d1209e6704
Updated to resolve all possible Sendability warnings from Swift 6 compatibility mode. (#1072)
Co-authored-by: Jim Dovey <jimdovey@apple.com>
2023-02-27 06:39:07 +01:00
Thomas Ricouard 0ec33b802d Refactor account context menu and add it to account list row 2023-02-26 08:59:49 +01:00
Thomas Ricouard b036e90ce4 Simplify Timeline refresh 2023-02-25 10:10:27 +01:00
Thomas Ricouard 29aaa7c5cb Optimisations: Autoclosure for StatusRowViewModel 2023-02-24 13:25:21 +01:00
Louis Lac bf49a4558c
Singularize enum type names (#978) 2023-02-21 18:52:30 +01:00
Thomas Ricouard b259b6739e Swiftformat 2023-02-21 07:23:42 +01:00
Alex Grebenyuk c9e542a2ed
Fix crash when opening account details (#972) close #918 2023-02-21 07:03:24 +01:00
Thomas Ricouard 6a03e06d3a Profile: Show about fields inline 2023-02-19 11:35:46 +01:00
Peter-Josef Meisch 7cc1ca44b5
Display and edit notes on profiles (#929)
Closes #165
2023-02-18 18:28:16 +01:00
Thomas Ricouard d958d10036 Remove Client and RouterPath from StatusRowView env object 2023-02-15 08:46:14 +01:00
Thomas Ricouard 1f14311c2c Better sharing for status and account close #837 2023-02-14 07:26:57 +01:00