fix(panel): stop the top bar shifting when a Stop row is selected#135
Merged
Conversation
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.
Problem
On the Events tab, selecting a "done" (Stop) row shifted the whole panel — top bar and brand mark included — a few px to the left. Permission (
askUserQuestion) rows and an empty list were fine. It came and went, which made it look like a scrollbar glitch.Cause
The footer hint row is built from
.fixedSize()pills that never shrink. A Stop row's wider labels (Open editor+Dismiss) push the hint row to ~618px. At the default/min panel widths (600 / 560) that's wider than the window, so SwiftUI sizes the panel content to the footer's intrinsic width and centers it inside the fixed-width host — dragging the top bar left by half the overflow. A permission row's narrower labels (Approve+Deny) total ~600px and just fit, so no shift. Empty list → tiny footer → fits.Fix
Remove the
FooterDividerbetween the primary action and the navigation hints in the Events footer. That trims ~19px, bringing the Stop-row footer to within the panel width so it no longer overflows and the panel stays put.Testing
Reproduced in a faithful SwiftUI harness under
AppleShowScrollBars = Alwaysat 600px — brand-mark X was3.2(shifted) with the divider,12.0(correct) without. Verified live by injecting Stop events into the running panel.Note: this lands the Stop-row footer at ~exactly the panel width, so it has little margin — dragging the panel narrower than ~600px (min is still 560) could re-trigger it. A follow-up could bump
panelMinWidthto give headroom if that proves annoying.