-
Notifications
You must be signed in to change notification settings - Fork 40
feat(atomic-facet): add noFacetSearch attribute to control facet-search #6790
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -191,6 +191,7 @@ export class AtomicFacet | |||||||
| /** | ||||||||
| * Whether this facet should contain a search box. | ||||||||
| * | ||||||||
| * @deprecated Use the `no-facet-search` attribute to disable the facet search feature. | ||||||||
| */ | ||||||||
| @property({ | ||||||||
| type: Boolean, | ||||||||
|
|
@@ -199,6 +200,19 @@ export class AtomicFacet | |||||||
| reflect: true, | ||||||||
| }) | ||||||||
| public withSearch = true; | ||||||||
|
|
||||||||
| /** | ||||||||
| * Whether to disable the facet search feature. | ||||||||
| * By default, facet search is enabled. | ||||||||
| * Setting this attribute disables the facet search feature. | ||||||||
| * Replaces the `with-search` attribute. | ||||||||
| */ | ||||||||
| @property({ | ||||||||
| type: Boolean, | ||||||||
|
||||||||
| type: Boolean, | |
| type: Boolean, | |
| converter: booleanConverter, |
Copilot
AI
Dec 11, 2025
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.
The noFacetSearch property is missing the reflect: true option. All similar boolean properties in this component (withSearch, isCollapsed, filterFacetCount, enableExclusion) include reflect: true to synchronize the property value with the HTML attribute. This ensures that when the property changes programmatically, the DOM attribute is updated accordingly, which is important for observability and debugging.
Add reflect: true to the @property decorator configuration for consistency with other boolean properties in this component.
| attribute: 'no-facet-search', | |
| attribute: 'no-facet-search', | |
| reflect: true, |
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.
The test description states "should render search parts when both noFacetSearch and withSearch are false", but the test assertions verify that search parts are NOT rendered. According to the component logic at line 530 (
withSearch: !this.noFacetSearch && this.withSearch), when both are false, the expression evaluates totrue && false = false, meaning search parts should NOT be rendered.The assertions are correct, but the test description is misleading. Change the test description to "should not render search parts when both noFacetSearch and withSearch are false" to accurately reflect what is being tested.