Skip to content

Add IconPicker to New Tab Menu folders in SUI - #19591

Merged
Carlos Zamora (carlos-zamora) merged 6 commits into
mainfrom
dev/cazamor/sui/ntm-icon-picker
Feb 2, 2026
Merged

Carlos Zamora (carlos-zamora) merged 6 commits into
mainfrom
dev/cazamor/sui/ntm-icon-picker

Conversation

@carlos-zamora

@carlos-zamora Carlos Zamora (carlos-zamora) commented Nov 25, 2025 •

Copy link
Copy Markdown
Contributor

Summary of the Pull Request

This PR pulls out the icon picker used in Profiles_Base.xaml to be its own control. Then it's reused as a way to set an icon on folders in the new tab menu.

As a part of pulling out the icon picker into its own control, some minor code-health polish was added (i.e. lazy loading icon types and built in icons).

The new tab menu didn't have a NavigateToPageArgs, so I took the declaration from #19519 and moved it here. I chose to do that instead of creating a NavigateToNewTabMenuArgs since that's more strict and it would be removed as a part of #19519 anyways.

Aside from that, the PR is pretty straightforward.

References and Relevant Issues

Part of #18281

Validation Steps Performed

  • Profile icon picker
    • set none
    • set built-in icon
    • set emoji
    • set file
    • loads icons properly (for all of the scenarios above)
  • New tab menu folder icon picker
    • set none
    • set built-in icon
    • set emoji
    • set file
    • loads icons properly (for all of the scenarios above)

@carlos-zamora

Copy link
Copy Markdown
Contributor Author

Demo

image

@carlos-zamora

This comment was marked as resolved.

@PankajBhojwani PankajBhojwani 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.

Just some minor fixes, looks great!

@microsoft-github-policy-service microsoft-github-policy-service Bot added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Jan 28, 2026
@microsoft-github-policy-service microsoft-github-policy-service Bot removed the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Jan 28, 2026
@carlos-zamora
Carlos Zamora (carlos-zamora) merged commit a449899 into main Feb 2, 2026
20 checks passed
@carlos-zamora
Carlos Zamora (carlos-zamora) deleted the dev/cazamor/sui/ntm-icon-picker branch February 2, 2026 19:35

private:
Editor::NewTabMenuEntryViewModel _draggedEntry{ nullptr };
Editor::IHostedInWindow _windowRoot;

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.

doesn't this cause a reference cycle that will result in MainPage being retained, even after navigating away from the NTM page? or am I wrong

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Urgh. Yeah, you're right. This should be a weak ref. It'll get fixed in the SUI search PR, but I'll open up a PR rn to fix this. Good catch :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants