Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/public-baths-open.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@node-core/ui-components': patch
---

Improve the width of various containers
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
z-50
mt-1
max-h-80
w-52
w-[26rem]
max-w-[calc(100vw-2rem)]
overflow-hidden
rounded-sm
border
Expand All @@ -45,7 +46,7 @@

.dropdownContentInner {
@apply max-h-80
w-52
w-full
overflow-y-auto;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
@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.

ml:grid
@apply ml:grid
ml:grid-cols-[--spacing(56)_1fr]
ml:grid-rows-[1fr]
ml:overflow-visible
ml:[grid-template-areas:'sidebar_main''sidebar_footer']
3xl:grid-cols-[--spacing(80)_1fr_--spacing(80)]
mx-auto
Comment thread
avivkeller marked this conversation as resolved.
block
w-full
xl:grid-cols-[--spacing(56)_1fr_--spacing(64)]
Expand Down
Loading