-
Notifications
You must be signed in to change notification settings - Fork 3
feat(CurrentRefinements): add query and remove reset #86
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 |
|---|---|---|
|
|
@@ -18,10 +18,37 @@ html: | | |
| </span> | ||
| </li> | ||
| </ul> | ||
| <button class="ais-CurrentRefinements-reset"> | ||
| Clear all | ||
| </button> | ||
| </div> | ||
| althtml1: | | ||
| <div class="ais-CurrentRefinements"> | ||
| <ul class="ais-CurrentRefinements-list"> | ||
| <li class="ais-CurrentRefinements-item"> | ||
| <span class="ais-CurrentRefinements-label"> | ||
| Category: | ||
| </span> | ||
| <span class="ais-CurrentRefinements-category"> | ||
| <span class="ais-CurrentRefinements-categoryLabel">Movies & TV Shows</span> | ||
| <button class="ais-CurrentRefinements-delete">✕</button> | ||
| </span> | ||
| <span class="ais-CurrentRefinements-category"> | ||
| <span class="ais-CurrentRefinements-categoryLabel">Others</span> | ||
| <button class="ais-CurrentRefinements-delete">✕</button> | ||
| </span> | ||
| </li> | ||
| <li class="ais-CurrentRefinements-item"> | ||
| <span class="ais-CurrentRefinements-label"> | ||
| Query: | ||
| </span> | ||
| <span class="ais-CurrentRefinements-category"> | ||
| <span class="ais-CurrentRefinements-categoryLabel"> | ||
| <q>Bla bla bla</q> | ||
| </span> | ||
| <button class="ais-CurrentRefinements-delete">✕</button> | ||
| </span> | ||
| </li> | ||
| </ul> | ||
| </div> | ||
| alt1: with includesQuery and a query | ||
| classes: | ||
| - name: .ais-CurrentRefinements | ||
| description: the root div of the widget | ||
|
|
@@ -34,19 +61,17 @@ classes: | |
| - name: .ais-CurrentRefinements-category | ||
| description: the category of each item | ||
| - name: .ais-CurrentRefinements-categoryLabel | ||
| description: the label of each catgory | ||
| description: the label of each category | ||
| - name: .ais-CurrentRefinements-delete | ||
| description: the delete button of each catgory | ||
| - name: .ais-CurrentRefinements-reset | ||
| description: the reset button for current selected values | ||
| description: the delete button of each category | ||
| - name: .ais-CurrentRefinements-query | ||
| description: the quote element if query is included | ||
| options: | ||
| - name: attributes | ||
| description: Label definitions for the different filters. | ||
| - name: excludedAttributes | ||
| description: list of attributes not to show | ||
| - name: clearsQuery | ||
| - name: includesQuery | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We now have two different option names
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can rename it to
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To me it feels a bit redundant to have
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's a new pattern in InstantSearch I think?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That would be confusing because that’s the previous option name no?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should still be able to excludes & includes with only attributes we can't. I agree with @Haroenv on the question about the name of the options. |
||
| default: false | ||
| description: The clear all button also clears the query | ||
| description: The list includes the query too | ||
| - name: transformItems | ||
| description: Function which receives the items, which will be called before displaying them. Should return a new array with the same shape as the original array. Useful for mapping over the items to transform, remove or reorder them | ||
| --- | ||
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.
We don't have this one on CurrentRefinements?
Uh oh!
There was an error while loading. Please reload this page.
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.
We do have it for both ClearRefinements (algolia/instantsearch#3114) and CurrentRefinements (yet to be implemented).
Uh oh!
There was an error while loading. Please reload this page.
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.
Yep but it's not written in the specs.
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.
You're right. Will add it!