p5.js-website icon indicating copy to clipboard operation
p5.js-website copied to clipboard

"Start Coding" and "Donate" buttons do not display at the bottom of the side panel when the Secondary nav is collpased

Open doradocodes opened this issue 5 months ago • 5 comments

Most appropriate sections of the p5.js website?

Reference

What is your operating system?

Mac OS

Web browser and version

chrome 148.0.7778.216

Actual Behavior

On any page with both the Primary and Secondary nav menus, when the Secondary nav menu is collapsed, the "Start Coding" and "Donate" buttons stay in the same place:

Image

Expected Behavior

The "Start Coding" and "Donate" buttons should be displayed at the bottom of the Primary nav menu, like it does on the Homepage.

Image

Steps to reproduce

No response

Would you like to work on the issue?

No

doradocodes avatar Jun 08 '26 16:06 doradocodes

I looked into this issue. Here's what's happening:

On desktop pages that have both the main nav and the secondary "Jump to" nav (like Reference pages), when the secondary nav is collapsed, the "Start Coding" and "Donate" buttons stay stuck in place instead of moving to the bottom of the side panel.

The issue is in the nav's CSS — the sidebar container has height: fit-content, so it only takes up as much space as its content needs. When the secondary nav is collapsed, the sidebar shrinks, and the buttons don't get pushed to the bottom. On the homepage (which has no secondary nav), this isn't a problem because a different CSS class (noJumpTo) correctly fills the space.

The fix would be to make the sidebar fill the full viewport height when the secondary nav is collapsed, so the buttons drop to the bottom as expected.

Could you assign this to me? I'd like to work on it.

SOUMITRO-SAHA avatar Jun 10 '26 13:06 SOUMITRO-SAHA

Hi @doradocodes, I'd like to work on this too. I can see the issue, the sidebar needs min-height: 100vh or similar when the secondary nav is collapsed, so the buttons stay anchored to the bottom. Happy to submit a fix.

kiranShamsHere avatar Jun 11 '26 16:06 kiranShamsHere

@kiranShamsHere Happy to assign this to you. As for the approach, I would suggest using flexbox to determine the heights of the primary and secondary side navs, so that it will work for every screen size and will also still work if the content changes.

doradocodes avatar Jun 12 '26 00:06 doradocodes

@SOUMITRO-SAHA I'm sorry, I didn't see your initial comment and I assigned the issue to @kiranShamsHere. Thank you for doing the initial research. Would you be open to taking issue https://github.com/processing/p5.js-website/issues/1459?

doradocodes avatar Jun 22 '26 11:06 doradocodes

@SOUMITRO-SAHA I'm sorry, I didn't see your initial comment and I assigned the issue to @kiranShamsHere. Thank you for doing the initial research. Would you be open to taking issue #1459?

I'd be happy to take on issue #1459. Please assign it to me, and I'll start looking into it.

SOUMITRO-SAHA avatar Jun 22 '26 13:06 SOUMITRO-SAHA