-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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 issues when announcementBar visible #8370
Comments
Hi everyone! |
@slorber I would like to work on this issue if it is available. |
i will try this issue with #8374 If I'm too late, someone else can do it! |
Hello @slorber, I have found the solution to this problem, How do I make sure the fix doesn't create other issues, can you please help, it's my first time contributing. |
@arbitrarymahi you can create a pull-request and we'll review it. Note: all attempts to fix this have failed so far, it's not an easy issue to take for a first contribution so make sure you tested all the edge cases. |
Hi community Thanks for all contributors that gave it a try to solve this annoying layout problem. We received multiple PRs but no implementation provided was satisfying enough. All the proposed PRs had bugs in the review URLs I suggested: This problem is likely more complex to solve than it seems, and I'll probably have to handle it myself instead of asking for community help. For now, I suggest that the community step back on this issue and stop submitting PRs. I'm going to do the cleanup and close the existing PR attempts. If you still think you can solve it properly and submit a PR, please review carefully the 2 URLs above so that there is no issue at all (we are not looking for a partial fix here) on different viewport sizes with/without the announcement bar. I'll review these pages very carefully on your PR so doing this work upfront ensures that your PR is valid. |
Hi Everyone! I took another stab at this issue. Initially I was only looking at CSS functionality which was the incorrect approach. When the announcement bar is shown, the root of the problem is we need to adjust the height dynamically for the entire sidebar. The details of everything are included in this PR. Additionally I have one question regarding Thanks a bunch for taking the time to look this over and let me know if any other changes should be made! |
@r-lawrence will review your PR on time but please make sure your solution works BEFORE react hydration. If it's using hooks it's likely working only after hydration. For me, the solution is rather CSS math + inlined JS, and I'll review carefully that it works as I expect it to. Please test your PR with slow 3G mode activated and ensure there are no unexpected layout shifts during the React hydration, and that it works fine if we attempt to scroll before the hydration. Argos CI is new, I'll review the UI diff reported, but wonder why your PR should involve minor changes at all.
Are you able to do that? This is unexpected. |
@r-lawrence I'm not super familiar with this code and can't help you much. It is there for a long time, was not coded by me. I am not 100% sure of the solution to use and how many changes are required. If I help you figure things out, I would be faster to actually solve the problem myself. What I'm sure of is the outcome we want: 0 layout shifts. If you are able to solve it on your own that's nice, otherwise, I can't really help and it's preferable that you close your PR. |
@slorber Hey no problem. I'll work on this a bit later when I have some more time. If I can't come up with a solution in a reasonable time, I'll go ahead and close the PR. Thanks! |
Hi @slorber - is this issue still open ? I would like to give a try! |
Have you read the Contributing Guidelines on issues?
Prerequisites
npm run clear
oryarn clear
command.rm -rf node_modules yarn.lock package-lock.json
and re-installing packages.Description
When the announcementBar is visible, the docs sidebar has a weird layout issue
Page: https://docusaurus.io/tests/docs
Good URLs to reproduce (long sidebar collapsed - long content):
Note: it's not because of the hideable sidebar feature, the issue is also there when there's no sidebar collapse button
Also related to #7815: the announcement bar height should probably be dynamic/flexible and layout should rather adapt gracefully to any size.
Reproducible demo
No response
Steps to reproduce
https://docusaurus.io/tests/docs
Expected behavior
No weird layout with elements overlapping
The visible scrollbar takes the appropriate height.
Actual behavior
Elements overlap and the scrollbar does not go up to the bottom (the scrollbar should touch the collapse button)
Your environment
Self-service
The text was updated successfully, but these errors were encountered: