nasa / earthdata-search

Earthdata Search is a web application developed by NASA EOSDIS to enable data discovery, search, comparison, visualization, and access across EOSDIS' Earth Science data holdings.

Home Page:https://search.earthdata.nasa.gov

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

EDSC-2913: Add keyboard shortcut to show all supported keyboard shortcuts

mreese84 opened this issue · comments

Description

Add keyboard shortcut to toggle modal that displays all supported keyboard shortcuts. The ? button should be used for this shortcut.

To make this list of shortcuts easier to maintain, a config file should be used that lists all of the keyboard shortcuts along with a short description of what each of the shortcuts do. Descriptions should be short and to-the-point.

Currently supported shortcut:

  • ] - Toggle main search result/granules panel

Shortcuts with open tickets:

  • g - Toggle granule filters panel
  • a - Toggle advanced search modal
  • / - Focus on search input field
  • ? - Display all keyboard shortcuts
  • t - Toggle timeline

Acceptance Criteria

  • Hitting the ? button on the keyboard displays a modal that lists all supported keyboard shortcuts.

Hi, I would like to take this up!

The commit for our first keyboard shortcut can be found here (amongst a few other changes 😄 ). Also, note that there are a few other people tackling related tickets. We will consider consistency before accepting any PRs.

Yes, got your point. Already checked that feature on the live site. Just a question do you want other shortcuts as disabled when the modal for shortcuts is toggled or do you want them to work as expected?

Oh, good question. Yes, when the help modal is active, no other shortcuts should work. Following the Gmail paradigm helps here.

Before submitting a PR, please make sure you have a test for the functionality you've added. A unit test was added for our existing keyboard shortcut with this PR. Thank you!

Yes, I will take care of that one. I have a few updates,

  1. Almost finished up the implementation, just the unit tests are pending.
  2. I will be introducing a new variable in the state for representing the modal state as open or closed. So, it will be required by other devs to incorporate that in their implementation. Will it be feasible or we can take an alternative approach here?