WIP: qml: Introduce adaptive sidebar/tab-bar shell driven by size class #690

Draft
pseudoramdom wants to merge 3 commits from sidebar-sizeclass into qt6 AGit
pseudoramdom commented 2026-05-11 18:17:33 +00:00 (Migrated from github.com)

Summary

Introduces an adaptive navigation shell - a single declarative tree of tabs that renders as a persistent sidebar at regular widths and a bottom tab bar at compact widths, swapping automatically at runtime based on the window size.

Gated behind the -DENABLE_TABVIEW_SHELL=ON CMake flag

Related to https://github.com/bitcoin-core/gui-qml/issues/689

Details

  • SizeClass - a small singleton that turns the live window dimensions into one of two coarse buckets: compact (narrow) and regular (wide).
  • Tab - represents a single navigation destination. Each tab carries a title, an icon
  • TabSection - groups related tabs together. In the sidebar, sections render with a header above their tabs to provide visual grouping
  • TabView - the adaptive shell. It accepts a tree of tabs (and sections of tabs) and decides at runtime whether to render them as a left sidebar or a bottom tab bar based on the window's size class

TabView API at a glance

TabView {
    TabSection {
        title: qsTr("Node")
        Tab { title: "Node";    iconSource: "..."; contentComponent: Component { NodeRunner {} } }
        Tab { title: "Peers";   displayModes: TabView.Sidebar; ... }
        Tab { title: "Network"; displayModes: TabView.Sidebar; ... }
    }
    TabSection {
        title: qsTr("Wallet")
        displayModes: TabView.Sidebar
        model: walletListModel
        delegate: Tab {
            required property string name
            title: name
            onSelected: walletController.setSelectedWallet(name)
            contentComponent: Component { WalletContainer {} }
        }
        Tab { title: "Add Wallet"; iconSource: "..."; actionOnly: true; onTriggered: addWalletPopup.open() }
    }
    Tab { title: qsTr("Settings"); pinToBottom: true; contentComponent: Component { NodeSettings {} } }
}

Screenshots

Sidebar

Screenshot 2026-05-11 at 10 39 11 AM Screenshot 2026-05-11 at 10 39 15 AM Screenshot 2026-05-11 at 10 39 18 AM Screenshot 2026-05-11 at 10 39 25 AM Screenshot 2026-05-11 at 10 39 29 AM

Tabbar

Screenshot 2026-05-11 at 10 39 36 AM Screenshot 2026-05-11 at 10 39 35 AM Screenshot 2026-05-11 at 10 39 32 AM
## Summary Introduces an adaptive navigation shell - a single declarative tree of tabs that renders as a **persistent sidebar** at regular widths and a **bottom tab bar** at compact widths, swapping automatically at runtime based on the window size. Gated behind the `-DENABLE_TABVIEW_SHELL=ON` CMake flag Related to https://github.com/bitcoin-core/gui-qml/issues/689 ## Details - **SizeClass** - a small singleton that turns the live window dimensions into one of two coarse buckets: **compact** (narrow) and **regular** (wide). - **Tab** - represents a single navigation destination. Each tab carries a title, an icon - **TabSection** - groups related tabs together. In the sidebar, sections render with a header above their tabs to provide visual grouping - **TabView** - the adaptive shell. It accepts a tree of tabs (and sections of tabs) and decides at runtime whether to render them as a left sidebar or a bottom tab bar based on the window's size class ### TabView API at a glance ```qml TabView { TabSection { title: qsTr("Node") Tab { title: "Node"; iconSource: "..."; contentComponent: Component { NodeRunner {} } } Tab { title: "Peers"; displayModes: TabView.Sidebar; ... } Tab { title: "Network"; displayModes: TabView.Sidebar; ... } } TabSection { title: qsTr("Wallet") displayModes: TabView.Sidebar model: walletListModel delegate: Tab { required property string name title: name onSelected: walletController.setSelectedWallet(name) contentComponent: Component { WalletContainer {} } } Tab { title: "Add Wallet"; iconSource: "..."; actionOnly: true; onTriggered: addWalletPopup.open() } } Tab { title: qsTr("Settings"); pinToBottom: true; contentComponent: Component { NodeSettings {} } } } ``` ## Screenshots ### Sidebar <img width="1033" height="1178" alt="Screenshot 2026-05-11 at 10 39 11 AM" src="https://git.fish.foo/attachments/de3ff747-4251-4bcb-ac94-52963aac4052" /> <img width="1033" height="1178" alt="Screenshot 2026-05-11 at 10 39 15 AM" src="https://git.fish.foo/attachments/0c87e4f5-3158-487d-8625-d343c49155be" /> <img width="1033" height="1178" alt="Screenshot 2026-05-11 at 10 39 18 AM" src="https://git.fish.foo/attachments/45b3ee96-304c-41da-b29d-ba88f3c08359" /> <img width="1033" height="1178" alt="Screenshot 2026-05-11 at 10 39 25 AM" src="https://git.fish.foo/attachments/b46b28f8-603b-4f26-af50-ae573457e1a2" /> <img width="1033" height="1178" alt="Screenshot 2026-05-11 at 10 39 29 AM" src="https://git.fish.foo/attachments/861f564b-72de-48e4-a197-4c62258cd20a" /> ### Tabbar <img width="662" height="1178" alt="Screenshot 2026-05-11 at 10 39 36 AM" src="https://git.fish.foo/attachments/5d86bc69-c92a-477a-9df0-896a2127925b" /> <img width="662" height="1178" alt="Screenshot 2026-05-11 at 10 39 35 AM" src="https://git.fish.foo/attachments/4016a4de-1839-42e1-b817-da1cd7777019" /> <img width="662" height="1178" alt="Screenshot 2026-05-11 at 10 39 32 AM" src="https://git.fish.foo/attachments/14aeb7b1-3d5d-4163-bac6-6b5ec47340d4" />
pseudoramdom commented 2026-05-11 18:17:55 +00:00 (Migrated from github.com)
Work towards https://github.com/bitcoin-core/gui-qml/issues/689
davidgumberg commented 2026-05-12 21:21:37 +00:00 (Migrated from github.com)
image

