Commit graph

49 commits

Author SHA1 Message Date
Thomas Ricouard 07bfd8cd0e Initial macOS Catalyst support 2023-10-23 19:12:25 +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 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 e6455304ac Fix draft label color 2023-09-18 19:07:14 +02:00
Thomas Ricouard 1b0ddf4fd9 Fix #1457 2023-09-18 19:04:54 +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 573497ed52 Disable take photo option on macOS 2023-04-04 07:44:29 +02:00
Thomas Ricouard 477dd520b9 Editor: Add Take Photo option close #1339 2023-04-03 13:54:16 +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
Yusuke Arakawa 7f96d97d7c
Changed so that pictograms can be entered continuously (#1246) 2023-03-14 18:53:16 +01:00
Thomas Ricouard 6c307aba63 SwiftFormat 2023-03-13 13:38:28 +01:00
Thomas Ricouard 9057740162 Add upload from file browsing + better compression for images 2023-03-10 18:22:45 +01:00
Ico Davids b3919702e0
Outlined icons in status editor (#1194) 2023-03-07 18:23:38 +01:00
Thomas Ricouard 87ef2f2a39 Composer lang: Use reply / quote lang and latest recently used language as default 2023-03-01 07:44:37 +01:00
Yusuke Arakawa ddebf87080
A cancel button has been placed on the custom pictogram selection screen on the post screen (#1101)
Currently, the post screen has a cancel button only on the screen for selecting drafts, so we placed a cancel button for consistency and UX improvement.
Related: #1073

Co-authored-by: Yusuke Arakawa <nekolaboratory@users.noreply.github.com>
2023-02-28 21:11:32 +01:00
Yusuke Arakawa f1db2f716d
Adjusted how to hide the voting screen (#1054)
Like other submission item selection screens, the voting screen can now be shown/hidden with a button toggle.

Co-authored-by: Yusuke Arakawa <nekolaboratory@users.noreply.github.com>
2023-02-25 18:28:27 +01:00
Thomas Ricouard 63ff87f640 Move languages into Models 2023-02-24 08:24:51 +01:00
Louis Lac bf49a4558c
Singularize enum type names (#978) 2023-02-21 18:52:30 +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
Ico Davids 853d70f12a
Use previously unused LocalizedStringKey in language selector (#833) 2023-02-13 18:13:33 +01:00
Thomas Ricouard eb6050a38f Swiftformat 2023-02-12 16:29:41 +01:00
Andrzej Rózga 2363424aef
Localization update (#792)
- new string status.editor.emojis.navigation-title for hardcoded "Custom Emojis"
2023-02-11 20:21:12 +01:00
Quin e192135f37
Add accessibility labels to buttons in compose screen. (#776)
* Add accessibility labels to buttons in compose screen.

* Localize accessibility labels.

* Put them in all files.
2023-02-11 07:21:22 +01:00
Thomas Ricouard 12f3e48b05 Composer: Fix performances issues 2023-02-01 19:17:03 +01:00
Thomas Ricouard 16636b12a9 Swift format 2023-01-30 07:27:06 +01:00
Thomas Ricouard 426d2e15b2 Change timeline icon + move OpenAI icon to the accessory bar 2023-01-29 15:08:41 +01:00
Thomas Ricouard dbb8bd2a3d Fix out of bounds composer in the share sheet and in the app Fix #507 2023-01-29 14:48:32 +01:00
Thomas Ricouard 7f7a967d87 Videos: Compress them before upload + error handling close #430 2023-01-27 08:54:41 +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
Sean Goldin fe1d886b62
URLS can only take 23 characters (#296)
* URLS can only take 23 characters

* Remove hardcoded length of URL
2023-01-23 06:35:26 +01:00
Sean Goldin 0ad5f17b5a
Include spoiler text count when applicable (#281) 2023-01-22 18:50:45 +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 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
Thomas Ricouard 7f6419ebae Swiftformat 2023-01-17 11:36:01 +01:00
Thomas 382ebcf8f7
Implement language selection for new posts (#83) close #76
* Implement language selection in status editor

* Apply the correct language on replies and edits

* Use sheet for language selector

Co-authored-by: Thomas Ricouard <ricouard77@gmail.com>
2023-01-17 07:07:26 +01:00
Thomas Ricouard 596f920603 Share sheet extension 2023-01-15 16:39:08 +01:00
Sean Goldin ba64015f18
Polls (#70)
* Add poll options

* Add the poll view

* Disable adding attachments when showing polls

* Update to post poll info

* Wire up poll view

* Remove debug code

* Use VM for showing poll

* Rename PollView to something better!

* Move file location

* Disable poll button if media is attached.

* Don't refocus on delete option to avoid index out of range crash

Co-authored-by: Thomas Ricouard <ricouard77@gmail.com>
2023-01-13 07:30:15 +01:00
Thomas Ricouard 9cf863d8c3 Post editor: Drafts support 2023-01-11 12:44:34 +01:00
Thomas Ricouard 54ac3d5adb Post editor: Replace visibility menu with a bottom sheet to close #58 2023-01-11 07:33:18 +01:00
Thomas Ricouard dcdd8402e9 Timeline: Add filter for followed tags 2023-01-04 18:37:58 +01:00
Sean Goldin 41d7f4ca62
Less typing padding constants (#23)
* Change enum of constants to CGFloat extension

* Use CGFloat padding extension
2023-01-03 07:41:29 +01:00
Thomas Ricouard bb47937eb6 Editor: Refactor + Add autocomplete for mentions and hashtag 2022-12-31 09:10:27 +01:00