Commit graph

233 commits

Author SHA1 Message Date
Thomas Ricouard 434247f3ea Fixes for macOS 2023-10-24 18:34:45 +02:00
Thomas Ricouard fd55020533 New media viewer 2023-10-16 19:08:59 +02: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
Yasura Dodo e8cb090baf
Fix a crash bug at AccountsListRow (#1602)
When you long tap a `AccountsListRow`, a `contextMenu` will be called, and then the app will be crashed.
This happens because two environments are missing; `QuickLook` and `RouterPath`
2023-10-02 11:58:13 +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 8e3584ee79 Upgrade to Swift tools version 5.9 + strict Swift concurrency everywhere 2023-09-15 12:46:15 +02:00
Thomas Ricouard 113b28db18 Account context menu link to web based privacy settings 2023-08-29 08:58:07 +02:00
Thomas Ricouard 0842f23d52 Keep the new keyword field focused 2023-07-22 19:21:29 +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
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
Thomas Ricouard 105b7717a9 Fix #984 follow you being out of boundaries 2023-02-22 07:36:29 +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 88173adc9e Add indicator for bots accounts 2023-02-20 18:15:45 +01:00
Thomas Ricouard 942279e482 Honour in app browser settings when opening profile about fields 2023-02-19 15:32:56 +01:00
Thomas Ricouard 6a03e06d3a Profile: Show about fields inline 2023-02-19 11:35:46 +01:00
Sean Goldin 274d36eec7
Fix 1 line note in centre (#938) 2023-02-18 21:25:45 +01:00
Peter-Josef Meisch 7cc1ca44b5
Display and edit notes on profiles (#929)
Closes #165
2023-02-18 18:28:16 +01:00
Alex Grebenyuk 425a4eef4f
Update to Nuke 12 (Beta 1) (#924)
* Install Nuke from nuke-12 branch

* Fixes

---------

Co-authored-by: Thomas Ricouard <ricouard77@gmail.com>
2023-02-18 07:25:10 +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
Thomas Ricouard 86aad4145a Notifications: When multiple follow, open list of users instead of just one user 2023-02-13 07:00:42 +01:00
Thomas Ricouard aab397f2bb Fix profile pinned post UI 2023-02-12 18:14:34 +01:00
Thomas Ricouard eb6050a38f Swiftformat 2023-02-12 16:29:41 +01:00
Thomas Ricouard 9fd1b4ef73 Cleanup 2023-02-12 16:29:27 +01:00
Thomas Ricouard a959ea3606 Transition profile to List container 2023-02-12 16:13:57 +01:00
David Davies-Payne 11167c35c3
Also sort tags and lists in profile view (#764)
* Add CurrentAccount.sortedLists and .sortedTags

Sorts alphabetically, ascending, lowercased on title and name respectively.

* TimelineTab uses CurrentAccount.sortedLists and .sortedTags

* Account detail sorts tags and lists

Alphabetically, ascending, lowercased via CurrentAccount.sortedTags, .sortedLists
2023-02-10 06:38:18 +01:00
Thomas Ricouard 76c0c843cd Profile: Add a gap between pinned posts and other posts 2023-02-09 07:49:15 +01:00
Mackenzie f1fd18a04f
make share and copy links translatable (#551)
* make share and copy links translatable

* add placeholders to other files
2023-02-06 12:29:18 +01:00
Peter-Josef Meisch c7f22d5022
Add muting duration submenu (#662)
* Add muting duration submenu

* set japanese localizations
2023-02-06 12:25:51 +01:00
Thomas Ricouard b598434648 Fix action on notify menu in account detail 2023-02-05 21:46:21 +01:00
Thomas Ricouard 3615c396dd FIx open link in profile close #624 2023-02-03 07:15:19 +01:00
Thomas Durand 06e219597b
More fixes for #568 - Open Url in browser (#585)
* More fixes for #568

I saw the fix for StatusRowContextMenu, so this is a complement for this same bug accros the app

* Let it be just a clean up then ;)
2023-02-01 18:55:18 +01:00
Thomas Ricouard 4e77669181 Swiftformat 2023-02-01 12:49:59 +01:00
Thomas Ricouard 52eff96ab4 Iron out timeline issues with the new behaviour 2023-01-31 12:17:35 +01:00
Thomas Ricouard d9b166339d Fixes for iPad layout 2023-01-31 08:16:36 +01:00
Thomas Ricouard 1a351eaa7c Smoother scrolling up in the Timeline 2023-01-31 08:04:35 +01:00
Thomas Ricouard d88d9db1dc Transition Timeline to List + stream post automatically + keep position + new counter UI 2023-01-30 21:41:42 +01:00
Thomas Ricouard 24504e3bc2 Various optimizations to speed things up 2023-01-30 19:14:43 +01:00
Thomas Ricouard 16636b12a9 Swift format 2023-01-30 07:27:06 +01:00
Thomas Durand c6c066564d
Better profile header (#526)
* Prevent opening quicklook for missing avatar or header. Fixes #127

* Using theme for missing header background in profile

* fix

---------

Co-authored-by: Thomas Ricouard <ricouard77@gmail.com>
2023-01-30 07:15:18 +01:00
Matthias Buchetics d9546d92d9
Improved stretchy account header (#518) 2023-01-30 07:13:38 +01:00
Thomas Ricouard b89221a535 Code cleanup / format / lint 2023-01-27 20:36:40 +01:00
Thomas Ricouard de4346c47e Add push notification settings in profile context menu 2023-01-27 12:18:17 +01:00
Thomas Ricouard 43ac56302e Move settings tab and profile tab around 2023-01-26 07:34:29 +01:00