Skip to content

[Liminal UI] Refactor the Gesture Menu into its own component #3408

@fbmcipher

Description

@fbmcipher

Before implementing a new design for the Gesture Menu, separate it from the Command Palette.

Currently, the Gesture Menu is drawn by the CommandPalette component.

The CommandPalette component is responsible for both the Gesture Menu on mobile and the Command Palette on desktop.

Image

These features currently share a lot of core functionality and a similar interface. However, the visual and functional aspects of the Command Palette and the Gesture Menu have changed a lot during the Liminal UI design process, and they are now quite different from one another.

For that reason, I think we should separate the Gesture Menu into its own component before we begin redesigning it.

This will enable us to modify the Gesture Menu as much as we need to without the risk of breaking the Command Palette on desktop.

Tasks

  • Identify which parts of CommandPalette are responsible for the Gesture Menu, and which parts of it are responsible for the Command Palette
  • Identify any shared functionality that is used between both the Gesture Menu and the Command Palette, and abstract them into hooks or reusable functions
  • Separate the Gesture Menu into its own component
  • Test to ensure no breaking changes with either the Gesture Menu or the Command Palette

Some level of duplication is okay, though please use your judgment to work out where duplication is and isn't acceptable.

Expected Outcome

  • The Command Palette and Gesture Menu look and function identically to before.
  • CommandPalette is responsible for only the Command Palette.
  • GestureMenu is responsible for only the Gesture Menu.
  • Any substantially complex functionality that is shared between the two has been abstracted into separate import.
  • Tests should continue to pass.

Thank you very much!

Metadata

Metadata

Assignees

Labels

refactorRefactor without changing behavior

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions