Repository navigation
settings: explain why dependent settings are disabled - #4402
wahajahmed010 wants to merge 1 commit into
Conversation
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
| "shell" | ||
| ] | ||
| }, | ||
| { |
There was a problem hiding this comment.
Revert changes to this directory, they are auto-generated
|
/claude review |
Claude reviewSmall, sound change, but it needs two fixes, plus the already-flagged translation revert.
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") |
There was a problem hiding this comment.
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.
| 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") |
There was a problem hiding this comment.
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).
| 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")) |
Description
Settings that are greyed out gave no indication of what controls them. With
All displaysenabled,Show on last displayand the per-display toggles are disabled, but nothing on screen says why. The dock'sOver fullscreentoggle has the same problem.SettingsToggleRownow accepts an optionaldisabledReason. 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 displayand the per-display toggles reportControlled by All displays.DockAdvancedTab:Over fullscreenreportsRequires 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
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
I18n.tr()with translator context, reusing existing terms where possiblemake fmt, added/updated tests,make testpasses, andgo mod tidyis cleanmake lint-qmlwith no new warningsNotes on the unchecked items:
make lint-qmlneedsqmllintfrom 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.quickshell/translations/en.jsonandquickshell/translations/template.jsonwere updated with the two new terms.Checks that were run and passed:
python3 quickshell/translations/check_term_freeze.pypython3 quickshell/translations/check_term_variants.pypython3 quickshell/translations/extract_settings_index.py(settings search index is up to date)