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

feat: update Esc, Tab and Backspace keys navigation #1666

Merged
merged 3 commits into from
Feb 14, 2025

Conversation

d-rita
Copy link
Contributor

@d-rita d-rita commented Feb 14, 2025


Description

This PR contains logic to:

  • Contain Tab within the modal dialog.
  • Always close the modal dialog with the Esc key
  • Navigate up with the Backspace key.
  • If there is nothing to search for, i.e. empty search bar, then the backspace key press goes back to the default/home view from the list views.
  • If there is a search filter, the backspace works as expected to delete the characters in the search input.

Checklist

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

All points above should be relevant for feature PRs. For bugfixes, some points might not be relevant. In that case, just check them anyway to signal the work is done.


Screenshots

  1. Backspace
backspace.mov
  1. Esc
esc.mov

@d-rita d-rita requested a review from a team as a code owner February 14, 2025 11:51
@d-rita d-rita requested a review from cooper-joe February 14, 2025 11:51
@dhis2-bot
Copy link
Contributor

dhis2-bot commented Feb 14, 2025

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

@dhis2-bot dhis2-bot temporarily deployed to netlify February 14, 2025 11:55 Inactive
@d-rita d-rita requested a review from a team February 14, 2025 12:06
@dhis2-bot dhis2-bot temporarily deployed to netlify February 14, 2025 13:34 Inactive
@d-rita d-rita merged commit 25beae5 into refactor/modal-navigation Feb 14, 2025
18 checks passed
@d-rita d-rita deleted the feat/update-key-navigation branch February 14, 2025 13:51
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.

3 participants