Commit graph

90 commits

Author SHA1 Message Date
Thomas Ricouard 1578896b3e Immersive short modal 2024-05-17 13:56:03 +02:00
Thomas Ricouard 9a7e6b7cb0 Various fixes for Xcode 15.3 2024-03-11 08:59:29 +01:00
Thomas Ricouard 1f858414d8 format . 2024-02-14 12:48:14 +01:00
Thomas Ricouard 7423aba92a Fix crash on visionOS in AboutView 2024-02-11 18:59:34 +01:00
Thomas Ricouard b4dbda8722 Migrate EmojiText API 2024-02-05 08:55:24 +01:00
Thomas Ricouard bfc1f61e4b Add access to profile from account selector 2024-01-05 18:57:02 +01:00
Pavlo Shadov 8152db745d
Fix the "About" button's label in Accounts Selector view (#1826)
* Fix the key used for About in Accounts Selector view

* Improve the translation for the word "Application" in Ukrainian
2024-01-05 18:17:11 +01:00
Thomas Ricouard 6850fcd928 Add support / about shortcuts in account selector bottom sheet 2023-12-28 16:03:16 +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 4f9e23296f Cleanup 2023-12-06 18:56:19 +01:00
Thomas Ricouard fcaf48ce53 foregroundColor -> foregroundStyle 2023-12-04 15:49:44 +01:00
Thai D. V ea5480ef46
add account popovers for display name and handle (#1687) 2023-11-27 09:00:52 +01:00
Thomas Ricouard b3153289c4 Fix to account selector on iOS 2023-11-20 18:43:16 +01:00
Thomas Ricouard 47d54fd9e6 Fixes 2023-11-20 17:20:09 +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
Thomas Ricouard fd55020533 New media viewer 2023-10-16 19:08:59 +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
Thomas Ricouard 23a83d69cc Remove legacy migrations 2023-10-01 09:48:27 +02:00
Thomas Ricouard 7eec1b8439 Share sheet: Fix account selector 2023-09-22 08:35:21 +02:00
Thomas Ricouard 6c23569d15 UserPreferences -> Observable 2023-09-19 09:18:20 +02:00
Thomas Ricouard fd09276d49 Refactor notifications count 2023-09-19 08:44:11 +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 8e3584ee79 Upgrade to Swift tools version 5.9 + strict Swift concurrency everywhere 2023-09-15 12:46:15 +02:00
Thomas Ricouard a2fe0511e0 Run swiftformat 2023-07-19 07:46:25 +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 356b58bf67 Use the new iOS 16.4 sheet background for app selection sheet (You'll need to use Xcode 14.3 going forward) 2023-03-24 13:53:42 +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
Chris Kolbu c5b4a0dd07
Settings screen Accessibility tweaks (#1258)
* Remove `.button` trait from `Link`s on Account Settings screen

SwiftUI currently sets both the `.button` and `.link` traits on these elements, which is a failure for WCAG 2.1 4.12: Name, Role, Value: https://www.w3.org/WAI/WCAG21/Understanding/name-role-value.html

There is a radar for this issue: FB11507660

* Improve accessibility by making `AppAccountView`s a Button

Previously, the component elements of the `fullView` would be rendered as 3-4 individual views that would _all_ be interactive and perform the same action.

Now, as a Button, only one accessibility element is vended.

* Fix account label color

---------

Co-authored-by: Thomas Ricouard <ricouard77@gmail.com>
2023-03-17 06:38:50 +01:00
Ico Davids dca8937aba
Use 'Done' text on accounts selector (#1245) 2023-03-14 12:17:05 +01:00
Thomas Ricouard 6c307aba63 SwiftFormat 2023-03-13 13:38:28 +01:00
Thomas Ricouard 5c9122a72c Accounts selector: Add correct initial height 2023-03-12 12:01:38 +01:00
Thomas Ricouard 9057740162 Add upload from file browsing + better compression for images 2023-03-10 18:22:45 +01:00
Thomas Ricouard 8571800b31 Account selector: Refresh accounts more often 2023-03-10 08:13:40 +01:00
Thomas Ricouard 8561374a84 Account selector: remove double settings 2023-03-10 07:59:54 +01:00
Thomas Ricouard 4001ffdbe5 Account selector: allow large detent 2023-03-09 06:47:06 +01:00
Thomas Ricouard 82dfeffaec Add haptic feedbacks when changing account 2023-03-09 06:36:38 +01:00
Thomas Ricouard 15b704c97a All new accounts selector 2023-03-08 19:02:31 +01:00
David Walter 2ac615b0ba
Fix CustomEmoji Baseline Offset (#1188) 2023-03-06 15:21:26 +01:00
Keita Watanabe ef7c216d3a
Fix account name would be blank when DisplayName is empty. (#1169) 2023-03-05 07:24:59 +01:00
Keita Watanabe e3ab57ea1c
Fix account order (#1171) 2023-03-05 07:24:07 +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 83e4e74329 Swiftformat 2023-02-26 06:45:57 +01:00
Thomas Ricouard f01a742845 Notifications: Show badge on account switcher on iOS 2023-02-23 18:57:28 +01:00
David Walter a0e37273a4
Fix scaling of custom emoji (#1020) 2023-02-22 22:13:46 +01:00
Thomas Ricouard b259b6739e Swiftformat 2023-02-21 07:23:42 +01:00
Thomas Ricouard bfce92d71e Per account notifications count close #894 2023-02-18 15:36:18 +01:00