Skip to content

GAUD-9843 - Skeleton of the panel mixin and the three components#6928

Merged
svanherk merged 33 commits into
mainfrom
GAUD-9843-Add-page-panel-components
May 6, 2026
Merged

GAUD-9843 - Skeleton of the panel mixin and the three components#6928
svanherk merged 33 commits into
mainfrom
GAUD-9843-Add-page-panel-components

Conversation

@svanherk
Copy link
Copy Markdown
Contributor

@svanherk svanherk commented May 6, 2026

This adds the three panel components (d2l-page-main, d2l-page-side-nav, and d2l-page-supporting). Not tied to this being a mixin versus shared styles and helper functions. I think it's kinda hard to see right now which is best when they're so simple.

svanherk and others added 27 commits May 1, 2026 17:58
…real, sticky componets with hardcoded z-indexes
Co-authored-by: Dave Lockhart <dlockhart@users.noreply.github.com>
…65-Flesh-out-demo-page

# Conflicts:
#	components/page/demo/page-component.js
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 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-6928/

Note

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

Base automatically changed from GAUD-9165-Flesh-out-demo-page to main May 6, 2026 18:27
# Conflicts:
#	components/page/demo/page-component.js
#	components/page/page.js
Comment thread components/page/page.js
Comment on lines +47 to 55
.header {
position: relative;
z-index: 15; /* To be over sticky content of our core components */
}

.page.header-sticky .header {
position: sticky;
top: 0;
z-index: 15; /* To be over sticky content of our core components */
}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Instead of this, we could implement one of the strategies @dbatiste describes in this comment, making the panel headers only apply sticky once the navbar has scrolled way. I'm not sure if it's "worth it" to add all that until we run into a problem with this, but also flexible with what others think.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think the stuff added in the headers for these demos could be a bit better, but I've run out of time 😅

@svanherk svanherk marked this pull request as ready for review May 6, 2026 18:56
@svanherk svanherk requested a review from a team as a code owner May 6, 2026 18:56
Copy link
Copy Markdown
Member

@dlockhart dlockhart left a comment

Choose a reason for hiding this comment

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

Starting to come together!

Comment thread components/page/page-panel-mixin.js Outdated
this._slotVisibility = {};
}

_handleSlotVisibilityChange(e) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This I think can be #handleSlotVisibilityChange?

Comment thread components/page/demo/page-component.js Outdated
}

#handleDialogOpen() {
this.shadowRoot.querySelector('#demo-dialog').opened = true;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could have a reactive state _demoDialogOpened that binds to the ?opened of the dialog.


static styles = [pagePanelStyles, css`
.panel-header {
top: var(--d2l-page-header-height, 0);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could also set a variable that the mixin uses to avoid these subclasses knowing much about the internals of the base class.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Not sure what you mean? Like set a different css property with this value like --d2l-page-panel-top-offset?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yeah, or just --d2l-page-panel-top, and this would set that on its :host. Not a big deal.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I need to adjust this/add a few more uses and variables to fix the sticky stuff (next draft PR going up), so we can figure it out there. It's a bit confusing and I don't love what I have

@svanherk svanherk merged commit d4601cf into main May 6, 2026
7 checks passed
@svanherk svanherk deleted the GAUD-9843-Add-page-panel-components branch May 6, 2026 20:53
@d2l-github-release-tokens
Copy link
Copy Markdown

🎉 This PR is included in version 3.243.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants