Skip to content

dock: reorder widgets from settings in the dock's real order - #4083

Merged
bbedward merged 1 commit into
duxlabs-dev:masterfrom
KadirJeager:feat/dock-widget-reorder
Nov 2, 2026
Merged

bbedward merged 1 commit into
duxlabs-dev:masterfrom
KadirJeager:feat/dock-widget-reorder

Conversation

@KadirJeager

Copy link
Copy Markdown
Contributor

Description

The dock lays out its widgets by the saved order (widget ids and pin:<appId> units written when you drag in the dock's edit mode), but Settings › Dock › Apps and widgets listed the widgets array. Once you had dragged something in the dock, the two disagreed, and the settings list could not be reordered at all.

The list now shows the dock's real order (DockConfig.widgetOrder) and is a SettingsReorderList: drag the handle or use Ctrl+Up/Down. DockConfig.reorderWidgets writes the new sequence to both widgets and order. Pinned apps keep riding with the widget right after them, so moving the Apps widget keeps its pins in front of it; pins before any other widget move with that widget, and trailing pins stay at the end.

tests/dock-units.test.mjs: a matrix for widgetOrder (saved order vs. none) and reorderWidgets (moving Apps with its pins, interleaved pins, no saved order, a partial id list). Every case also checks that widgetOrder reads back the written order. The two failing tests in tests/ (audio profile list/set) fail on master as well.

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

None found.

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 (no new strings)
  • Go changes: ran make fmt, added/updated tests, make test passes, and go mod tidy is clean (no Go changes)
  • 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

Tested on a v2.0.0-based build on Hyprland: reordering by drag in settings moves the widgets in the dock and survives a shell restart. DockConfig.js was also run in Quickshell's JS engine, not only Node.

🤖 Generated with Claude Code

The dock lays out widgets by its saved order, but the settings list showed
the widgets array, so the two could disagree and there was no way to reorder
there. The list now follows the saved order and can be dragged or moved with
Ctrl+Up/Down. Pinned apps move with the widget after them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copilot AI balanced review requested due to automatic review settings November 2, 2026 14:35

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@github-actions github-actions Bot added feature fix ui Quickshell UI under quickshell/ labels Nov 2, 2026
@bbedward

bbedward commented Nov 2, 2026

Copy link
Copy Markdown
Member

/claude review

@claude

claude Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Claude review

No issues found.
Checked: widgetOrder/reorderWidgets against unitList pin-slot refill and DockBody.reorderUnits, DReorderList reordered-indices contract and SettingsReorderRow required props, updateDockConfig normalization, deprecated shims, i18n, and the new test matrix. Model: claude-opus-5-5.

@bbedward
bbedward merged commit fcfa552 into duxlabs-dev:master Nov 2, 2026
3 checks passed
purian23 pushed a commit that referenced this pull request Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature fix ui Quickshell UI under quickshell/

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants