Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: app redirects on command palette launch #1658

Draft
wants to merge 2 commits into
base: feature-command-palette
Choose a base branch
from

Conversation

d-rita
Copy link
Contributor

@d-rita d-rita commented Jan 31, 2025

Implements DHIS2-18943


Description

This PR separates the keydown logic specific to the command palette component from that attached to the document.

Previous Behaviour:

  • Previously, when a user pressed the Enter key on the apps menu icon, an app would open immediately.
  • This was due to the command palette launching and the document Enter key logic triggering the selection of the first highlighted item, hence redirecting to the app.

Fixed Behaviour:

  • Only the key down logic for the keyboard shortcuts (Ctrl/Meta + /) used to open the command palette is attached to the document since it can be triggered anywhere within the app.
  • All other keydown functionality specific for use within the command palette is attached to its parent component.
  • Now, pressing the Enter key on the apps menu icon opens the command palette without a problem

Checklist

  • API docs are generated
  • Tests were added
  • Storybook demos were added

Screenshots

Before

before.mov

After

after.mov

@d-rita d-rita requested a review from a team as a code owner January 31, 2025 22:34
@dhis2-bot
Copy link
Contributor

dhis2-bot commented Jan 31, 2025

🚀 Deployed on https://pr-1658--dhis2-ui.netlify.app

@dhis2-bot dhis2-bot temporarily deployed to netlify January 31, 2025 22:38 Inactive
@d-rita d-rita marked this pull request as draft January 31, 2025 22:48
Copy link

sonarqubecloud bot commented Feb 3, 2025

Quality Gate Failed Quality Gate failed

Failed conditions
3 New issues
3 New Code Smells (required ≤ 0)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@dhis2-bot dhis2-bot temporarily deployed to netlify February 3, 2025 08:40 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants