-
Notifications
You must be signed in to change notification settings - Fork 38
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
bug: Clear all button working with collection facet #11
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kabeaty
requested review from
ChrisGillin,
maniax89,
noah-eigenfeld and
Steven-Gassert
as code owners
December 3, 2019 22:07
maniax89
approved these changes
Dec 4, 2019
@@ -8,3 +8,5 @@ export const optionClass = `${baseClass}__facet__option`; | |||
export const optionLabelClass = `${baseClass}__facet__option-label`; | |||
export const singleSelectGroupClass = `${baseClass}__facet__single__select__group`; | |||
export const labelAndSelectionContainerClass = `${baseClass}__facet__label-and-selection-container`; | |||
|
|||
export const collectionFacetIdPrefix = 'collection-facet-'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure this is a css class, but no big deal
broulaye
pushed a commit
that referenced
this pull request
Jan 10, 2020
* Clear all button works with collection facets * Refactor css classes in SearchFacets * Add tests for clearAll button with collectionFacets * Improve naming and add tests for multiple selected collections with clearAll * Clean up double import from same file * Update test
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What do these changes do/fix?
Previously, the root
Clear all
button for the SearchFacets component was not appearing when collectionFacets were selected, and it was also not clearing collectionFacets when it was clicked. These changes make it so that thisClear all
button interacts with the collectionFacets component as it does the other facets components.related to issues:
https://github.ibm.com/watson-discovery/disco-widgets/issues/427
https://github.ibm.com/watson-discovery/disco-widgets/issues/428
How do you test/verify these changes?
I added some tests for this interaction.
You can also test in the example app with a project that has collections. Select a collection and see that the
Clear all
button appears. Click theClear all
button and see that it deselects the collections that you selected.Have you documented your changes (if necessary)?
I added comments to props that were added, and I also left a comment in the SearchFacets component regarding what we should change when Carbon MultiSelect offers more control over selection. I also opened a Carbon enhancement request here: carbon-design-system/carbon#4812.
Are there any breaking changes included in this pull request?
I don't believe so since new props are only being added to the CollectionFacets component, but not to the top-level SearchFacets component.