Skip to content

Conversation

@ATiwari03-03-2004
Copy link
Contributor

Description

This PR fixes the variable height issue of code block by introducing fixed height for the code block

Validation

Screen.Recording.2025-12-25.161204.mp4

Related Issues

Fixes #8425

Check List

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

@ATiwari03-03-2004 ATiwari03-03-2004 requested a review from a team as a code owner December 25, 2025 10:59
Copilot AI review requested due to automatic review settings December 25, 2025 10:59
@vercel
Copy link

vercel bot commented Dec 25, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
nodejs-org Ready Ready Preview Dec 25, 2025 7:17pm

@github-actions
Copy link
Contributor

👋 Codeowner Review Request

The following codeowners have been identified for the changed files:

Team reviewers: @nodejs/nodejs-website

Please review the changes when you have a chance. Thank you! 🙏

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses a variable height issue in code blocks by applying a fixed height of 19rem to code blocks within active tabs. The fix targets the BaseCodeBox component when rendered inside tabs with an active state.

  • Introduces a fixed height constraint for code blocks in active tabs
  • Uses CSS selector targeting div[data-state='active'] to scope the height change

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Member

@avivkeller avivkeller left a comment

Choose a reason for hiding this comment

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

Don't we just need to make all the code boxes the same height, without CSS changes?

@ATiwari03-03-2004
Copy link
Contributor Author

ATiwari03-03-2004 commented Dec 25, 2025

@avivkeller I used CSS because the height difference was coming from content length across tabs, and there wasn’t an existing prop or layout constraint to normalize it. When you say “without CSS changes,” do you mean setting a fixed height at the component level or something else?

@avivkeller
Copy link
Member

I mean just adding a line to the code block, surely there's a way we can get it to the 14? lines it needs to be

@ATiwari03-03-2004
Copy link
Contributor Author

Oh ok, then i will add an extra line to code block of Streams pipeline section, that ought to do it

@avivkeller avivkeller changed the title fix: fixed codebox height for active tab (#8425) feat(index): add empty line to even code box size Dec 25, 2025
@ovflowd ovflowd added the github_actions:pull-request Trigger Pull Request Checks label Dec 25, 2025
@github-actions github-actions bot removed the github_actions:pull-request Trigger Pull Request Checks label Dec 25, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 25, 2025

Lighthouse Results

URL Performance Accessibility Best Practices SEO Report
/en 🟢 96 🟠 88 🟢 100 🟢 100 🔗
/en/about 🟢 99 🟢 93 🟢 100 🟠 88 🔗
/en/about/previous-releases 🟢 98 🟢 93 🟢 100 🟢 100 🔗
/en/download 🟢 97 🟢 96 🟢 100 🟢 100 🔗
/en/download/archive/current 🟢 99 🟢 100 🟢 100 🟢 100 🔗
/en/blog 🟢 99 🟢 100 🟢 96 🟢 100 🔗

@codecov
Copy link

codecov bot commented Dec 25, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.83%. Comparing base (8ab0fd7) to head (009617c).
⚠️ Report is 7 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8450      +/-   ##
==========================================
+ Coverage   73.81%   73.83%   +0.01%     
==========================================
  Files         109      109              
  Lines        9255     9255              
  Branches      313      313              
==========================================
+ Hits         6832     6833       +1     
+ Misses       2421     2420       -1     
  Partials        2        2              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@ovflowd ovflowd left a comment

Choose a reason for hiding this comment

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

This fix is so funny. Anyhow, SGTM

@ovflowd ovflowd added this pull request to the merge queue Dec 26, 2025
@ovflowd ovflowd added the fast-track Fast Tracking PRs label Dec 26, 2025
@ovflowd
Copy link
Member

ovflowd commented Dec 26, 2025

@nodejs/nodejs-website fast-tracking this PR as minor UX fix.

Merged via the queue into nodejs:main with commit ffdf614 Dec 26, 2025
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fast-track Fast Tracking PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Suggestion] Expand the streams pipeline example to prevent the screen from flickering

3 participants