Skip to content

feat(devtools): drag to reorder the visible sidebar tabs - #8833

Merged
wmertens merged 5 commits into
QwikDev:build/v2from
Aejkatappaja:feat/customizable-sidebar-tabs-dnd
Jul 14, 2026
Merged

wmertens merged 5 commits into
QwikDev:build/v2from
Aejkatappaja:feat/customizable-sidebar-tabs-dnd

Conversation

@Aejkatappaja

@Aejkatappaja Aejkatappaja commented Jul 13, 2026 •

Copy link
Copy Markdown
Member

Context

PR 4 (final) of the Customizable Sidebar Tabs feature, stacked on #8832 (More panel) → #8831 (Customize overlay) → #8826 (model). As a fork branch it also carries the parent commits; review/merge the chain in order and GitHub reduces this diff to the drag-reorder commit. Review the top commit feat(devtools): drag to reorder the visible sidebar tabs.

Change

  • The Visible in Sidebar rows in the Customize overlay are now draggable (grip handle, native HTML5 DnD). Dragging reorders the list live; Apply commits the new order to the sidebar and persists it. Only visible tabs reorder; available tabs are untouched.
  • Adds a pure reorderVisibleTabs(ids, draggedId, targetId) helper (unit tested).
  • Polish: grip handle, a "Drag to reorder" hint, a dimmed dragged row, and the overlay card now uses the shared glass-panel utility (fixing the earlier no-op glass-bg).

Verification

  • tsc on the devtools UI passes (0 errors); no as casts.
  • sidebar-tabs.unit.ts covers reorderVisibleTabs (both directions, same-tab and target-not-in-list no-ops) alongside the existing model/persistence tests (13 total).
  • Built through the Qwik optimizer and exercised in the docs host: dragging a visible row reorders live, Apply updates the sidebar order, and the order survives reload.
  • eslint (incl. eslint-plugin-qwik) passes on the touched files.

This completes the Customize Sidebar Tabs feature (model → overlay → More panel → drag reorder).

References

QwikDev project board, feature "Support Customizable Sidebar Tabs".

…s list

Add an ordered visibleTabIds list to devtools state (defaulting to every tab in
registry order) and render the sidebar from it via a getVisibleTabs helper that
resolves ids and applies the extension vite-only filter.

Behavior-preserving foundation for the upcoming customizable sidebar tabs; the
default keeps the sidebar identical to today.
Add a sidebar entry (Vite overlay only) that opens a Customize Tabs overlay: a
Visible in Sidebar list and an Available in More Panel list with checkboxes to
choose which tools show. Edits stay pending until Apply, which persists the
visible-tabs list to localStorage; Cancel or closing discards them.
Add a More button to the sidebar bottom actions that opens a popover listing the
hidden tabs; selecting one activates it, so hiding a tab no longer makes it
unreachable. The button shows only when tabs are hidden and highlights when a
hidden tab is active. Extract a shared SidebarIconButton and a getAvailableTabs
helper reused by the Customize overlay.
Make the Visible in Sidebar rows draggable (grip handle, native HTML5 DnD) to
reorder them live in the Customize overlay; Apply commits the new order to the
sidebar and persists it. Adds a pure reorderVisibleTabs helper and switches the
overlay card to the shared glass-panel surface.
@Aejkatappaja
Aejkatappaja requested a review from a team as a code owner July 13, 2026 23:39
@changeset-bot

changeset-bot Bot commented Jul 13, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 567c8ae

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@qwik.dev/devtools Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Jul 13, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@qwik.dev/core

npm i https://pkg.pr.new/QwikDev/qwik/@qwik.dev/core@8833

@qwik.dev/router

npm i https://pkg.pr.new/QwikDev/qwik/@qwik.dev/router@8833

eslint-plugin-qwik

npm i https://pkg.pr.new/QwikDev/qwik/eslint-plugin-qwik@8833

create-qwik

npm i https://pkg.pr.new/QwikDev/qwik/create-qwik@8833

@qwik.dev/optimizer

npm i https://pkg.pr.new/QwikDev/qwik/@qwik.dev/optimizer@8833

@qwik.dev/devtools

npm i https://pkg.pr.new/QwikDev/qwik/@qwik.dev/devtools@8833

commit: 567c8ae

@github-actions

github-actions Bot commented Jul 13, 2026 •

Copy link
Copy Markdown
Contributor
built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
qwik-docs ✅ Ready (View Log) Visit Preview 567c8ae

@wmertens wmertens left a comment

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.

LGTM

Comment on lines +98 to +101
preventdefault:dragover
preventdefault:drop
onDragOver$={sync$((event: DragEvent) => event.preventDefault())}
onDrop$={sync$((event: DragEvent) => event.preventDefault())}

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.

with the sync$, the attributes aren't needed any more. But you can fix this another time.

@wmertens
wmertens merged commit 76f587b into QwikDev:build/v2 Jul 14, 2026
48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants