Skip to content

feat: Add external breadcrumbs widget consumer - #4984

Open
ajsuvarna6 wants to merge 4 commits into
cloudscape-design:mainfrom
ajsuvarna6:feature/widget-external-breadcrumbs
Open

ajsuvarna6 wants to merge 4 commits into
cloudscape-design:mainfrom
ajsuvarna6:feature/widget-external-breadcrumbs

Conversation

@ajsuvarna6

@ajsuvarna6 ajsuvarna6 commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Description

Adds a widget API consumer channel that allows Global Navigation or another external container to render App Layout breadcrumbs without requiring console teams to update their bundled App Layout or BreadcrumbGroup components.

registerBreadcrumbsConsumer receives slot-based and discovered breadcrumb updates, preserves the producing BreadcrumbGroup handlers, and makes App Layout yield rendering while the consumer is registered. Unregistering the consumer restores rendering in App Layout. The consumer registry is shared through the highest accessible same-origin window so separate console roots can use one consumer.

A console bootstrap script can reserve ownership before Global Navigation registers by setting:

window[Symbol.for('awsui-widget-api-external-owned-breadcrumbs')] = true;

This prevents the widgetized App Layout toolbar from rendering breadcrumbs during late consumer loading. The reservation remains active until the script clears the boolean. If the App Layout widget itself loads asynchronously, the console-bundled pre-widget skeleton can still render breadcrumbs until the widget becomes active.

The runtime implementation is contained in widget-delivered App Layout and internal widget files. Five development pages cover late consumer loading, startup reservation, multiple App Layouts, separate iframe roots, and router-style hidden iframe instances.

Related links, issue #, if available: n/a

How has this been tested?

  • Added focused unit coverage for slot and discovered breadcrumbs, updates, event handlers, late registration, startup reservation, custom slot content, nested layouts, duplicate consumers, and same-origin frame sharing.
  • Added seven browser integration cases covering consumer ownership transfer, producer updates, startup reservation, multiple layouts, iframe roots, hidden mounted layouts, and restoration after consumer removal.
  • Ran focused unit suites: 32 tests passed.
  • Ran App Layout SSR suite: 5 tests passed.
  • Ran the browser integration suite: 7 tests passed.
  • Ran ESLint and git diff --check.
  • Ran npm run quick-build and npm run build.
  • Production size limits passed; the widget bundle remains 1.43 MB against the 1.45 MB limit.

Reviewers can use these pages with ?visualRefresh=true&appLayoutToolbar=true:

  • app-layout/global-nav-breadcrumbs
  • app-layout/global-nav-breadcrumbs-reserved
  • app-layout/global-nav-breadcrumbs-multi-layout
  • app-layout/global-nav-breadcrumbs-multi-instance
  • app-layout/global-nav-breadcrumbs-hidden-instances-iframe
Review checklist

The following items are to be evaluated by the author(s) and the reviewer(s).

Correctness

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@ajsuvarna6
ajsuvarna6 requested a review from a team as a code owner September 9, 2026 05:54
@ajsuvarna6
ajsuvarna6 requested review from avinashbot and removed request for a team September 9, 2026 05:54

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant