v6: Restyle editor tabs with dirty state and close affordance#4292
Merged
Conversation
🦋 Changeset detectedLatest commit: 81dc3bb The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
|
The latest changes of this PR are not available as canary, since there are no linked |
c91fcac to
05951d7
Compare
Migrates the editor tab strip to v6 OKLCH tokens. Adds a `lastSavedQuery` field to the tab store; dirty state is computed by comparing `query` against that snapshot. Saves update the snapshot via a new `saveQuery` action bound to `Ctrl-S` / `Cmd-S`. Adds a 5x5 blue dirty-state dot (top-right of tab) and a hover-only close button per tab. Adds prettify, copy, and save buttons to the right side of the tab strip.
05951d7 to
cd7679d
Compare
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.
Summary
This PR restyles the editor tab strip for v6 and introduces dirty-state and save affordances. Each tab now shows an accent dot when its query differs from the last saved snapshot, and hovering a tab reveals a close button. A new save action, bound to
Cmd-S/Ctrl-S, snapshots the active tab's query, and the right side of the strip gains prettify, copy, and save buttons that surface the existing actions inline.A note on save: today
saveQuery()just updates thelastSavedQuerysnapshot to clear the dirty dot. Tab content already auto-persists to localStorage, so save isn't writing anything new. The hook is in place so collections (planned as a follow-up package) can give save real semantics, snapshotting the active tab into the current collection entry. Until that lands, the indicator is a cosmetic baseline.Test plan
Cmd-S(macOS) orCtrl-S(Windows/Linux); confirm the dot disappears.Refs: #4219