-
Notifications
You must be signed in to change notification settings - Fork 9
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
Add Facets Level Css Support for FilterGroup #375
Conversation
Current unit coverage is 89.16323731138546% |
src/components/Facets.tsx
Outdated
@@ -95,6 +95,14 @@ export function Facets(props: FacetsProps) { | |||
facetType = getFacetTypeFromFacet(facet, hierarchicalFieldIds); | |||
} | |||
|
|||
facetProps = { |
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.
I would like to shout out the useComposedCssClasses
hook in case you haven't seen it yet, which is what we typically use for merging css classes. I don't think it's necessary here because we aren't merging the styling, instead we are using the customCssClasses of a customFacetElement if they are defined and ignoring the classes set at the Facets level. If we wanted to merge the css classes from the Facets and the custom facets, then the useComposedCssClasses
hook should be used
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.
This merges the two objects but I want to have the classes on a singular facet override the classes set on the facets to make sure the styles on the singular facet are used.
This change allows users to provide css classes for FilterGroup on the Facets level. If same css classes are provided on the singular facet level, the latter will be used. J=BACK-2306 TEST=auto,manual Added a test for this. Also manually confirmed the behavior.
3e5dfe5
to
7d61986
Compare
# Version 1.3.0 ### Features - Introduce new Facet components including the new Facets (#360), StandardFacet (#370), NumericalFacet (#375), and HierarchicalFacet (#373) components which support more customizability than the previous Facet components. - Support the new RichTextV2 (Lexical) and Markdown fields which have been converted to HTML as FeaturedSnippetDirectAnswers (#379) - Remove the Yext logo from the search bar (#376) - Deprecate LocationBias (#338) component in favor of the new Geolocation component (#336) ### Bug fixes - Improve the UX of the search bar when long autocomplete text is returned which includes the truncation of long text (#378)
This change allows users to provide css classes for FilterGroup on the Facets level. If same css classes are provided on the singular facet level, the latter will be used.
J=BACK-2306
TEST=auto,manual
Added a test for this.
Also manually confirmed the behavior.