Commit graph

19 commits

Author SHA1 Message Date
Thomas Ricouard 1f858414d8 format . 2024-02-14 12:48:14 +01:00
Thomas Ricouard f67163e4b0 Cleanup print + use OSLog 2024-02-02 18:26:24 +01:00
Thomas Durand 788fab930b
Using AsyncButton from button kit to improve following and related buttons (#1888) 2024-01-14 10:51:54 +01: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
Chris Kolbu f728ea652e
Accessibility bug fixes (#1348)
* Fix bug affecting accessibillityRepresentation of type Toggle

Previously, the action on the button would not get executed. This is a SwiftUI bug, as views passed into `accessibilityRepresentation` should not have any behaviour.

Now, we set an equivalent `accessibilityValue` on|off to emulate the same functionality.

* Remove conditional ViewModifier in favour of inlined modifier

Since this view is part of the `StatusRowView` it’s better to err on the side of less branching with ModifiedContent<>

* Avoid combining StatusRowMediaPreviewView accessibility children

By combining the elements, the end result was that the intended action (opening QuickLook) was swallowed in favour of displaying the alt text alert of images.
2023-04-03 11:14:44 +02: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
Gareth Simpson 9ebe0b314c
Change arrows icon to rocket for boosts (#1099)
* Change arrows icon to rocket for boosts

* Fixing case (part 1)

* Fixing Case (part 2)

* Clean up after merge

* Fix for disabled boost

* Fixes

---------

Co-authored-by: Thomas Ricouard <ricouard77@gmail.com>
2023-02-28 14:53:31 +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
Jérôme Danthinne d0f16c84f7
Move notification and reboosts actions into account menu (#382) 2023-01-25 21:15:32 +01:00
Jérôme Danthinne 9b3b3692ee
Support for follow requests (#376) close #321
* Support for follow requests (#321)

* Run SwiftFormat

Co-authored-by: Thomas Ricouard <ricouard77@gmail.com>
2023-01-25 13:02:28 +01:00
Jérôme Danthinne 94ab5766a1
Allow hiding or showing user boosts (#305)
* allow hiding or showing user boosts

* move notify and reboosts buttons below follow button

* move the account joined date below the name

* fix join date padding

Co-authored-by: Jérôme Danthinne <jerome.danthinne@smile.eu>
2023-01-23 18:50:59 +01:00
Thomas Ricouard a79c5691e0 Run SwiftFormat 2023-01-22 06:38:30 +01:00
Thomas Ricouard 997a33df69 Instantly show lists options in the user context menu when following him close #143 2023-01-20 18:53:07 +01:00
Thomas 980b9a5dd6
Implement Localization (#80)
* Implement localization

* Fix some localization keys

* Adapt to recent changes
2023-01-19 18:14:08 +01:00
Romain Vincens bb72327f52
Fixed typos & misspells (#88)
* Fixed typos and misspells

* Other typos
2023-01-17 15:14:50 +01:00
Thomas Ricouard 7f6419ebae Swiftformat 2023-01-17 11:36:01 +01:00
Thomas Ricouard c653fb79b6 Don't show notify button in users lists 2023-01-12 08:30:47 +01:00
Thomas Ricouard 6f7c576c3a Add notify next to follow button if following 2023-01-12 07:36:19 +01:00
Thomas Ricouard 2f7653d05c Refactor follow to shared FollowButton 2022-12-23 16:21:31 +01:00