Repository navigation
feat(desktop): lay the context panel's view tabs out side by side - #1677
Merged
Merged
Conversation
The panel's view picker was a dropdown, so changing views took two clicks: open the list, then pick. At column width the header has room for the views themselves, so draw them as one-click segments — the same control the remote files panel already puts in that slot — and keep the dropdown only for a panel too narrow to hold them without truncating a label. The screenshot scenarios that drove the picker through the `<select>` now click `#context-panel-view [data-context-tab=…]`, and the narrow-panel scenario asserts the three segments sit on one row without clipping. The not-a-repo scenario's `.grid` probe is scoped to the Review panel's own strip, which the panel header now legitimately matches.
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.
The context panel's view switch becomes a segmented control — one click per tab — when the panel is wide enough to hold every label. Narrow panels keep the existing dropdown, where squeezing the labels side by side would only truncate them.
Commits
feat(desktop): lay the context panel's view tabs out side by side— the panel header renders the view tabs as segments once the panel width covers all labels plus the header padding, gap and collapse button, and falls back to the currentSelectbelow that threshold; the screenshot scenarios that anchor on#context-panel-vieware updated for both layouts.Verification
Run locally in the worktree on
dev-huichen@5a8f6075b:npm --prefix desktop run typecheck(tsc --noEmit) → passnpx eslint src/components/layout/ContextPanel.tsx src/components/layout/ContextPanel.test.tsx→ passnpx vitest run src/components/layout/ContextPanel.test.tsx→ 46 tests passedscripts/screenshots/scenarios*.jsonfiles → passNo Rust crates are touched, so no cargo checks were run.
Notes
#context-panel-viewstays the view-switch anchor in both layouts (arole="group"container when inline, theSelectid when collapsed), so screenshot scenarios and tests that use it to tell an open panel from a closed one keep working.User-visible changes
5a8f6075b.scripts/screenshots/scenarios.json,scenarios.d/{fusion-detail,git-lane-window,git-paged}.json) follow the new layout; no other product behaviour changes.