Skip to content

CmdPal: Extension Gallery - Move storyboards used to show/hide breadcrumbs to XAML - #47900

Merged
Michael Jolley (michaeljolley) merged 3 commits into
mainfrom
feature/extension-gallery-move-breadcrumbs-show-hide-storyboard-to-xaml
May 17, 2026
Merged

Michael Jolley (michaeljolley) merged 3 commits into
mainfrom
feature/extension-gallery-move-breadcrumbs-show-hide-storyboard-to-xaml

Conversation

@jiripolasek

Copy link
Copy Markdown
Collaborator

Summary of the Pull Request

This PR moves storyboard that handles showing and hiding breadcrumbs in Settings windows to a XAML resources.

PR Checklist

  • Closes: #xxx
  • Communication: I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected
  • Tests: Added/updated and all pass
  • Localization: All end-user-facing strings can be localized
  • Dev docs: Added/updated
  • New binaries: Added on the required places
  • Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx

Detailed Description of the Pull Request / Additional comments

Validation Steps Performed

@jiripolasek Jiří Polášek (jiripolasek) added the Product-Command Palette Refers to the Command Palette utility label May 15, 2026

Copilot AI 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.

Pull request overview

This PR refactors the CmdPal settings window breadcrumb show/hide animations by moving the storyboard definitions from code-behind into SettingsWindow.xaml resources, and updating navigation handling to decide whether breadcrumbs should be visible per page.

Changes:

  • Added XAML Storyboard resources for breadcrumb fade-in and fade-out (including visibility collapse).
  • Updated SettingsWindow.xaml.cs to fetch and use those storyboard resources instead of constructing animations in code.
  • Refactored navigation logic to compute shouldShowBreadcrumb and invoke show/hide once per navigation.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/modules/cmdpal/Microsoft.CmdPal.UI/Settings/SettingsWindow.xaml.cs Uses XAML-defined storyboards for breadcrumb transitions and refactors breadcrumb visibility logic on navigation.
src/modules/cmdpal/Microsoft.CmdPal.UI/Settings/SettingsWindow.xaml Adds storyboard resources for breadcrumb fade-in/fade-out and collapsing visibility.

Comment on lines 336 to 346
private void ShowBreadcrumb()
{
_breadcrumbStoryboard?.Stop();
_breadcrumbStoryboard = null;
_breadcrumbFadeInStoryboard.Stop();
_breadcrumbFadeOutStoryboard.Stop();

if (BreadcrumbContainer.Visibility == Visibility.Collapsed)
{
BreadcrumbContainer.Opacity = 0;
BreadcrumbContainer.Visibility = Visibility.Visible;

var fadeIn = new DoubleAnimation
{
To = 1,
Duration = new Duration(TimeSpan.FromMilliseconds(250)),
EasingFunction = new CubicEase { EasingMode = EasingMode.EaseOut },
};
Storyboard.SetTarget(fadeIn, BreadcrumbContainer);
Storyboard.SetTargetProperty(fadeIn, "Opacity");

_breadcrumbStoryboard = new Storyboard();
_breadcrumbStoryboard.Children.Add(fadeIn);
_breadcrumbStoryboard.Completed += (_, _) => _breadcrumbStoryboard = null;
_breadcrumbStoryboard.Begin();
_breadcrumbFadeInStoryboard.Begin();
}
@michaeljolley

Copy link
Copy Markdown
Contributor

Hey Jiří Polášek (@jiripolasek), you'll need to merge main to get the bad stuff out of this and any other PRs of yours that are failing CI.

@michaeljolley
Michael Jolley (michaeljolley) merged commit 75ac152 into main May 17, 2026
15 checks passed
Mike Griese (zadjii-msft) pushed a commit that referenced this pull request May 18, 2026
<!-- Enter a brief description/summary of your PR here. What does it
fix/what does it change/how was it tested (even manually, if necessary)?
-->
## Summary of the Pull Request

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

This PR reverts #47900: it causes an exception in the Release+AOT build
configuration when retrieving a storyboard from XAML resources and
casting it to a local field.

- [x] Closes: #47970 
<!-- - [ ] Closes: #yyy (add separate lines for additional resolved
issues) -->
- [ ] **Communication:** I've discussed this with core contributors
already. If the work hasn't been agreed, this work might be rejected
- [ ] **Tests:** Added/updated and all pass
- [ ] **Localization:** All end-user-facing strings can be localized
- [ ] **Dev docs:** Added/updated
- [ ] **New binaries:** Added on the required places
- [ ] [JSON for
signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json)
for new binaries
- [ ] [WXS for
installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs)
for new binaries and localization folder
- [ ] [YML for CI
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml)
for new test projects
- [ ] [YML for signed
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml)
- [ ] **Documentation updated:** If checked, please file a pull request
on [our docs
repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys)
and link it here: #xxx

<!-- Provide a more detailed description of the PR, other things fixed,
or any additional comments/features here -->
## Detailed Description of the Pull Request / Additional comments

<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed
@crutkas
Clint Rutkas (crutkas) deleted the feature/extension-gallery-move-breadcrumbs-show-hide-storyboard-to-xaml branch May 25, 2026 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

0.100 Product-Command Palette Refers to the Command Palette utility

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants