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: whitespace between the main content and progressive sidebar #7271

Merged
merged 4 commits into from
Dec 13, 2024

Conversation

amyy2
Copy link
Contributor

@amyy2 amyy2 commented Nov 21, 2024

Description

Removed whitespace when main content is shorter than sidebar by setting the main content's position to sticky and fixing it to the bottom.

Validation

Image 1 Image 2

Left: Before (whitespace under text caused by sidebar height). Right: After (main content sticks to the bottom to eliminate whitespace).

Related Issues

Fixes #7251

Check List

  • I have read the Contributing Guidelines and made commit messages that follow the guideline.
  • I have run npm run format to ensure the code follows the style guide.
  • I have run npm run test to check if all tests are passing.
  • I have run npx turbo build to check if the website builds without errors.
  • I've covered new added functionality with unit tests if necessary.

@amyy2 amyy2 requested a review from a team as a code owner November 21, 2024 15:43
Copy link

vercel bot commented Nov 21, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
nodejs-org ✅ Ready (Inspect) Visit Preview Dec 3, 2024 5:32pm

.DS_Store Outdated Show resolved Hide resolved
apps/.DS_Store Outdated Show resolved Hide resolved
apps/site/layouts/layouts.module.css Outdated Show resolved Hide resolved
apps/site/layouts/layouts.module.css Outdated Show resolved Hide resolved
Copy link
Contributor

@TenzDelek TenzDelek left a comment

Choose a reason for hiding this comment

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

hey thanks for the pr, but what i meant in my issue #7251 was not this . while it tackles the main content issue, the sidebar is still having that whitespace behavior which can cause accessibility issue later on. check this sidebar behavior for example. we dont want to scroll all the way up to to navigate to a different content.

@amyy2
Copy link
Contributor Author

amyy2 commented Nov 22, 2024

hey thanks for the pr, but what i meant in my issue #7251 was not this . while it tackles the main content issue, the sidebar is still having that whitespace behavior which can cause accessibility issue later on. check this sidebar behavior for example. we dont want to scroll all the way up to to navigate to a different content.

I understand, so would you prefer if the main content and sidebar each have their own scroll bar? Or should I replicate the same behaviour I added here to the sidebar (one it reaches the bottom of its content it stops scrolling so that there's no whitespace)? Thanks for the feedback by the way!

@TenzDelek
Copy link
Contributor

hey thanks for the pr, but what i meant in my issue #7251 was not this . while it tackles the main content issue, the sidebar is still having that whitespace behavior which can cause accessibility issue later on. check this sidebar behavior for example. we dont want to scroll all the way up to to navigate to a different content.

I understand, so would you prefer if the main content and sidebar each have their own scroll bar? Or should I replicate the same behaviour I added here to the sidebar (one it reaches the bottom of its content it stops scrolling so that there's no whitespace)? Thanks for the feedback by the way!

https://vercel.com/docs/getting-started-with-vercel
you can check out their behavior for reference

@amyy2
Copy link
Contributor Author

amyy2 commented Dec 3, 2024

Hey @TenzDelek, I pushed some changes that hopefully reflect what you were looking for more closely. Feel free to give me any feedback and I can improve it further!

@mikeesto
Copy link
Member

mikeesto commented Dec 3, 2024

This looks like an improvement to me, thanks @amyy2

@TenzDelek
Copy link
Contributor

This looks like an improvement to me, thanks @amyy2

+1, thank you for the update @amyy2

@amyy2 amyy2 requested a review from TenzDelek December 6, 2024 17:34
@ovflowd
Copy link
Member

ovflowd commented Dec 13, 2024

Thank you for your contribution!

Copy link
Contributor

Unit Test Coverage Report

Lines Statements Branches Functions
Coverage: 92%
90.79% (631/695) 72.44% (184/254) 94.53% (121/128)

Unit Test Report

Tests Skipped Failures Errors Time
143 0 💤 0 ❌ 0 🔥 4.938s ⏱️

@ovflowd ovflowd added this pull request to the merge queue Dec 13, 2024
Merged via the queue into nodejs:main with commit 19047d0 Dec 13, 2024
13 checks passed
avivkeller pushed a commit to avivkeller/nodejs.org that referenced this pull request Jan 10, 2025
…ejs#7271)

* Fix whitespace between the main content and progressive sidebar

* Remove .DS_Store files

* Fix scrolling on sidebar
avivkeller pushed a commit to avivkeller/nodejs.org that referenced this pull request Jan 10, 2025
…ejs#7271)

* Fix whitespace between the main content and progressive sidebar

* Remove .DS_Store files

* Fix scrolling on sidebar
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.

Fix : whitespaces between the main content and progressive sidebar (scroll issue)
7 participants