Skip to content

settings: explain why dependent settings are disabled - #4402

Open
wahajahmed010 wants to merge 1 commit into
duxlabs-dev:masterfrom
wahajahmed010:fix/4302-disabled-settings-reason
Open

wahajahmed010 wants to merge 1 commit into
duxlabs-dev:masterfrom
wahajahmed010:fix/4302-disabled-settings-reason

Conversation

@wahajahmed010

Copy link
Copy Markdown

Description

Settings that are greyed out gave no indication of what controls them. With All displays enabled, Show on last display and the per-display toggles are disabled, but nothing on screen says why. The dock's Over fullscreen toggle has the same problem.

SettingsToggleRow now accepts an optional disabledReason. When the row is disabled and a reason is set, that reason is shown as the row's supporting text instead of the usual description, so the user can see which setting controls it.

Rows changed:

  • SettingsDisplayPicker: Show on last display and the per-display toggles report Controlled by All displays.
  • DockAdvancedTab: Over fullscreen reports Requires Use overlay layer.

The reason is bound to the toggle's own description as well, so the accessible description matches what is on screen.

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that changes existing behavior)
  • Refactor / internal cleanup
  • Documentation
  • Other

Related issues

Fixes #4302

Screenshots / video

Not included. The change is to supporting text under an already-disabled row; the QML toolchain is not available in the environment this was authored in, so no screenshot could be captured.

Checklist

  • My code follows the conventions in CONTRIBUTING.md
  • I have tested my changes locally
  • New user-facing strings are wrapped in I18n.tr() with translator context, reusing existing terms where possible
  • Go changes: ran make fmt, added/updated tests, make test passes, and go mod tidy is clean
  • QML changes: ran make lint-qml with no new warnings
  • I have opened a corresponding pull request in dux-docs to document any new behaviors: https://github.com/duxlabs-dev/dux-docs

Notes on the unchecked items:

  • make lint-qml needs qmllint from the Quickshell tooling, which is not installed in the authoring environment, so it was not run. The changed files were checked for balanced syntax and against the repository's own Python checks instead.
  • No Go code was touched.
  • quickshell/translations/en.json and quickshell/translations/template.json were updated with the two new terms.

Checks that were run and passed:

  • python3 quickshell/translations/check_term_freeze.py
  • python3 quickshell/translations/check_term_variants.py
  • python3 quickshell/translations/extract_settings_index.py (settings search index is up to date)

Settings that are greyed out gave no hint about the setting that controls
them. With 'All displays' enabled, 'Show on last display' and the
per-display toggles were disabled with no visible reason, and the dock's
'Over fullscreen' toggle was disabled for the same reason.

SettingsToggleRow now takes an optional disabledReason. When the row is
disabled and a reason is given, the reason replaces the supporting
description so the user can see what controls the setting. The dock and
display picker rows name the controlling setting.

Fixes duxlabs-dev#4302
@github-actions github-actions Bot added feature ui Quickshell UI under quickshell/ labels Nov 24, 2026
"shell"
]
},
{

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert changes to this directory, they are auto-generated

@bbedward

Copy link
Copy Markdown
Member

/claude review

@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Claude review

Small, sound change, but it needs two fixes, plus the already-flagged translation revert.

  • The per-display rows lose their resolution/model line whenever All displays is on, and the reason repeats on every screen. Keep the reason only on Show on last display. quickshell/Modules/Settings/Widgets/SettingsDisplayPicker.qml:69
  • Requires Use overlay layer is a new term. Build it from the existing Requires %1 and Use overlay layer instead. quickshell/Modules/Settings/DockAdvancedTab.qml:41

Checked: SettingsToggleRow subtitle/accessibility binding, effective-enabled behavior of every SettingsDisplayPicker use, the Over fullscreen enable condition, overlap with SettingsControlledBy, catalog term reuse, and the existing review comments (en.json/template.json revert already requested). Model: claude-opus-5-5.

text: SettingsData.getScreenDisplayName(modelData)
description: modelData.width + "×" + modelData.height + " · " + (SettingsData.displayNameMode === "system" ? (modelData.model || I18n.tr("Unknown Model")) : modelData.name)
enabled: !root.localAllDisplays
disabledReason: I18n.tr("Controlled by All displays", "display picker dependent toggle disabled reason")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

disabledReason replaces description, so whenever All displays is on (the default, since empty prefs mean all) every display row drops its width×height · model/name line. Displays that share a name can no longer be told apart, and the same reason appears once per screen right under the All displays toggle that explains it. Drop it here and keep it only on Show on last display.

Suggested change
disabledReason: I18n.tr("Controlled by All displays", "display picker dependent toggle disabled reason")

text: I18n.tr("Over fullscreen")
description: I18n.tr("Keeps the dock showing over fullscreen windows", "dock over fullscreen toggle description")
enabled: (dock.config?.useOverlayLayer ?? false) || Quickshell.screens.some(screen => CompositorService.framePeerSurfacesUseOverlayForScreen(screen) && SettingsData.dockConfigsForScreen(screen).some(config => config.id === dock.config?.id))
disabledReason: I18n.tr("Requires Use overlay layer", "dock over fullscreen toggle disabled reason")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This adds a new catalog term that you can build from two existing ones. Requires %1 and Use overlay layer are both in the catalog already (CONTRIBUTING: reuse existing terms).

Suggested change
disabledReason: I18n.tr("Requires Use overlay layer", "dock over fullscreen toggle disabled reason")
disabledReason: I18n.tr("Requires %1", "dock over fullscreen toggle disabled reason, %1 is the Use overlay layer toggle name").arg(I18n.tr("Use overlay layer"))

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature ui Quickshell UI under quickshell/

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Disabled settings give no indication of why they're disabled

2 participants