Commit da5b2e1
committed
Bug 1984122 - Hide setting-group if child controls are hidden. r=desktop-theme-reviewers,hjones
This change introduces the ability to hide a group if all the controls
in that group are hidden. If a setting-group is hidden, then the closest
groupbox will also be hidden using `display: none`. We cannot use
`.hidden` on these top level groupboxes because the show/hide pane code
will modify the `.hidden` attribute.
This change is implemented using the "visibility-change" custom event.
This event is fired by SettingControl and is handled by SettingGroup.
When a SettingGroup's controlEls are all hidden, then the group will
hide itself and its closest groupbox element. Once the SettingGroup
provides its own card wrapper element, we can remove the closest
groupbox hiding logic.
Differential Revision: https://phabricator.services.mozilla.com/D264890
UltraBlame original commit: 831f1f293ca56e799a305103b460cd0b19a047211 parent 6d88d05 commit da5b2e1
File tree
3 files changed
+766
-76
lines changed- browser/components/preferences
- tests/chrome
- widgets
- setting-control
- setting-group
3 files changed
+766
-76
lines changed
0 commit comments