Skip to content

GAUD-10290 - Fix page content and panel size for short content to avoid unnecessary scroll#7201

Draft
svanherk wants to merge 1 commit into
mainfrom
GAUD-10290-Fix-scrolling-header-short-pages
Draft

GAUD-10290 - Fix page content and panel size for short content to avoid unnecessary scroll#7201
svanherk wants to merge 1 commit into
mainfrom
GAUD-10290-Fix-scrolling-header-short-pages

Conversation

@svanherk

Copy link
Copy Markdown
Contributor

This fixes the four vdiff tests I called out here. When content on the page is short, the panels were making it larger than it needed to be and causing an unnecessary scrollbar. So we now give panels a max-height tat only kicks in for long content.

You can see the fixed vdiffs here.

@github-actions

Copy link
Copy Markdown
Contributor

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-7201/

Note

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

Comment thread components/page/page.js
.side-nav-panel,
.supporting-panel {
height: calc(100vh - var(--d2l-page-header-height, 0) - var(--d2l-page-footer-height, 0));
max-height: calc(100vh - var(--d2l-page-header-height, 0) - var(--d2l-page-footer-height, 0));

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.

This fixes the panel being larger than it needed to and causing the scroll.

Comment thread components/page/page.js
Comment on lines +120 to +122
.content.has-panels {
min-height: calc(100vh - var(--d2l-page-header-height-measured, 0px));
}

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.

We need to add this to make sure the panels are still large enough that the divider covers the whole viewport for short content. But we don't want this when there are no panels, or we'll break the floating-button footer functionality.

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