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

Docs layout issue: content container does not grow to take all the available space #8369

Closed
2 of 7 tasks
slorber opened this issue Nov 24, 2022 · 10 comments · Fixed by #8463
Closed
2 of 7 tasks

Docs layout issue: content container does not grow to take all the available space #8369

slorber opened this issue Nov 24, 2022 · 10 comments · Fixed by #8463
Labels
bug An error in the Docusaurus core causing instability or issues with its execution good first issue If you are just getting started with Docusaurus, this issue should be a good place to begin. help wanted Asking for outside help and/or contributions to this particular issue or PR.

Comments

@slorber
Copy link
Collaborator

slorber commented Nov 24, 2022

Have you read the Contributing Guidelines on issues?

Prerequisites

  • I'm using the latest version of Docusaurus.
  • I have tried the npm run clear or yarn clear command.
  • I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
  • I have tried creating a repro with https://new.docusaurus.io.
  • I have read the console error message carefully (if applicable).

Description

The docs layout looks particularly weird when sidebar/content is smaller than viewport, which is likely to be the case on small pages + vertical screen

CleanShot 2022-11-24 at 14 51 42

Follow-up of bug discussed in:

Reproducible demo

No response

Steps to reproduce

https://docusaurus.io/tests/docs/doc-with-another-sidebar

Expected behavior

The content container (sidebar + main) should grow

Actual behavior

The content container does not expand

Your environment

No response

Self-service

  • I'd be willing to fix this bug myself.
@slorber slorber added bug An error in the Docusaurus core causing instability or issues with its execution help wanted Asking for outside help and/or contributions to this particular issue or PR. good first issue If you are just getting started with Docusaurus, this issue should be a good place to begin. labels Nov 24, 2022
@RavenColEvol
Copy link

Can someone close this Issue if it's completed?

@0916dhkim
Copy link
Contributor

It's not completed yet. The issue is still there.

@Djunnni
Copy link
Contributor

Djunnni commented Dec 19, 2022

if this #8463 PR is finish, i will do some of work for #8370

@Briffou
Copy link

Briffou commented Feb 11, 2023

I feel like I still have this issue on a fresh docusaurus 2.3.1 install, where I simply added

      docs: {
         sidebar: {
            hideable: true,
         },
      },

inside docusaurus.config.js
capture

@Tandashi
Copy link

Tandashi commented Feb 21, 2023

In case someone finds this and still has the same issue. I added the following to my custom.css file:

/* Full Size Sidebar */
.main-wrapper > div {
  flex: 1 0
}

@slorber
Copy link
Collaborator Author

slorber commented Feb 22, 2023

Will look into it, indeed it seems we have a little flex problem.

Not related to the hideable sidebar, can also be seen here:

https://tutorial.docusaurus.io/docs/tutorial-basics/congratulations/

CleanShot 2023-02-22 at 18 22 46


@Tandashi good workaround. Do you want to send a PR with a proper solution?

@Tandashi
Copy link

@slorber Sure, will try my best

@Tandashi
Copy link

@slorber Looks like it's already fixed in the 3.0.0-alpha.0 version. At least the tutorial page (examples/classic) renders as it should.

@slorber
Copy link
Collaborator Author

slorber commented Feb 24, 2023

Thanks, looks like you are right and it's fixed already! See prod URL: https://docusaurus.io/tests/docs/more-test

Looks like this issue has been fixed in #7966 and it's a breaking change pr and not backported to 2.x

Will do a quick fix for docusaurus-v2 branch

@slorber
Copy link
Collaborator Author

slorber commented Feb 24, 2023

should be fixed in #8707

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error in the Docusaurus core causing instability or issues with its execution good first issue If you are just getting started with Docusaurus, this issue should be a good place to begin. help wanted Asking for outside help and/or contributions to this particular issue or PR.
Projects
None yet
6 participants