Fix language variant display in settings and compose toolbar - #1559
Open
rschiang wants to merge 2 commits into
Open
Fix language variant display in settings and compose toolbar#1559rschiang wants to merge 2 commits into
rschiang wants to merge 2 commits into
Conversation
This commit fixes the preview of Default Post Language in Mastodon iOS’ General Settings. Currently, the code matches against `localeId` instead of `id`, which results in mismatches for specific language variants (e.g., `ms-Arab` or `zh-TW`). Changing the matching field fixes the issue. Signed-off-by: Poren Chiang <poren@poren.tw>
This commit improves the presentation of language indicator on the composing toolbar. Currently, language variants will be forced to wrap into two lines (and in `ms-Arab`, three lines). As we don’t have access to `lineHeight` before iOS 26 and hence weren’t able to reduce that line gap, this commit improves the situation by adding a slight vertical padding, tighter leading, and packing language variants into 4-character abbriveation. Signed-off-by: Poren Chiang <poren@poren.tw>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request fixes “Default Post Language” previews and improves the compose toolbar language indicator for language variants.
The first commit 69c364f addresses a trivial comparison error that resulted in language variants losing their preview in Settings.
The second commit f689a09 improves the language indicator in the compose toolbar so longer variant codes fit more cleanly using compact uppercase abbreviations, tighter leading, and small vertical padding.
Note: I didn’t opt for improving the multi-line legibility due to
.lineSpacingbeing available only on iOS 26+ and there are only limited ways for me to tweak this without introducing too much complexity to code. I believe this PR strikes a good balance.Please let me know if there’s comments or requests for improvements!