feat: v2 - consolidated esc behavior in editor#2209
Merged
maxy-shpfy merged 1 commit intomasterfrom May 6, 2026
Merged
Conversation
🎩 PreviewA preview build has been created at: |
camielvs
approved these changes
May 5, 2026
Collaborator
camielvs
left a comment
There was a problem hiding this comment.
lgtm. only comment I will make is if I have a node selected and I open one of the top menus (e.g. windows) I would expect esc to close the dropdown - currently it closes and dropdown and deselects the node
Mbeaulne
reviewed
May 5, 2026
Mbeaulne
reviewed
May 5, 2026
Mbeaulne
reviewed
May 5, 2026
Mbeaulne
reviewed
May 5, 2026
Mbeaulne
reviewed
May 5, 2026
bc6880b to
0f4a672
Compare
Collaborator
Author
Merge activity
|
0f4a672 to
fb4cd26
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.

Description
Closes https://github.com/Shopify/oasis-frontend/issues/605
Introduces a centralized ESC key handler for the editor (
useEditorEscapeShortcut) that consolidates escape behavior into a single, prioritized flow:falseso Radix's portal handler can close it natively.The previously scattered ESC handler in
useConduitEdgeModehas been removed in favor of this centralized approach.To support this, several supporting changes were made:
useDialognow exposescancelandstackso consumers can inspect the current dialog stack.ShortcutDefinition.actioncan now returnfalseto signal that the event should not be consumed (skippingpreventDefaultandclearPressed), allowing native browser and Radix portal handlers to run.EditorStoregains ahasAnySelectioncomputed property that checks all selection state in one place.WindowStoreImplgains agetFrontMaximizedWindow()method that returns the top-most maximized window by z-order.Related Issue and Pull requests
Type of Change
Checklist
Screenshots (if applicable)
Screen Recording 2026-05-05 at 9.20.01 AM.mov (uploaded via Graphite)
Test Instructions
Additional Comments
The
actionreturn value contract (void | false) is a targeted escape hatch for dialog coexistence and is not intended as a general shortcut fallthrough mechanism, as the registry holds at most one handler per key combo.