Skip to content

fix: make docs page wrapper take full height#7025

Merged
Josh-Cena merged 2 commits into
mainfrom
lex111/iss7018
Mar 27, 2022
Merged

fix: make docs page wrapper take full height#7025
Josh-Cena merged 2 commits into
mainfrom
lex111/iss7018

Conversation

@lex111

@lex111 lex111 commented Mar 26, 2022

Copy link
Copy Markdown
Contributor

Motivation

Fixes #7018, broken as result changes in https://github.com/facebook/docusaurus/pull/6925/files#diff-efc286976b85125e3056044ed1ef259e5794477ab266e4c6207a68d795f76b4a

Note: this bug will be noticeable if the content area column on the right is smaller by height than the sidebar.

I had to add back the docs-wrapper class as it was before, since I guess that's the only available way to make things work.

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

Create empty Markdown page or via dev tools try to empty content area on any existent page -- the sidebar should be stretched to the footer.

Related PRs

@lex111 lex111 added the pr: bug fix This PR fixes a bug in a past release. label Mar 26, 2022
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Mar 26, 2022
@netlify

netlify Bot commented Mar 26, 2022

Copy link
Copy Markdown

[V2]

Name Link
🔨 Latest commit 1bc5884
🔍 Latest deploy log https://app.netlify.com/sites/docusaurus-2/deploys/62401b8566a1df0008ea76c0
😎 Deploy Preview https://deploy-preview-7025--docusaurus-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@github-actions

github-actions Bot commented Mar 26, 2022

Copy link
Copy Markdown

⚡️ Lighthouse report for the changes in this PR:

Category Score
🔴 Performance 40
🟢 Accessibility 100
🟢 Best practices 92
🟢 SEO 100
🟢 PWA 90

Lighthouse ran on https://deploy-preview-7025--docusaurus-2.netlify.app/

@github-actions

github-actions Bot commented Mar 26, 2022

Copy link
Copy Markdown

Size Change: +19 B (0%)

Total Size: 806 kB

ℹ️ View Unchanged
Filename Size Change
website/.docusaurus/globalData.json 49.9 kB 0 B
website/build/assets/css/styles.********.css 105 kB +19 B (0%)
website/build/assets/js/main.********.js 613 kB 0 B
website/build/index.html 38.4 kB 0 B

compressed-size-action

@Josh-Cena Josh-Cena left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

That's also what I figured need to happen 👍 We have too many class names on the html element, and docs-wrapper, docs-doc-page, plugin-docs seem exactly equivalent in all cases. It seems beneficial to at least have something that targets the wrapper element instead. Not sure if it goes against @slorber's intention though

@lex111

lex111 commented Mar 27, 2022

Copy link
Copy Markdown
Contributor Author

I agree with you, it's even more strange to see the class containing of "wrapper" added to the root element of a page. Such classes have no place in the html element, and so they should be removed from there later. For now, I have changed the original fix to keep better consistent with #6925.

@Josh-Cena

Copy link
Copy Markdown
Collaborator

Thanks, I think we can move forward from here

@Josh-Cena Josh-Cena changed the title fix: make page wrapper take full height fix: make docs page wrapper take full height Mar 27, 2022
@Josh-Cena
Josh-Cena merged commit 3948668 into main Mar 27, 2022
@Josh-Cena
Josh-Cena deleted the lex111/iss7018 branch March 27, 2022 08:20
/>
<HtmlClassNameProvider
className={clsx(
// TODO: it should be removed from here

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

change looks fine

I don't think the top-level class should be removed because it's a stable one meant to be used for custom CSS targeting: one identity all the pages of the docs plugin, the other identity a specific page of the docs plugin

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

But we already have plugin-docs that's applied to all docs plugin pages, right?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

oh yes

right, I think I kept those for temp easier retrocompat ;) we can keep the todo then

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

Labels

CLA Signed Signed Facebook CLA pr: bug fix This PR fixes a bug in a past release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Doc container doesn't stretch full page height any more

4 participants