improve handling of portrait display on iOS#459
Merged
davidkoski merged 1 commit intomainfrom Jan 14, 2026
Merged
Conversation
Collaborator
Author
|
Contributors are welcome to improve in future PRs! |
davidkoski
commented
Jan 5, 2026
| case .loading: | ||
| // Already loading, wait and retry | ||
| try await Task.sleep(nanoseconds: 100_000_000) // 100ms | ||
| return try await load() |
Collaborator
Author
There was a problem hiding this comment.
Replaced the recursive call with a while loop.
davidkoski
commented
Jan 5, 2026
| .foregroundStyle(.secondary) | ||
| @Environment(\.horizontalSizeClass) var horizontalSizeClass | ||
|
|
||
| var status: some View { |
Collaborator
Author
There was a problem hiding this comment.
Break the view up into a couple pieces that we can reassemble as either a single line (original) or a couple lines (portrait iOS).
davidkoski
commented
Jan 5, 2026
| DisclosureGroup("Statistics") { | ||
| stats | ||
| .scaleEffect(0.8) | ||
| } |
Collaborator
Author
There was a problem hiding this comment.
Same for the stats view -- it takes up a large potion of the screen on a smaller device. Scale the text slightly. The formatting is still poor, but usable.
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.
Proposed changes
Fix #456
This isn't perfect, but the UI is usable on iOS portrait:
Specifically on
horizontalSizeClass == .compactthis will use aDisclosureGroupfor some of the controls and statistics. It also uses a multi-line layout for the controls (this is specifically what broke the layout).Checklist
Put an
xin the boxes that apply.pre-commit run --all-filesto format my code / installed pre-commit prior to committing changes