Forem Creators and Builders 🌱

Discussion on: What are we missing?

 
link2twenty profile image
Andrew Bone

You may be able to weigh in a little on these 😊

Update existing keyboard shortcuts #10878

Currently there are a few different keyboard shortcuts in Forem and they've been built a few different ways. It would be good to now unify these under the new approach (#10713)

Describe the solution you'd like

Code should be changed to the new solution

Describe alternatives you've considered

We leave the old code as legacy until it breaks

Additional context

#10713 is waiting to be merged this issue is just a place to store code that needs updating

feat: Add a key shortcuts modal #10879

#10713 added a keyboard shortcut hook, and the migration for the current keyboard shortcuts to use the new hook has started. See #10878

Describe the solution you'd like

As suggested in #10713, the new hook could be used to populate a keyboard shortcut modal like GitHub's one:

Screen Shot 2020-10-16 at 08 54 53

The key ? would pop up that modal.

The details of the implementation have to be discussed. Using the hook to populate a keyboard shortcut store means that the modal would be different on a per-page basis depending on which shortcuts are used on the current page.

Also, they can't be added in there randomly. The shortcuts would need categorization, so the hook will probably need an update in order to receive the shortcuts categories.

Describe alternatives you've considered

It would be easier to just build a static modal, although less maintainable.

Additional context

#10468 #10713 #10878