-
Notifications
You must be signed in to change notification settings - Fork 16
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
IBX-3456 Collapse all button support #1394
base: 4.6
Are you sure you want to change the base?
Conversation
const collapseAll = toggleAllBtn?.querySelector('.ibexa-attribute-group__toggler-collapse'); | ||
const MULTI_COLLAPSE_BODY_CLASS = '.multi-collapse'; | ||
let singleElementClicked = []; | ||
const checkIfChangeText = () => { |
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 think the name of the function is wrong because this function only toggles the d-none class.
I have one more question, what will happen if it will be 2 or 3 collapse all buttons for different groups?
I would probably create a new JS file that contain all the collapse/expand logic for multiple collpase. The button in the data-attribute could be given a selector which collapse it should collapse/expand/listen to, etc.
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 proposed a new name for the function. In my opinion, based on the YAGNI principle, we should first discuss the probability of such a situation before making such changes.
@@ -0,0 +1,37 @@ | |||
.ibexa-multi-collapse { |
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.
Moved styles from product-catalog. Based on previous review comment let me know if I still should change class name to ibexa-pc-...
c1599eb
to
c43983f
Compare
1228b09
to
c8db495
Compare
Quality Gate passedIssues Measures |
Related PRs:
Description:
For QA:
Documentation: