Skip to content

bar: let widgets set an overflow priority - #4060

Merged
purian23 merged 2 commits into
duxlabs-dev:masterfrom
colonelpanic8:overflow-priority
Nov 1, 2026
Merged

purian23 merged 2 commits into
duxlabs-dev:masterfrom
colonelpanic8:overflow-priority

Conversation

@colonelpanic8

Copy link
Copy Markdown
Contributor

Description

Adds a per-widget Overflow priority (-10 to 10, default 0) to the bar widget settings, shown while a widget's placement is Auto. When a bar runs out of space, auto widgets with a lower priority move into overflow first, and when space returns, higher-priority widgets come back first. Equal priorities keep today's order (nearest the overflow button first), so existing bars behave exactly as before.

Priority is compared across colliding sections too, so a low-priority widget on one side yields before a higher-priority one on the other.

The value is stored as overflowPriority on the widget entry and omitted when it is 0.

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

Screenshots / video

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

Two new cases in tests/bar-overflow.test.mjs fail without the change; the JS suite passes (403 tests). The changed QML files lint clean with qmllint and match qmlformat, but I did not run the full make lint-qml, which needs a running shell for its VFS config.

🤖 Generated with Claude Code

colonelpanic8 and others added 2 commits November 1, 2026 01:12
Auto widgets with a lower priority move into overflow first and return
last. Equal priorities keep the current order, nearest the overflow
button first.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot added feature ui Quickshell UI under quickshell/ labels Nov 1, 2026
@purian23

purian23 commented Nov 1, 2026

Copy link
Copy Markdown
Member

/claude review

@claude

claude Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Claude review

No issues found.
Checked: priority selection and tie ordering in OverflowLayout.resolve (hiding and restoring), the overflowPriority binding path SectionEntry → BarSection, the settings slider/reset store wiring and storage of the value, I18n context, and the tests. Model: claude-opus-5-5.

@purian23

purian23 commented Nov 1, 2026

Copy link
Copy Markdown
Member

Good idea, thanks for the support!

@purian23
purian23 merged commit 5c51235 into duxlabs-dev:master Nov 1, 2026
3 checks passed
dux-ci Bot pushed a commit that referenced this pull request Nov 1, 2026
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.

2 participants