Allow a setting to declaratively depend on another one
ClosedPublic

Authored by broulik on Sep 2 2019, 7:41 PM.

Details

Summary

Also indent dependent settings.

Test Plan
  • Enhanced media controls is indented now
  • Checking and unchecking media controls enables/disables enhanced media controls (like before, but now without "special code")

Diff Detail

Repository
R856 Plasma Browser Integration
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik created this revision.Sep 2 2019, 7:41 PM
Restricted Application added a project: Plasma. · View Herald TranscriptSep 2 2019, 7:41 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik requested review of this revision.Sep 2 2019, 7:41 PM
broulik updated this revision to Diff 65272.Sep 2 2019, 7:47 PM
  • Be explicit about the value, so you can also have something on when something else is *un*checked
  • Initially check dependencies, too, not just when changing setting
broulik updated this revision to Diff 65273.Sep 2 2019, 7:49 PM
  • Simplify...
broulik updated this revision to Diff 65306.Sep 3 2019, 11:50 AM

dependant → dependent

broulik edited the summary of this revision. (Show Details)Sep 3 2019, 11:50 AM
fvogt accepted this revision.Sep 3 2019, 12:12 PM

Works. I don't think the CSS indentation style works for data-depends-settings-value="FALSE" though, that would just be weird.

This revision is now accepted and ready to land.Sep 3 2019, 12:12 PM

The visuals are completely independent (just a CSS class) from the actual logic of turning it on/off (the data attributes)

This revision was automatically updated to reflect the committed changes.