feat(www): add R hotkey for reset + fix export highlight flash - #244
Merged
Conversation
- Extract ResetDialogContent from ResetButton so the confirm window can be shared between the Settings-hosted button and the new hotkey - Add ResetHotkey component that registers `R` and mounts an always-on handle-driven AlertDialog (hotkey survives NavTabs remounts) - Mount ResetHotkey inside Settings alongside the existing S binding - Wire resetDialogHandle into site-command-menu so the command palette also opens the reset confirm window - Warm Shiki's grammar registry on idle before the export dialog opens, cutting the unstyled flash on first open - Match fallback <pre> padding to Shiki's .shiki box (1.2rem) so the async highlight swap doesn't cause a visible reflow jump - Document R shortcut in shortcuts.mdx Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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
Rhotkey for reset — adds aResetHotkeycomponent mounted insideSettings(same lifetime as theSbinding) that registersRand opens a handle-drivenAlertDialog. ExtractedResetDialogContentfromResetButtonso the confirm dialog body is shared by both the settings-hosted button and the new hotkey entry point — no drift risk.R) to the site command menu viaalertDialogHandle, using a newAlertDialogTriggerbranch in the menu renderer.<pre>padding to Shiki's.shikibox (1.2rem) so the async swap is invisible.shortcuts.mdxdocuments theRshortcut and rewrites the navigation blurb.Test plan
Rfrom anywhere (no modals open) — reset confirm dialog appearsRwhile an input is focused — hotkey ignored (ignoreInputs)⌘K), select "Reset to defaults" — same confirm dialogRrow present in the table🤖 Generated with Claude Code