Skip to content

Conversation

dotlouis
Copy link
Contributor

@dotlouis dotlouis commented Apr 8, 2025

Hi Gel team,
This is an attempt at fixing one of my biggest pet peeves using the Data Explorer (which I use a lot):
Support for keyboard events to enable selecting a type after searching for it in the dropdown without the mouse.

In addition, I've added listeners for the CMD+P/Ctrl+P shortcut (à la VSCode) to open this dropdown.

A few notes:

  • "enter" selects the highlighted type
  • "esc" closes the dropdown
  • both mouse over and keyboard navigation handle the same highlighted item
  • highlighted item is kept stable even if the list updates (because of search filtering)

Let me know if that works for you. I would love to see this or a similar idea implemented in the UI.
Best

CleanShot 2025-04-08 at 23 23 57

Copy link
Member

@jaclarke jaclarke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @dotlouis, this is great. I've actually been wanting to get around to improving keyboard support across the UI (particularly making the data explorer more spreadsheety), but other things have been higher priority so far.
We maybe have plans for a global 'command palette' kind of thing in the future, so might end up changing the keyboard shortcut at some point, but I think it's fine as it is for now.

@dotlouis
Copy link
Contributor Author

Awesome, thanks for the review and kind words. A global command palette would be indeed very useful for navigating the UI swiftly.
😊

dotlouis and others added 2 commits April 11, 2025 21:26
- By default the up/down keys also seem to move the cursor to the end/start of the input, which I think is probably not useful here.
- Just so it wraps around at the end.

Co-authored-by: James Clarke <[email protected]>
@jaclarke jaclarke merged commit f3da47b into geldata:main Apr 12, 2025
2 checks passed
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