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

fix(select): fix multi select popovers within parent popover #733

Merged

Conversation

chrisadubois
Copy link
Contributor

IMPORTANT

Currently, this project is closed to any external contributions. Any pull request made against this project from external sources will likely be closed. If you would like to make changes to this project, please fork this project.

Guide

This "Help" section can be deleted before submitting this pull request.

Update the name of this pull request to reflect the following shape:

{type}/{scope?}/{message}
  • type - A conventional commit type REQUIRED
  • scope - The kabab-case scope of the changes in this request
  • message - A short, kebab-case statement describing the changes REQUIRED

Provide a general summary of the scope of the changes in this pull request.

Description

create a new plugin to handle tippy instances inside of a parent tippy instance. Unclear on why, but none of the existing event handling works to close other tippy instances specifically when there are 2 children tippys (as selects->popover). This is reproducible with a simple storybook (provided). I've also provided a story including the plugin fix. Unit tests have been provided and updated accordingly. The tippy plugin simply manages a map (which is optional) of the groups the children/sibling tippy instances should be associated to, and allows passing through from the select.

Links

Screen.Recording.2024-12-12.at.3.15.04.PM.mov

@chrisadubois chrisadubois added the validated If the pull request is validated automation. label Dec 12, 2024
@@ -502,8 +540,6 @@ describe('Select', () => {
it('should have expected attributes set when shallowDisabled', async () => {
expect.assertions(2);

const direction = 'top';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this just wasn't used

@@ -305,6 +306,84 @@ NestedPopover.args = {
),
};

const MultipleSelectPopoversInsidePopoverInteractiveContentManaged = Template<PopoverProps>(
Copy link
Collaborator

Choose a reason for hiding this comment

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

say that 3 times fast

@chrisadubois chrisadubois merged commit c589df4 into momentum-design:master Dec 13, 2024
5 checks passed
Copy link

🎉 This PR is included in version 26.184.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released validated If the pull request is validated automation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants