Skip to content

chore(ui): improve width of containers - #9032

Open
avivkeller wants to merge 1 commit into
mainfrom
container-width
Open

chore(ui): improve width of containers#9032
avivkeller wants to merge 1 commit into
mainfrom
container-width

Conversation

@avivkeller

@avivkeller avivkeller commented Jul 28, 2026

Copy link
Copy Markdown
Member

Partially fix/es nodejs/doc-kit#954 by expanding the main content (if possible) and the change history

@avivkeller
avivkeller requested a review from a team as a code owner July 28, 2026 22:46
Copilot AI review requested due to automatic review settings July 28, 2026 22:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@vercel

vercel Bot commented Jul 28, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
nodejs-org Ready Ready Preview Jul 28, 2026 10:46pm

Request Review

@cursor

cursor Bot commented Jul 28, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
CSS-only layout tweaks in shared UI components with no logic, auth, or data changes.

Overview
Widens documentation layout so main article content and the change-history menu can use more horizontal space (partially addresses doc-kit #954).

Change history dropdown panel grows from a fixed narrow width (w-52) to 26rem, with max-w-[calc(100vw-2rem)] on small viewports; the scrollable inner area follows the wrapper via w-full instead of a duplicate fixed width.

Article layout drops max-w-10xl and mx-auto on .articleLayout, so the grid stays full width instead of capping and centering the page shell.

Reviewed by Cursor Bugbot for commit 624748c. Bugbot is set up for automated code reviews on this repo. Configure here.

@codecov

codecov Bot commented Jul 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.13%. Comparing base (c086c54) to head (624748c).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9032      +/-   ##
==========================================
+ Coverage   75.10%   75.13%   +0.03%     
==========================================
  Files         102      102              
  Lines        9109     9109              
  Branches      372      372              
==========================================
+ Hits         6841     6844       +3     
+ Misses       2264     2261       -3     
  Partials        4        4              

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

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 624748c. Configure here.

Comment thread packages/ui-components/src/Containers/Article/index.module.css
@github-actions

Copy link
Copy Markdown
Contributor

📦 Build Size Comparison

Summary

Metric Value
Old Total First Load JS 10.65 MB
New Total First Load JS 10.65 MB
Delta 0 B (0.00%)

@reference "../../styles/index.css";

.articleLayout {
@apply max-w-10xl

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Text should have a maximum line width of 80ch for better readability and UX: https://baymard.com/blog/line-length-readability

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I can either:

  1. Revert this part of the change
  2. Make prose use up to 80ch, but tables and code blocks still expand

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

FWIW as the person who requested an increase in width:

  • From my own experiments swapping out the styles in the documentation, I find it more readable and more skimmable when wider
  • Even just a small increase of 6rem to the total page width made it significantly more comfortable to read (see the screenshots at the top of the issue I raised: Feedback: request for various minor style changes doc-kit#954 (comment))
  • The oft-cited recommended width limit was figured out for long-form content of plain text, but the documentation mostly contains relatively short paragraphs and is full of inline code and indented list blocks
  • The existing content is already quite a bit wider than 80ch, and reducing it to that size makes it very hard to skim (makes it feel a lot more like reading a book, but this is not a book!)
  • This only affects relatively large screens, which are presumably biased towards people who prefer seeing more content at a time (like me!). On regular/smaller screens, the content is limited by the presence of the sidebars
  • If people on larger screens prefer narrower content, they can easily increase the page zoom or reduce the window size using normal browser/OS controls. But the reverse is not true when size limits are coded into the page.

I wonder if maybe there are competing preferences due to this style being used for both the API documentation and other pages? I could imagine non-API pages may be more readable when narrow, so it might be worth foregoing some consistency to have each page more tuned to its own content. But as I noted above, even if all pages are allowed to be larger, users can always make the content narrower if desired using the browser and OS controls.

@AugustinMauroy

Copy link
Copy Markdown
Member

Can we have stories for that change so if there are future change we will know what happened

@avivkeller

Copy link
Copy Markdown
Member Author

Can we have stories for that change so if there are future change we will know what happened

I don't know if stories will cover this kind of dynamic change

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.

5 participants