Skip to content

PageNavHeader: lazy-load popover/layer resources when menu is not provided #264

Closed

Description

@cixzhang

Context

XDSPageNavHeader currently imports useXDSPopover eagerly, even when the menu prop is not provided. This means the full popover/layer bundle is loaded for every page nav header, even simple ones that are just static text or a link.

Proposal

Lazy-load the popover resources so they're only loaded when menu is actually provided. See XDSText for an example of lazy loading layer resources:

const LazyXDSTooltip = lazy(() =>
  import('../Layer/XDSTooltip').then(mod => ({default: mod.XDSTooltip})),
);

References

Activity

  1. added
    enhancement
    on Feb 21, 2026
  2. cixzhang commented on Mar 8, 2026

    @cixzhang
    ContributorAuthor

    Component renamed to XDSSideNavHeading (#527). Re-evaluate lazy loading separately if needed.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions