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

Feature/search multiselect #117

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Conversation

belinda82
Copy link
Collaborator

No description provided.

@belinda82 belinda82 requested a review from mnicole May 23, 2023 19:58
@netlify
Copy link

netlify bot commented May 23, 2023

Deploy Preview for gumdrops ready!

Name Link
🔨 Latest commit eab1254
🔍 Latest deploy log https://app.netlify.com/sites/gumdrops/deploys/65aee4f567b00e0008c72eb1
😎 Deploy Preview https://deploy-preview-117--gumdrops.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.


## SearchMultiSelectExtended Props

<ArgsTable of={SearchMultiSelectExtended} />
Copy link
Collaborator

Choose a reason for hiding this comment

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

it says ArgsTable is not found.. need to import it as well as Canvas and Source (see others for example)

Copy link
Collaborator

Choose a reason for hiding this comment

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

@belinda82 it's giving an error that SearchMultiSelectExtendedStories is not found (https://deploy-preview-117--gumdrops.netlify.app/?path=/docs/molecules-searchmultiselectextended--docs)

Copy link
Collaborator Author

@belinda82 belinda82 Jul 6, 2023

Choose a reason for hiding this comment

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

This component can display hierarchical data or nested options, also has tags to know which options you have chosen, and you can search for the value

@mnicole
Copy link
Collaborator

mnicole commented May 23, 2023

do we want to have a separate component for this or merge its functionality into the multiselect component? @morganee thoughts?

@mnicole
Copy link
Collaborator

mnicole commented Jul 5, 2023

@belinda82 what is the difference between this and the other one? i'm not clear. thanks!

@belinda82 belinda82 force-pushed the feature/searchMultiselect branch from 22fe73c to 4408cd5 Compare October 26, 2023 13:44
@belinda82
Copy link
Collaborator Author

@mnicole Hey hi.. I changed the description and the name of the component to "SearchMultiSelectGroups" as describes better the goal of this component. Let me know ur thoughts.

@mnicole
Copy link
Collaborator

mnicole commented Oct 26, 2023

thanks @belinda82 i was wondering if grouping should be the default behavior on the regular SearchMultiSelect? instead of having 2 different components with replicated code, I think we should just be able to use SearchMultiSelect and depending on the format of the data you pass in, it will either group it or not (similar to MultiSelect where it supports grouping but we don't have a separate MultiSelectGroup.. it will automatically group it if you pass in nested data)

@belinda82
Copy link
Collaborator Author

Hi @mnicole I merged both components into one single component. let me know your thoughts.

Copy link
Collaborator

@mnicole mnicole left a comment

Choose a reason for hiding this comment

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

thanks, this was what i was thinking!

</div>
<div className={tagHolderClasses}>
<div className="gds-search-select__tag-overflow">
{options.map(({ name, key, isSelected, options }, index) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

it looks like it's still working but just wanted to make sure.. this PR is changing the structure of the options you pass in to have "value" instead of "key".. will this still work if someone had already been passing in "key"? and it works still if you pass in "value" since key is referenced here?

can you try these steps https://github.com/gumgum/gumdrops/blob/master/CONTRIBUTING.md#local-testing to test it on AM in a place where it's using the options using key, and one using value?

also it's a little hard to test on gumdrops since you have to edit the options manually so would be good to test on a real app!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I test it and it works, also did some changes to improve performance

case 13: // enter
this._toggleOnEnter();
break;
case 27: // esc
Copy link
Collaborator

Choose a reason for hiding this comment

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

is there a reason to remove these other keyboard shortcuts?

@mnicole
Copy link
Collaborator

mnicole commented Nov 14, 2023

@morganee can you help review this one too since it's a lot of changes? 🥺

@mnicole mnicole requested a review from morganee November 14, 2023 21:09
@belinda82 belinda82 force-pushed the feature/searchMultiselect branch 2 times, most recently from 8dddaa0 to fd319dc Compare December 22, 2023 18:52
@belinda82
Copy link
Collaborator Author

@morganee the component is ready to test :D thanks!!

@belinda82 belinda82 force-pushed the feature/searchMultiselect branch from fd319dc to 1832e0b Compare January 10, 2024 19:43
<Checkbox
key={i}
value={value}
onChange={() => _toggleOption(option)}
Copy link
Contributor

Choose a reason for hiding this comment

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

To select an option we have to click on the checkbox only, before it seems we could by clicking anywhere in the row. Is it possible to move back the _toggleOption(option) (and I think toggleSubItem(option, subIndex) too) on the parent div instead of the Checkbox ?

Copy link
Contributor

Choose a reason for hiding this comment

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

good call .. thanks Morgane 👯 , its done!

@belinda82 belinda82 force-pushed the feature/searchMultiselect branch from 1832e0b to f1985d5 Compare January 11, 2024 14:01
@morganee
Copy link
Contributor

For the nested options, the first option in the doc 'All pets' is not showing unless it has options. Maybe we could make it explicit that if they pass the isNested prop then we read only values with options.

If it's not passed, so the default option, we just display the top level values, whether they have options or not.

If we need to have a mix of both in the future we can update the component but I don't think it's a use case that needs to be addressed right away. Moreover they if they have a nested array with orphan values, they can put them under a fake parent that they call 'Other', 'Unknown' etc, it's not a blocker.

@belindaDominguez
Copy link
Contributor

@mnicole what do you think about the scenario mentioned by @morganee ? do you want me to specify this option in the docs? or do u want me to change the code. let me know 👯 Thanks!

@mnicole
Copy link
Collaborator

mnicole commented Jan 12, 2024

talked to Belinda on video but i think we should show the high level value by default if they pass one in. it could be the case in the hierarchy that they want to know if someone selects a general category but that general category maybe doesn't have any sub categories. like you said Morgane, in the future if needed we could make it so they can pass isNested and that determines it but it might be an edge case.

@belinda82 belinda82 force-pushed the feature/searchMultiselect branch from f1985d5 to 4f98c57 Compare January 15, 2024 20:09
@belindaDominguez
Copy link
Contributor

@mnicole @morganee let me know your thoughts the logic of the tags change a little, in order to show all the options selected. 👯‍♀️

@belinda82 belinda82 force-pushed the feature/searchMultiselect branch from 4f98c57 to b3cad37 Compare January 18, 2024 13:08
@morganee
Copy link
Contributor

Approved for me ! Belinda showed me the latest code on her local. She needs to rotate her github ssh keys to get the access back to push the doc changes. Also I don't see an approval button, hence the comment.

@mnicole mnicole requested review from morganee and mnicole January 19, 2024 15:57
@mnicole
Copy link
Collaborator

mnicole commented Jan 19, 2024

i just found a button that says "re-request a review" 🤷‍♀️
review requests expire maybe?

@morganee
Copy link
Contributor

i just found a button that says "re-request a review" 🤷‍♀️ review requests expire maybe?

yes thank you I see a button now to review the changes. I'll wait for Belinda to push to approve 👍

@belinda82 belinda82 force-pushed the feature/searchMultiselect branch from b3cad37 to eab1254 Compare January 22, 2024 21:58
@belinda82
Copy link
Collaborator Author

@morganee changes done 👯

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.

4 participants