fix: #662 side bar menu groups no longer open when side bar is collapsed#666
Conversation
🎉 Snyk checks have passed. No issues have been found so far.✅ security/snyk check is complete. No issues have been found. (View Details) ✅ license/snyk check is complete. No issues have been found. (View Details) ✅ code/snyk check is complete. No issues have been found. (View Details) |
| }) | ||
| }) | ||
|
|
||
| observer.observe(element, { |
There was a problem hiding this comment.
note: scout the addition of observing data-is-active changes
| // for changes to `aria-current` or `data-is-active` | ||
| if (sideBarState === 'collapsed') return | ||
|
|
||
| const element = ref.current |
There was a problem hiding this comment.
note: small scout. No need to query for the elements every time a mutation is observed.
| function closeAllMenuGroupsWhenAriaCurrentChanges() { | ||
| function closeAllMenuGroupsWhenAriaCurrentOrDataIsActiveChange() { | ||
| if (!ref.current) return | ||
|
|
There was a problem hiding this comment.
note: This is what we were missing. Our observer was opening menu groups even when the side bar was collapsed.
4902bb4 to
35206f2
Compare
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferencesFootnotes
|
fixes: #662