[CmdPal] Add tabbed pages to Command Palette#49429
Open
michaeljolley wants to merge 4 commits into
Open
Conversation
Introduce an additive TabbedPage container for Command Palette. An extension can expose an ITabbedPage that renders a strip of tabs, where each tab is its own independent IPage (list, dynamic list or content page in v1) with its own title, optional icon and an observable count badge. SDK (additive, ExtensionsContract v1): - New ITab and ITabbedPage interfaces in the IDL. - Toolkit Tab and TabbedPage helpers. TabbedPage implements both ITabbedPage and IContentPage so older hosts fall back to an overridable "update Command Palette" message. Host: - TabViewModel and TabbedPageViewModel: lazy per-tab child creation and caching, shared search forwarded to the active tab, observable badges, dynamic tab sets that preserve the active tab by id, and per-tab loading state. - Factory routes ITabbedPage before IContentPage. - TabbedPage view: tab strip, per-tab progress bar under the strip, inner frame reusing existing page views, Ctrl+Tab / Ctrl+Shift+Tab cycling, and an unsupported-tab placeholder. Tests and sample: - Toolkit and view model unit tests. - A sample tabbed page in the SamplePages extension with async badges. Co-authored-by: Copilot App <[email protected]> Copilot-Session: de7af6c2-3f22-4b85-ba1c-e45bf0361f1a
…ve tab Reworks the TabbedPage tab strip into a pivot-underline header: the selected-tab accent color fills the whole tab area, selection no longer changes a tab's background, the selected indicator moved from the left edge to a bottom underline, the selected tab label is bold, and inactive labels use the secondary (subtitle/placeholder) foreground. Also makes the shared search box activate or deactivate based on the active tab instead of a static "any tab is searchable" value. HasSearchBox now reflects the active tab's page type (list, dynamic list or parameters), is re-raised on every tab switch so the shell re-evaluates search-box visibility, and follows a child that revises its searchability after async init. Tests updated to cover the active-tab semantics and a tab-switch transition. Co-authored-by: Copilot App <[email protected]> Copilot-Session: de7af6c2-3f22-4b85-ba1c-e45bf0361f1a
Gives the tab strip a distinct layered background with a bottom divider so it reads as a header band, sets the inactive (Normal) tab label to the secondary foreground via a visual state, and adds a small top margin above the active tab content. Co-authored-by: Copilot App <[email protected]> Copilot-Session: de7af6c2-3f22-4b85-ba1c-e45bf0361f1a
The shell SearchBar only renders a typeable text box for a concrete list or parameters page, keyed on its CurrentPageViewModel. It was bound to the tabbed page container, which matched no case, so no text box ever appeared and users could not search a list/dynamic-list tab. Add ShellViewModel.SearchHostPage, which sees through a TabbedPageViewModel to its active child, and point the SearchBar and FiltersDropDown at it. SearchHostPage is re-raised on tab switch (ActiveChild change) and on page navigation, so the text box and filters follow the active tab. Co-authored-by: Copilot App <[email protected]> Copilot-Session: de7af6c2-3f22-4b85-ba1c-e45bf0361f1a
michaeljolley
requested review from
jiripolasek and
zadjii-msft
and removed request for
jiripolasek
July 21, 2026 15:17
michaeljolley
marked this pull request as ready for review
July 21, 2026 15:17
Jay-o-Way
reviewed
Jul 25, 2026
Jay-o-Way
left a comment
Collaborator
There was a problem hiding this comment.
Looks like you created a lot from scratch. Was there no more existing controls to use? Just thinking...
|
|
||
| <Page.Resources> | ||
| <ResourceDictionary> | ||
| <converters:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter" /> |
Collaborator
There was a problem hiding this comment.
You don't need this in WinUI (3)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new Tabbed Pages capability to Command Palette. An extension can expose an
ITabbedPagethat renders as a strip of tabs, where each tab is its own independentIPage-derived page (list, dynamic list, or content page). For example, a GitHub extension could surface Issues, Pull Requests, and a Readme as separate tabs, each backed by whatever page type fits that content.What's included
SDK (
Microsoft.CommandPalette.Extensions)ITabandITabbedPageinterfaces in the IDL.Toolkit (
Microsoft.CommandPalette.Extensions.Toolkit)TabandTabbedPagehelper base classes.TabbedPagealso implementsIContentPageso older hosts that don't understand tabbed pages render a static "please update Command Palette" message instead of nothing.Host (
Microsoft.CmdPal.UI/Microsoft.CmdPal.UI.ViewModels)TabViewModel(per-tab title / icon / badge) andTabbedPageViewModel(host view model).TabbedPage.xamlhost view with a pivot-underline tab strip, a per-tab progress bar placed under the tabs, and an inner frame that hosts the active tab's page.Sample & tests
SampleTabbedPagein the SamplePages extension (Issues / Pull Requests / Readme, with async badge counts), registered in the samples list.Notes
Videos? Videos!
Screen.Recording.2026-07-20.233940.mp4