Skip to content

Keep the text readable when the pane is too narrow for the comment column - #92

Merged
kylemcd merged 2 commits into
mainfrom
83-narrow-pane-cards
Oct 5, 2026
Merged

kylemcd merged 2 commits into
mainfrom
83-narrow-pane-cards

Conversation

@kylemcd

@kylemcd kylemcd commented Oct 5, 2026 •

Copy link
Copy Markdown
Owner

Refs #83

The margin column always took its full 320px, so on a narrow note pane the text got whatever was left. Below about 600px it shrank to a sliver, one character wide at a 406px pane. The anchors moved thousands of pixels down with it, so their cards went off-screen.

  • The text now stops shrinking at --dc-min-text-width (15rem), in Live Preview and Reading view.
  • On a pane too narrow for both, the column overlaps the right edge of the text instead, as the issue suggests.
  • Wider panes are unchanged: the text still shrinks from the readable line width down to 15rem as the pane narrows.
Before (406px pane) After
Before: the text is one character wide and the cards are gone After: the text stays readable and the cards overlap its right edge

Testing

  • npm run check passes. Three new style tests, failing on main: both text-width rules use the minimum, and the variable is defined.

  • Obsidian, Live Preview, both sidebars open, window narrowed in steps:

    Note pane Text before Text after Cards after
    852px 468px 468px beside the text
    606px 222px 240px beside the text
    506px 122px 240px overlap the text by 70px
    406px 22px, cards off-screen 240px overlap the text by 170px
  • Reading view measures the same at 852, 606 and 406px.

  • A fresh-agent regression review found nothing.

  • Not reproduced as reported: the issue has the cards vanishing below line width + 320px (about 1020px here). On macOS with Obsidian 1.14.1 they still showed at 852px, and only went off-screen once the text was a few characters wide. That's why this says "Refs", not "Fixes".

The column always took its full 320px, so on a narrow pane the text was
squeezed to whatever was left: a sliver one character wide below about
400px. The anchors moved thousands of pixels down with it, so their cards
went off-screen too (#83).

Stop the text at --dc-min-text-width (15rem) in Live Preview and Reading
view. On a pane too narrow for both, the column overlaps the right edge of
the text instead.
@kylemcd
kylemcd marked this pull request as ready for review October 5, 2026 19:54
@kylemcd
kylemcd merged commit a6e26d3 into main Oct 5, 2026
1 of 2 checks passed
@kylemcd
kylemcd deleted the 83-narrow-pane-cards branch October 5, 2026 20:15
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.

1 participant