Commit graph

169 commits

Author SHA1 Message Date
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
Thomas Ricouard
2850c168b0 Fix profile field name font 2023-07-17 19:49:42 +02:00
Thomas Ricouard
94b642f051 Support custom emojis in field name fix #1474 2023-07-17 19:46:46 +02:00
Thomas Ricouard
a97868cab7 Fixes for bluesky bridge support 2023-07-04 08:37:30 +02:00
Thomas Durand
69ab13297f
More compact account list rows (#1442) 2023-06-26 15:54:56 +02:00
Paul Schuetz
7e5c4ed92a
Show verified URLs in account lists (#1364)
* Show verified URLs in account lists

This allows the user to quickly assess which account of multiple is the official
one, especially when searching for a person with multiple search results.
Fixes #1361

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

* Replace the verified urls text with a checkmark

This makes it easy for the user to directly see why the urls are listed.

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

* Swiftformat

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

---------

Signed-off-by: Paul Schuetz <pa.schuetz@web.de>
2023-04-08 13:31:43 +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
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
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
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
Paul Schuetz
da0b92e13d
Allow translation of an account bio/note (#1276)
The bio (note) of an account can now be translated via DeepL. If the user has
put in his own DeepL API key, that is used, otherwise, the standard one is
used. See #1267

Signed-off-by: Paul Schuetz <pa.schuetz@web.de>
2023-03-19 16:18:13 +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
c3c6899483 Merge branch 'main' of https://github.com/Dimillian/IceCubesApp 2023-03-07 18:25:10 +01:00
Thomas Ricouard
e7752feba0 Improve filter edit UX 2023-03-07 18:25:06 +01:00
Yusuke Arakawa
9d1e077762
Fixed the problem that the header information on the profile screen was not displayed (#1187)
* Fixed the problem that the header information on the profile screen was not displayed

* Fixed parallelism issue

---------

Co-authored-by: Yusuke Arakawa <nekolaboratory@users.noreply.github.com>
2023-03-07 18:24:20 +01:00
David Walter
2ac615b0ba
Fix CustomEmoji Baseline Offset (#1188) 2023-03-06 15:21:26 +01:00
Thomas Ricouard
ab06c0ab17 Fix supporter badge for rounded avatar 2023-03-04 09:16:00 +01:00
Ico Davids
31744067e4
Make primary action bold: (#1151) 2023-03-03 20:10:20 +01:00
Peter-Josef Meisch
db5d0b9274
Display and edit filter expirations (#1141) 2023-03-03 08:15:34 +01:00
Thomas Ricouard
eea6d93dd5 Add customization of text color close #385 2023-03-03 08:12:01 +01:00
Thomas Ricouard
37ed178c3f Various fixes + fix Explore navigation 2023-03-02 20:15:07 +01:00
Thomas Ricouard
81f3db733b Add supporter subscription + supporter badge 2023-03-01 20:07:40 +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
Thomas Ricouard
735ed6a211 Accounts: Allow text selection of username and bio 2023-02-28 18:49:02 +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
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
Peter-Josef Meisch
6dae90f227
add icons for muted and blocked profiles (#1085) 2023-02-27 06:37:39 +01:00
Peter-Josef Meisch
4d28e2348e
Change icon for locked profile (#1065) 2023-02-26 17:33:16 +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
83e4e74329 Swiftformat 2023-02-26 06:45:57 +01:00
Thomas Ricouard
43cb5164d1 Profile use compact name formatter for numbers close #1057 2023-02-25 18:37:07 +01:00
Thomas Ricouard
b036e90ce4 Simplify Timeline refresh 2023-02-25 10:10:27 +01:00
Thomas Ricouard
abb1c53ae6 Various fixes 2023-02-24 17:16:39 +01:00
Thomas Ricouard
29aaa7c5cb Optimisations: Autoclosure for StatusRowViewModel 2023-02-24 13:25:21 +01:00
Thomas Ricouard
401bd7afb5 Edit profile: Fix fonts 2023-02-24 09:37:23 +01:00
Thomas Ricouard
cc4768b5e7 Profile edit: Allow re order of fields 2023-02-24 09:23:16 +01:00
Yusuke Arakawa
293d680510
Fix follow button placement in the center (#1033)
Co-authored-by: Yusuke Arakawa <nekolaboratory@users.noreply.github.com>
2023-02-24 08:42:24 +01:00
Thomas Ricouard
63ff87f640 Move languages into Models 2023-02-24 08:24:51 +01:00
Thomas Ricouard
096e42b1c2 Profile edit: Add metadata editing 2023-02-24 07:55:24 +01:00
Thomas Ricouard
3f17afa8ac Accounts: Replace lock / robot emojis with SF Symbols 2023-02-23 18:57:48 +01:00
David Walter
a0e37273a4
Fix scaling of custom emoji (#1020) 2023-02-22 22:13:46 +01:00
Ico Davids
e4b880dfe5
Make primary action bold: (#1021) 2023-02-22 22:12:10 +01:00
Thomas Ricouard
a4910037b8 Swiftformat . 2023-02-22 19:09:39 +01:00
Peter-Josef Meisch
fc63830b27
Add lock icon to protected account (#1011)
Closes #915
2023-02-22 19:00:39 +01:00