Inset Settings sidebar top and widen the column#373
Merged
Conversation
Comment on lines
+22
to
+25
| Color.clear | ||
| .frame(height: 8) | ||
| .listRowBackground(Color.clear) | ||
| .selectionDisabled() |
Contributor
There was a problem hiding this comment.
Adding
.accessibilityHidden(true) prevents VoiceOver from landing on this invisible placeholder row when the user navigates the sidebar.
Suggested change
| Color.clear | |
| .frame(height: 8) | |
| .listRowBackground(Color.clear) | |
| .selectionDisabled() | |
| Color.clear | |
| .frame(height: 8) | |
| .listRowBackground(Color.clear) | |
| .selectionDisabled() | |
| .accessibilityHidden(true) |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
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.
First sidebar row was flush against the title bar; the column was also too narrow so labels like 'Apple Intelligence' truncated to 'Apple I...'. Inserts a clear-color spacer at the top of the List and bumps the column width to min 240 / ideal 260 / max 320.
Greptile Summary
This PR fixes two visual issues in the Settings sidebar: the first row was flush against the window title bar, and the column was too narrow for longer labels like "Apple Intelligence".
Color.clearspacer row (8 pt) is inserted at the top of theListwith.selectionDisabled()to add top breathing room without conflicting with.listStyle(.sidebar).navigationSplitViewColumnWidthis bumped frommin: 200 / ideal: 220 / max: 260tomin: 240 / ideal: 260 / max: 320to prevent label truncation.Confidence Score: 4/5
Safe to merge; changes are cosmetic layout tweaks with a single minor accessibility gap in the spacer row.
Both changes are narrow and purposeful. The wider column width is straightforward. The Color.clear spacer row works correctly for sighted users, but it is not marked .accessibilityHidden(true), so VoiceOver will encounter an unnamed, empty list element when navigating the sidebar.
Cotabby/UI/Settings/SettingsSidebarView.swift — the spacer row needs .accessibilityHidden(true) before the accessibility story is complete.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[SettingsSidebarView body] --> B[List with selection binding] B --> C[Color.clear spacer row] B --> D[ForEach SettingsSidebarSection.allCases] D --> E{section has rows?} E -- yes --> F{section has title?} F -- yes --> G[Section with header] F -- no --> H[Section no header] G --> I[ForEach rows] H --> I B --> J[.listStyle .sidebar] J --> K[navigationSplitViewColumnWidth min 240 ideal 260 max 320]Reviews (1): Last reviewed commit: "Inset sidebar top + widen so labels stop..." | Re-trigger Greptile