Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling Action(s) with Overlays #1705

Open
7 tasks
scurker opened this issue Oct 8, 2024 · 0 comments
Open
7 tasks

Handling Action(s) with Overlays #1705

scurker opened this issue Oct 8, 2024 · 0 comments

Comments

@scurker
Copy link
Member

scurker commented Oct 8, 2024

The existing OptionsMenu component is one of the more established components before some of the more modern practices have been put into place in Cauldron. There's some fairly outdated patterns and the inflexibility of the component has led to various bugs and very restricted usage.

Changes to the component patterns would very likely require very significant breaking changes. As such, usage of OptionsMenu should be deprecated and implemented as a new set of components that provide similar capabilities with better design patterns. This ensures we don't require all existing usages of OptionsMenu to adhere to new patterns while providing a smoother transition path towards improved component apis.

Inspiration

The typical terminology with these types of controls is usually "ActionMenu" or "DropdownMenu" as outlined by some of the examples from other design systems below:

These components are anchored with some other control that can be optionally configured, and overlay other content on the page when expanded.

There appears to be 2 potential opposing patterns:

  • True menus that contain some list(s) of items that perform an action once clicked, may contain sub-menus
  • Overlays that contain a variety of actions, can include static content and/or form controls

Component Structure

There is a lot of similarity between the opposing patterns with the main opposition being a controlled list of items vs less structured content. We would likely want to structure the components separately to enforce some rigidity when necessary (as with an action menu) while encapsulation similar functionality.

  • AnchoredOverlay - Container element to display the overlay of its contents anchored to a trigger
    • ActionMenu - Composed with AnchorOverlay to style and contain the action menu and its list of items
      • ActionMenuList - Borrowing behaviors from Listbox to implement the list
        • ActionMenuItem - Borrowing behaviors from ListboxOption to implement the list items
    • ActionPanel - Composed with AnchorOverlay to style and contain items within the panel

AnchoredOverlay would be responsible for managing behaviors for with any attributes for displaying, such as aria-expanded. While each of the components could manage individual behaviors for its respective components. We'd likely want to replace/share some of the existing functionality that exists within Combobox with AnchoredOverlay so that we can consolidate these patterns within a single component.

Implementations

Components

  1. rfc rocket
  2. info needed rfc
  3. info needed rfc
  4. info needed rfc
  5. info needed rfc rocket
  6. info needed rocket
  7. info needed
@scurker scurker changed the title Add "Action [Blank]" Component Add Component(s) to display Action Overlays Oct 10, 2024
@scurker scurker changed the title Add Component(s) to display Action Overlays Handling Action Overlays Oct 11, 2024
@scurker scurker changed the title Handling Action Overlays Handling Action(s) with Overlays Oct 11, 2024
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

No branches or pull requests

1 participant