Skip to content

fix: Shortcuts does not work (Shift+ArrowKey)#9650

Open
ParthPatel-ES wants to merge 1 commit intoHumanSignal:developfrom
ParthPatel-ES:fix/issue-9639
Open

fix: Shortcuts does not work (Shift+ArrowKey)#9650
ParthPatel-ES wants to merge 1 commit intoHumanSignal:developfrom
ParthPatel-ES:fix/issue-9639

Conversation

@ParthPatel-ES
Copy link
Copy Markdown

This PR fixes: #9639

Reason for change

Problem:
Data Manager hotkeys (such as Shift+Up/Down for multi-selection) randomly stopped working when navigating datasets if the Label Studio Editor was initialized. Prior updates replaced a focus-based check with a global document.body.dataset.lsfLabeling = "true" flag. This inadvertently swallowed all keystrokes in hotkeys.ts, treating the entire Data Manager interface as inactive whenever the labeling view existed.

Solution:
Modified useShortcut in web/libs/datamanager/src/sdk/hotkeys.ts to 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 like Shift+Arrow are 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:

  1. Open the Label Studio project / Data Manager.
  2. Click on a task to open the Label Studio Editor (LSF side-panel).
  3. Click back onto the Data Manager rows to shift focus.
  4. Press Shift+Down or Shift+Up.
  5. Expected result: Rows are successfully multi-selected (no longer trapped/ignored by the LSF listener).

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-labeling and dm.open-labeling keys.

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 the dataset.lsfLabeling check.

*** = "true" global state.pointerdown DOM attribute.

General notes

File changed: web/libs/datamanager/src/sdk/hotkeys.ts

…abeling and open-labeling Data Manager shortcuts. Let everything else pass through.
@ParthPatel-ES ParthPatel-ES requested a review from a team as a code owner March 24, 2026 11:41
@netlify
Copy link
Copy Markdown

netlify bot commented Mar 24, 2026

👷 Deploy request for heartex-docs pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 5f16848

@netlify
Copy link
Copy Markdown

netlify bot commented Mar 24, 2026

👷 Deploy request for label-studio-docs-new-theme pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 5f16848

@netlify
Copy link
Copy Markdown

netlify bot commented Mar 24, 2026

Deploy Preview for label-studio-playground ready!

Name Link
🔨 Latest commit 5f16848
🔍 Latest deploy log https://app.netlify.com/projects/label-studio-playground/deploys/69c27873ac4426000841049a
😎 Deploy Preview https://deploy-preview-9650--label-studio-playground.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link
Copy Markdown

netlify bot commented Mar 24, 2026

Deploy Preview for label-studio-storybook ready!

Name Link
🔨 Latest commit 5f16848
🔍 Latest deploy log https://app.netlify.com/projects/label-studio-storybook/deploys/69c278737be6d20008c62c7f
😎 Deploy Preview https://deploy-preview-9650--label-studio-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions bot added the fix label Mar 24, 2026
@matt-bernstein matt-bernstein requested a review from a team March 25, 2026 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Data Manager shortcuts does not work (Shift+ArrowKey)

1 participant