fix: Shortcuts does not work (Shift+ArrowKey)#9650
Open
ParthPatel-ES wants to merge 1 commit intoHumanSignal:developfrom
Open
fix: Shortcuts does not work (Shift+ArrowKey)#9650ParthPatel-ES wants to merge 1 commit intoHumanSignal:developfrom
ParthPatel-ES wants to merge 1 commit intoHumanSignal:developfrom
Conversation
…abeling and open-labeling Data Manager shortcuts. Let everything else pass through.
👷 Deploy request for heartex-docs pending review.Visit the deploys page to approve it
|
👷 Deploy request for label-studio-docs-new-theme pending review.Visit the deploys page to approve it
|
✅ Deploy Preview for label-studio-playground ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for label-studio-storybook ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
This PR fixes: #9639
Reason for change
Problem:
Data Manager hotkeys (such as
Shift+Up/Downfor multi-selection) randomly stopped working when navigating datasets if the Label Studio Editor was initialized. Prior updates replaced a focus-based check with a globaldocument.body.dataset.lsfLabeling = "true"flag. This inadvertently swallowed all keystrokes inhotkeys.ts, treating the entire Data Manager interface as inactive whenever the labeling view existed.Solution:
Modified
useShortcutinweb/libs/datamanager/src/sdk/hotkeys.tsto implement an allow-list logic. Instead of blindly ignoring all shortcuts when the dataset flag is active, it now only yields control for explicitly conflicting UI shortcuts (e.g.,["dm.close-labeling", "dm.open-labeling"]). General table-navigation keys likeShift+Arroware safely passed through to the Data Manager.Screenshots
N/A - Background event listener logic / non-visual change.
Rollout strategy
Standard release. No feature flags or environment variables are required.
Testing
How verified natively:
Shift+DownorShift+Up.Risks
Low Risk. We are simply unblocking shortcuts that were originally intended to reach the Data Manager context. Potential conflicts with the Label Studio Editor are handled by explicitly returning early for
dm.close-labelinganddm.open-labelingkeys.Reviewer notes
This resolves a UX regression likely introduced in recent versions (around
BROS-655) where the old granular workspace focus mechanism was deprecated in favor of thedataset.lsfLabelingcheck.*** = "true"
global state.pointerdownDOM attribute.General notes
File changed:
web/libs/datamanager/src/sdk/hotkeys.ts