fix(sidebar): stack the empty Favorites actions so the view fits the sidebar on macOS 15 - #2229
Merged
datlechin merged 1 commit intoAug 19, 2026
Conversation
…sidebar on macOS 15
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
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.
On macOS 15 the empty Favorites sidebar does not fit its own width. The description and the three action buttons run past both edges and are cut off, so "New Favorite..." and "Link a Folder..." cannot be read (TablePro 0.66.0, macOS 15.6.1, sidebar at its default width):
Root cause
ContentUnavailableViewlays itsactionsout in a row. Three buttons side by side are wider than the sidebar, and on macOS 15 the view sizes its whole content to that row instead of the width it was given, so the description wraps at the row's width and the entire block overflows. It is not the description that is too wide: with the buttons stacked, the same text wraps inside 220 pt.Change
FavoritesTabView.emptyStatewraps the three buttons in aVStack(spacing: 8). That is the only layout change; the view stays a stockContentUnavailableViewlike the other sidebar empty states, and the strings and actions are untouched. A doc comment on the property records why the actions are stacked, so it is not "simplified" back into a row.Before / after
Same view code, rendered at sidebar widths of 260 pt and 220 pt on macOS 15.6.1:
Verification
emptyStatebody (literal strings, no-op actions) in a 260 pt and a 220 pt window and snapshots the view. Its "before" reproduces the clipping in the app screenshot pixel for pixel. I could not build TablePro itself here (Xcode 16.4, the project needs Xcode 26), so please give it a run on a Mac with Xcode 26; the diff is a plainVStackwrapper and should not behave differently.swiftlint lint --strictis clean onFavoritesTabView.swift.CHANGELOG.mdhas an entry under[Unreleased] > Fixed.🤖 Generated with Claude Code