Skip to content

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

Open
pseudoramdom wants to merge 3 commits into
bitcoin-core:qt6from
pseudoramdom:sidebar-sizeclass
Open

qml: Introduce adaptive sidebar/tab-bar shell driven by size class#690
pseudoramdom wants to merge 3 commits into
bitcoin-core:qt6from
pseudoramdom:sidebar-sizeclass

Conversation

@pseudoramdom

@pseudoramdom pseudoramdom commented May 11, 2026

Copy link
Copy Markdown
Contributor

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 #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

@pseudoramdom

pseudoramdom commented May 11, 2026

Copy link
Copy Markdown
Contributor Author

Work towards #689

@davidgumberg

davidgumberg commented May 12, 2026

Copy link
Copy Markdown
Contributor
image

Very very cool!

@johnny9 johnny9 added this to QML GUI May 14, 2026
@github-project-automation github-project-automation Bot moved this to Open in QML GUI May 14, 2026
@johnny9 johnny9 moved this from Open to Review in QML GUI May 14, 2026

@jarolrod jarolrod left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Contributor Author

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)

Keep ENABLE_TABVIEW_SHELL as the build-time availability gate while
allowing enabled builds to switch between the legacy and adaptive
layouts at runtime.

Add the layout picker under Settings > Display > Developer. Default to
the legacy layout, persist the selection across launches, and apply
changes immediately. Hide the picker and force the legacy layout when
the build-time flag is disabled.

Add coverage for persistence, settings visibility, startup routing, and
runtime layout switching.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Review

Development

Successfully merging this pull request may close these issues.

4 participants