Graphite icon indicating copy to clipboard operation
Graphite copied to clipboard

Make menu lists searchable

Open 0HyperCube opened this issue 2 years ago • 2 comments

Searchable font list as suggested by @1oonie. All of the other menus are also searchable.

Closes #1503

0HyperCube avatar Dec 10 '23 18:12 0HyperCube

I'm presently working through these and checking them off as I go:

  • [x] Left/Right/Up/Down keys need to preventDefault when they move the menu highlight or open/close a submenu
  • [x] Spacebar/Enter to activate a submenu entry throws a console error (but clicking works fine, and also it's fine for non-submenus)
  • [x] Fix CSS for search box
  • [x] Deleting all text from the search needs to remove the search bar and return to how it started
  • [x] Fix the bug where, bizarrely, Undo doesn't go past one step and Redo doesn't work at all, even if clicked through the menus instead of using the hotkeys (and even though no Rust files have changed!)
  • [x] Backspacing to clear (and thus end) the search prevents typing again to enter a new search
  • [x] Make it so opening a submenu deselects the search bar text so, for example, you can activate a submenu entry with the spacebar without typing a space in the previous menu's search box
  • [x] Make searching in a submenu possible by opening the search box in that submenu while moving focus away from the previous menu's search box
  • [x] Fix TS error in <svelte:self ... bind:this={...} />
  • [x] Finish code review
  • [ ] ~~Escape should close the search, not the whole menu~~ (later)
  • [ ] ~~Remove the FontInput component~~ (later)
  • [ ] ~~The highlight gets transferred to another entry (or lost if all are filtered away) upon filtering the highlighted item away~~ (later)
  • [ ] ~~Using Tab to navigate between menu bar items and Space to open them lets you open multiple at once~~ (later)

I should probably get this done in the next day or two. It's not a release blocker so that's my current focus. We can do another release once this is merged.

Keavon avatar Dec 11 '23 09:12 Keavon

@Keavon It is probably not necessary to add these features now - I think we could merge this as a non-breaking UX improvement and then add the rest of these improvements later.

0HyperCube avatar Dec 26 '23 11:12 0HyperCube