Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: make docs page wrapper take full height #7025

Merged
merged 2 commits into from
Mar 27, 2022
Merged

fix: make docs page wrapper take full height #7025

merged 2 commits into from
Mar 27, 2022

Conversation

lex111
Copy link
Contributor

@lex111 lex111 commented Mar 26, 2022

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
Copy link

netlify bot commented Mar 26, 2022

[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
Copy link

github-actions bot commented Mar 26, 2022

⚡️ 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
Copy link

github-actions bot commented Mar 26, 2022

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

Copy link
Collaborator

@Josh-Cena Josh-Cena left a comment

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
Copy link
Contributor Author

lex111 commented Mar 27, 2022

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
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
@@ -77,6 +77,7 @@ export default function DocPage(props: Props): JSX.Element {
/>
<HtmlClassNameProvider
className={clsx(
// TODO: it should be removed from here
Copy link
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
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
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