Skip to content

Fix: V16 Variant breadcrumb wrong after creating a nested document #19492

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 5, 2025

Conversation

madsrasmussen
Copy link
Contributor

@madsrasmussen madsrasmussen commented Jun 5, 2025

When creating a new nested document the breadcrumb is wrong after the document is created.

Before fix:

Screen.Recording.2025-06-05.at.16.31.53.mov

After fix:

Screen.Recording.2025-06-05.at.16.33.49.mov

@Copilot Copilot AI review requested due to automatic review settings June 5, 2025 14:30
Copy link
Contributor

@Copilot 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 addresses an issue where creating a new nested document did not update the variant breadcrumb correctly until a page refresh.

  • Replaces conditional slicing with filtering based on the current item's unique ID
  • Adds a guard for #workspaceContext before filtering out the current item from the breadcrumb structure
Comments suppressed due to low confidence (1)

src/Umbraco.Web.UI.Client/src/packages/core/workspace/components/workspace-breadcrumb/workspace-variant-menu-breadcrumb/workspace-variant-menu-breadcrumb.element.ts:66

  • Consider adding a unit test for this new filter logic to ensure breadcrumbs exclude the current item when creating nested documents.
this._structure = value.filter((structureItem) => structureItem.unique !== unique);

Copy link
Member

@leekelleher leekelleher left a comment

Choose a reason for hiding this comment

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

Thanks for spotting this @madsrasmussen!

Tested out, works as described. 🚀

@leekelleher leekelleher merged commit 82a063b into release/16.0 Jun 5, 2025
24 checks passed
@leekelleher leekelleher deleted the v16/hotfix/fix-breadcrumb-after-create branch June 5, 2025 16:05
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.

2 participants