Very very cool!

<img width="1901" height="1019" alt="image" src="https://git.fish.foo/attachments/89a3a8f3-562f-4a0a-8415-0d3c9fa4636c" /> Very very cool!
jarolrod (Migrated from github.com) reviewed 2026-05-14 04:33:22 +00:00
jarolrod (Migrated from github.com) left a comment

I realize this is a bit away and experimental, but noting a few issues - that would need both design and code work

  • No (apparent) ability to create a new wallet when in the collapsed mode
  • Node collapsed view can't go into the peers or network traffic page
  • no way to switch wallets in collapsed view
  • If on tab view on wallet selected, and go to collapsed view, the bottom bar wallet option isn't selected
  • if on peers or network traffic page in tab view and scale to collapse down, node isn't selected
I realize this is a bit away and experimental, but noting a few issues - that would need both design and code work - No (apparent) ability to create a new wallet when in the collapsed mode - Node collapsed view can't go into the peers or network traffic page - no way to switch wallets in collapsed view - If on tab view on wallet selected, and go to collapsed view, the bottom bar wallet option isn't selected - if on peers or network traffic page in tab view and scale to collapse down, node isn't selected
pseudoramdom commented 2026-05-14 05:14:27 +00:00 (Migrated from github.com)

I realize this is a bit away and experimental, but noting a few issues - that would need both design and code work

All valid issues :)
You're correct, this is indeed experimental. I had started a thread with BitcoinDesign folks and wanted to show a working proof-of-concept of the idea.

  • No (apparent) ability to create a new wallet when in the collapsed mode
  • no way to switch wallets in collapsed view

My original intention was to just include the shell, but one thing led to another and I ended up adding the wallet container. But I got as far as only implementing that in the sidebar layout and left it incomplete for the compact view. (PR size would also grow)

Since the changes are additive and I plan on continuing to work on this behind the build flag as more features land.

(And nice to meet you here @jarolrod)

> I realize this is a bit away and experimental, but noting a few issues - that would need both design and code work All valid issues :) You're correct, this is indeed experimental. I had started a thread with BitcoinDesign folks and wanted to show a working proof-of-concept of the idea. > * No (apparent) ability to create a new wallet when in the collapsed mode > * no way to switch wallets in collapsed view My original intention was to just include the shell, but one thing led to another and I ended up adding the wallet container. But I got as far as only implementing that in the sidebar layout and left it incomplete for the compact view. (PR size would also grow) Since the changes are additive and I plan on continuing to work on this behind the build flag as more features land. (And nice to meet you here @jarolrod)
Sign in to join this conversation.
No description provided.