-
Notifications
You must be signed in to change notification settings - Fork 516
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
feat(clearAll): New widget #427
Conversation
|| !isEmpty(helper.state.disjunctiveFacetsRefinements) | ||
|| !isEmpty(helper.state.numericRefinements) | ||
|| !isEmpty(helper.state.tagRefinements) | ||
|| !isEmpty(helper.state.hierarchicalFacetsRefinements); |
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 is going to be replaced by algolia/algoliasearch-helper-js#195 .
This is also missing tests |
Expected, I'm waiting for the helper update before implementing them (hence the |
Which update? I mean do you just need a release of the helper? |
No I (or we) need to fulfill algolia/algoliasearch-helper-js#195 before going further. Relying on |
If it's right now working we can move on because we are not in the way to add any new type of refinements to the helper in the coming weeks. Would be good to iterate on this widget and then implement in the helper and then refactor. |
@vvo , I will actually need to fullfill algolia/algoliasearch-helper-js#195 for |
Ready for review
|
Actually, I didn't update the documentation, working on this now. |
let containerNode = getContainerNode(container); | ||
let usage = 'Usage: toggle({container[, cssClasses.{root,header,body,footer,link}, templates.{header,link,footer}, autoHideContainer]})'; | ||
|
||
let ClearAll = headerFooter(require('../../components/ClearAll/ClearAll.js')); |
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.
Do we really need a header and a footer for a link?
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'd say yes because it can definetely be included in the side bar with other facets widgets and you might want to style them all the same way.
Forgot to |
5190a10
to
dfe5016
Compare
dfe5016
to
c029a5c
Compare
c029a5c
to
20bc95d
Compare
Ready for review |
20bc95d
to
0b14133
Compare
@jerskouille could you maybe squash the commits together to make it cleaner? |
@@ -20,7 +20,8 @@ instantsearch.widgets = { | |||
searchBox: require('../widgets/search-box/search-box'), | |||
rangeSlider: require('../widgets/range-slider/range-slider'), | |||
stats: require('../widgets/stats/stats'), | |||
toggle: require('../widgets/toggle/toggle') | |||
toggle: require('../widgets/toggle/toggle'), | |||
clearAll: require('../widgets/clear-all/clear-all.js') |
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 tried to keep that list ordered; do you mind moving it to the c
?
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.
Oh, didn't see that, sure.
Otherwise, looks 👍 @jerskouille -> once you've done the updates I'm happy to merge it! |
0b14133
to
e2473f1
Compare
Done |
Oh btw, do you manage to render it from the Documentation page; because since we don't have any active refinements I assume it auto-hides? |
What code are we using to instantiate the widget, the one in |
Checking right now |
- ClearAll: Component + tests - clearAll: Widget + tests - Documentation - Default style
e2473f1
to
9e61a14
Compare
Done, displaying in the docs. |
👍 |
Uses #407 's
autoHideContainer
instead ofhideContainerWhenNoResults
. We might want to wait until this is implemented in all widgets before merging.Closes #405