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

docs: Menu and MenuTrigger Docs #1051

Closed
wants to merge 10 commits into from
Closed

Conversation

dgodinez-dh
Copy link
Contributor

@dgodinez-dh dgodinez-dh requested review from a team and wusteven815 and removed request for a team December 2, 2024 15:36
@dgodinez-dh dgodinez-dh changed the title DH-18089: Menu and MenuTrigger Docs docs: Menu and MenuTrigger Docs Dec 2, 2024
@wusteven815 wusteven815 requested review from mofojed and removed request for wusteven815 December 9, 2024 18:57
plugins/ui/docs/components/menu.md Outdated Show resolved Hide resolved
Comment on lines +222 to +228
_table = new_table(
[
string_col("Keys", ["key-0", "key-1", "key-2"]),
string_col("Labels", ["Option 0", "Option 1", "Option 2"]),
]
)

Copy link
Member

Choose a reason for hiding this comment

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

Would be cool to show use with a ticking table as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Would we really want to use a ticking table as item source for a menu? I suppose it would work, but I dislike the idea of menu items appearing / disappearing as the table ticks. Also, what would happen if the menu was open while the table ticked? Does it update, or is the menu now out of date?

Copy link
Member

Choose a reason for hiding this comment

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

Guess we should clarify the behaviour with @dsmmcken , but I see a few possible options when the table ticks while the menu is open (ordered by my preference):

  1. Update the menu in place. Seems this is what Spectrum will do by default: https://codesandbox.io/p/sandbox/react-spectrum-playground-forked-rfctrs
  2. Dismiss the menu. They need to re-open the menu.
  3. Freeze the items in the menu while it's open. Could mean some actions are out of date and will error when selected.

We definitely need to decide on what to do with a ticking table... and if you're hooking up a ticking table to a menu, I imagine having it update in place is acceptable.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Spun this off into another ticket:
https://deephaven.atlassian.net/browse/DH-18305
Going to remove this section from the doc for now.

plugins/ui/docs/components/menu_trigger.md Outdated Show resolved Hide resolved
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