Commit graph

78 commits

Author SHA1 Message Date
Thomas Ricouard 07bfd8cd0e Initial macOS Catalyst support 2023-10-23 19:12:25 +02:00
Thomas Ricouard f08c90f8a0 Fix #1419 2023-10-16 09:16:17 +02:00
Paul Schuetz 0b5e764556
Automatically remove spaces in server names (#1600)
* Automatically remove spaces in server names

If a server name includes a space (which can happen if the string is pasted /
autocompleted), this space is removed, which results in the app not crashing.
Fixes #1599

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

* Format

---------

Signed-off-by: Paul Schuetz <pa.schuetz@web.de>
Co-authored-by: Thomas Ricouard <ricouard77@gmail.com>
2023-10-01 09:37:09 +02:00
Thomas Ricouard 0c4bde40af Migrate drafts to SwiftData 2023-09-22 09:31:35 +02:00
Thomas Ricouard 3743e6d870 Fix share sheet 2023-09-19 09:25:48 +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 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
Eslam Nahel 3853eff065
Fix text field bottom padding in EditorView (#1570) 2023-09-17 08:47:15 +02:00
Thomas Ricouard 584a0d0432 Composer: Fix nav bar background 2023-09-16 14:02:50 +02:00
Thomas Ricouard 4168c64d20 Add a setting to turn off auto detect language when posting close #1461 2023-07-17 20:39:53 +02:00
Jerry da54c933f9
Add localization for Error while posting message (#1472)
* Fix Error while posting message not localized

* Update Localizable.strings files

* Update Traditional Chinese localization
2023-07-05 09:03:28 +02:00
Chris Kolbu 4d588e4a18
Compose Post Screen Accessibility Tweaks (#1259)
* Add localized label for the AI prompt status accessory view

Previously, this icon would have an accessibility label matching its SF symbol key, ‘faxmachine’.

* Darken status editor character count foreground color

By changing it to .secondary, it gets to an APCA contrast of 61, which is a _just_ passing Bronze score for that text size.

It’s still quite short of WCAG 2.1 AA at 3.3:1 (recommended is 4.5:1)

* Change remaining character count color to red when < 0

* Refine remaining character count accessibility

In this commit, we
- Change its trait to `.updatesFrequently`
- Set a localized `accessibilityLabel`
- Set its `accessibilityValue` to the remaining character count
- Disable user interaction (which is presumably set automatically by virtue of being enclosed in a `Menu`)

* Set accessibilitySortPriority on Status editor ScrollView

Previously, the traversal order placed the elements inside the `ScrollView` last. Now, they follow on from the navigation bar contents in the expected order.

* Hide the AvatarView from status creation accessibility

When there is only one account available, there is no functionality associated with this element, so it is considered decorative-only, and should be hidden

* Set TextView placeholder’s `accessibilityValue` to placeholder text when empty

This behaviour matches `UITextField`

* Hide TextView custom `placeholderView` from accessibility

Previously, TextView would vend two accessibility elements when the placeholder was visible. This causes needless confusion for users.

Now, the TextView matches the accessible behaviour of text inputs elsewhere.

* Improve accessibility of post `privacyMenu`

Previously, it would be presented as `Everyone, Button`. Now, we move the visibility to its `value` and use `Visibility` for its label, in conjunction with a hint that states it `Changes post audience`.

* Add `.button` trait and accessible label to emojis in `customEmojisSheet`

Previously, these would all present as `image` with no description, making it very hard to discern what kind of emoji you were adding.

* Change drafts sheet item type to `Button`

A button with an action has a more accessible representation than a `Text` with a tap gesture.
2023-03-17 06:39:31 +01:00
Thomas Ricouard 6c307aba63 SwiftFormat 2023-03-13 13:38:28 +01:00
Paul Schuetz 156279faac
Remove unnecessary dictionary in favor of tuple (#1192)
The dictionary for the detected and selected language when posting is replaced
with a named tuple to include named values that are checked at compile time.
This removes a source of error while still being expressive.

Signed-off-by: Paul Schuetz <pa.schuetz@web.de>
2023-03-07 18:24:12 +01:00
Thomas Ricouard 963cef02a1 Add sent toot sound effect 2023-03-01 07:04:07 +01:00
Ico Davids e4b880dfe5
Make primary action bold: (#1021) 2023-02-22 22:12:10 +01:00
Thomas Ricouard ed9b2a37a7 Fixes for composer and DM 2023-02-21 19:38:35 +01:00
Thomas Ricouard 263ecbb715 Composer: Fix swipe to dismiss 2023-02-21 18:50:45 +01:00
Thomas Ricouard b1424aadd0 Fix two crashes 2023-02-18 17:08:32 +01:00
Thomas Ricouard ca4e80101f Swiftformat 2023-02-18 07:26:48 +01:00
Thomas Ricouard 881816730c Composer: Disable in app account switching 2023-02-17 14:02:05 +01:00
Thomas Ricouard b7e7ee0736 Composer: Fix account switcher in share sheet 2023-02-17 13:30:45 +01:00
Thomas Ricouard ea702e1101 Composer: Fix to account switcher + display full acct name close #906 2023-02-17 08:09:26 +01:00
Thomas Ricouard ef7d75d3d5 Fix requestReview crash on macOS 2023-02-16 13:22:04 +01:00
Thomas Ricouard ab0b207596 Request store rating when publishing a post 2023-02-16 12:14:57 +01:00
Thomas Ricouard d958d10036 Remove Client and RouterPath from StatusRowView env object 2023-02-15 08:46:14 +01:00
Thomas Ricouard b707749558 Composer: Remove unavailable features when editing close #868 2023-02-15 06:44:51 +01:00
Thomas Ricouard ef37db496c Swiftformat 2023-02-12 18:24:09 +01:00
Paul Schuetz cd3c50e151
Automatically detect language of posts, improve language detection when posting (#800)
* Use language detection to translate posts

The source language of a post is now determined via Apples internal language
detection, translation from the transmitted language is still possible.

* Make language detection posting more accessible

Language recognition is now always applied before posting, even if the user has
explicitly selected a different language. However, the user is always asked in
which of the two languages he wants to post.

* Add localizations

* Remove language detection in the timeline for now

The language detection in the timeline is for now removed to increase
timeline-performance.

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

* Show translate button even if no language is sent

The translate-button is shown even if no language is sent with the post.

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

* Adjust to new commits on main

Adjustments are made in regards to new developments on main.

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

---------

Signed-off-by: Paul Schuetz <pa.schuetz@web.de>
Co-authored-by: Thomas Ricouard <ricouard77@gmail.com>
2023-02-12 18:23:29 +01:00
Thomas Ricouard eb6050a38f Swiftformat 2023-02-12 16:29:41 +01:00
Thomas Ricouard 0496727b6f Composer: Rework TextView for faster / smoother editing 2023-02-07 18:42:56 +01:00
Thomas Ricouard 730e471718 Composer: Internalize TextView + fix a lot of lag when editing 2023-02-06 12:24:57 +01:00
Thomas Ricouard 426d2e15b2 Change timeline icon + move OpenAI icon to the accessory bar 2023-01-29 15:08:41 +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
Thomas Ricouard 1aadb0ce3a Add a setting for disabling social keyboard close #355 2023-01-24 21:44:33 +01:00
Pascal Batty a1218e1488
Prepend language list with recently used languages (#353)
* Add new preference entry for recently used languages

Exposes a function to keep the language array clean: no more than 3 items, starting with the most recently used iso code

* Add the preferences to the status editor ViewModel

* Add language selector handling of most recent languages

Only when the user has explicitly selected a language, when the posting was successful, add the selected language to the preferences array.

- Makes Language a local private struct for clarity
- Ensures all available languages are only fetched once
- Separates recently used, other and search result section contents using specific vars/funcs

* Copy new key in all localization files

Co-authored-by: Pascal Batty <pascal@zen.ly>
2023-01-24 21:34:16 +01:00
Hidemune Takahashi ae3d190799
Added marked text range support (#345)
* 👍 Added markedTextRangeSupport.

* 👍 ignore when markedTextRange is non-nil.

* Update TextView revision

Co-authored-by: Hidemune Takahashi <h1d3mun3.74k4h45h1@gmail.com>
Co-authored-by: Thomas Ricouard <ricouard77@gmail.com>
2023-01-24 17:26:56 +01:00
Thomas Ricouard 8fe6eddead Settings: Add a button to hide OpenAI button in the composer 2023-01-23 20:45:18 +01:00
Thomas Ricouard d6aa99eb57 New direct messages view close #122 2023-01-22 16:55:03 +01:00
Sean Goldin 1c679186b0
Only ask for draft when text entered by user (#251) 2023-01-22 11:28:23 +01:00
Thomas Ricouard eec5637c1c Composer / Share sheet: add video upload support close #154 2023-01-22 09:09:35 +01:00
Thomas Ricouard a79c5691e0 Run SwiftFormat 2023-01-22 06:38:30 +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
Thomas Ricouard 9c532d9448 Add support for custom emojis in the composer close #98 2023-01-18 19:11:52 +01:00
Thomas Ricouard 1b9d4e0247 Add some macOS menu & shortcuts 2023-01-18 08:27:42 +01:00
Thomas Ricouard 5ff0330fb7 Composer: Fix account switching not posting on the correct account 2023-01-18 08:07:09 +01:00
Thomas Ricouard 02aa91f432 Composer: Scale input font on macOS 2023-01-18 08:04:52 +01:00
Thomas Ricouard 4143e82fbc Multi account sidebar + scaled font size on macOS + better iPad / macOS app UX 2023-01-17 19:41:46 +01:00
Romain Vincens bb72327f52
Fixed typos & misspells (#88)
* Fixed typos and misspells

* Other typos
2023-01-17 15:14:50 +01:00