Skip to content

GAUD-9883: move navigation into core#6950

Open
dlockhart wants to merge 2 commits intomainfrom
GAUD-9883/move-navigation
Open

GAUD-9883: move navigation into core#6950
dlockhart wants to merge 2 commits intomainfrom
GAUD-9883/move-navigation

Conversation

@dlockhart
Copy link
Copy Markdown
Member

@dlockhart dlockhart commented May 7, 2026

This ports/copies the labs navigation and labs band components into core. There are stories to migrate existing uses of those over to this and ultimately remove them.

Most of the code was copied as it was, but I've made a few changes:

  1. The component is now called <d2l-page-header-custom> as discussed elsewhere, and in alignment with the other <d2l-page-*> components. Both the upcoming <d2l-page-header-immersive> and <d2l-page-header-lms> will leverage this under the covers.
  2. The band of colour is now integrated into the header. There are only a few uses of the Labs band and they should be able to migrate to this, or worst case we may have one place in the LMS that renders a 4px tall line. I think it's worth it to amalgamate.
  3. The <d2l-labs-navigation-main-header> and <d2l-labs-navigation-main-footer> have been replaced by a "top" and "bottom" slot. In doing so, the header's "left" and "right" slots are gone. They seemed arbitrary (why not in the footer? why not 3 areas? 4?), and can be re-created in the LMS navbar and immersive navbar and any other implementation of the header that wants them.

I haven't copied the vdiffs due to the above changes and ended up making a fair number of improvements and additions to them (like the band org tabs).

More comments inline.

}

#renderFullNav() {
// Update with navigation components once available
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This will still get tweaks a bit since core can't reference the eventual LMS navbar in lms-core, but we can at least remove a lot of this.

}

#renderImmersiveNav() {
// Update with navigation components once available
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This WILL get replaced by the real immersive navbar soon, but this gets us a bit closer.

{ detail: { pointToCenter: selectedTab.offsetLeft + (selectedTab.offsetWidth / 2) }, bubbles: true, composed: true }
)
);
await nextFrame();
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The scroll happens in an animation frame, so this was necessary.

tabs.dispatchEvent(
new CustomEvent(
'd2l-page-band-slot-scroll-request',
{ detail: { pointToCenter: selectedTab.offsetLeft + (selectedTab.offsetWidth / 2) }, bubbles: true, composed: true }
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is almost identical to what org tabs does.

overflow-y: hidden;
scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I added this block because the "smooth" scroll was requiring ~500ms delay in the vdiffs. Seems like a good compromise!

@dlockhart dlockhart force-pushed the GAUD-9883/move-navigation branch from efd79ab to 9b7caa6 Compare May 7, 2026 20:55
@dlockhart dlockhart force-pushed the GAUD-9883/move-navigation branch from 9b7caa6 to f099bdb Compare May 7, 2026 21:16
@dlockhart dlockhart force-pushed the GAUD-9883/move-navigation branch from f099bdb to 02d05ee Compare May 7, 2026 21:23
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 7, 2026

Thanks for the PR! 🎉

We've deployed an automatic preview for this PR - you can see your changes here:

URL https://live.d2l.dev/prs/BrightspaceUI/core/pr-6950/

Note

The build needs to finish before your changes are deployed.
Changes to the PR will automatically update the instance.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@dlockhart dlockhart marked this pull request as ready for review May 7, 2026 21:43
@dlockhart dlockhart requested a review from a team as a code owner May 7, 2026 21:43
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.

2 participants