Skip to content

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

Open
jiripolasek wants to merge 2 commits into
mainfrom
feature/extension-gallery-move-breadcrumbs-show-hide-storyboard-to-xaml
Open

CmdPal: Extension Gallery - Move storyboards used to show/hide breadcrumbs to XAML#47900
jiripolasek wants to merge 2 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 jiripolasek added the Product-Command Palette Refers to the Command Palette utility label May 15, 2026
@jiripolasek jiripolasek mentioned this pull request May 15, 2026
10 tasks
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Product-Command Palette Refers to the Command Palette utility

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants