Skip to content

[trees] Fix truncation markers showing on filename even when it fits horizontally#840

Open
Pipluppp wants to merge 1 commit into
pierrecomputer:mainfrom
Pipluppp:fix/trees-filename-truncation
Open

[trees] Fix truncation markers showing on filename even when it fits horizontally#840
Pipluppp wants to merge 1 commit into
pierrecomputer:mainfrom
Pipluppp:fix/trees-filename-truncation

Conversation

@Pipluppp

Copy link
Copy Markdown

Description

Fix #816, where the truncation markers may show up even when it can fit horizontally. Added a 1px allowance for when the truncation markers will show up (not confident if this is the right fix for this)

Motivation & Context

Reproduced the issues from #816 where on different zoom levels and browsers the truncation markers will show up even if there is enough space.

On my display (with different monitor scaling) the truncation markers show up on the home page and at trees-dev/density, was able to reproduce it on Chrome, Edge, and Safari (except for Firefox where the issue is non-existent)

Chrome/Edge; 200% scaling; 90% zoom file-56a19214c7a433bf9f1ef721751ba170
Chrome/Edge 175% scaling; 80%/110% zoom image

Unable to reproduce it on firefox.

https://chenhuijing.com/blog/about-subpixel-rendering-in-browsers/

Type of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I have read the contributing guidelines
  • My code follows the project style
  • My code is formatted properly
  • I have added tests (not applicable; manually verified)
  • All relevant tests pass

How was AI used in generating this PR

Had some help solving the issues with moon and proto on initial setup on Windows. Manually reproduced the issues across scalings, zoom, and browsers.

Related issues

Fixes #816

The overflow logic showed truncation markers whenever its measurement exceeded 1lh (height > 1lh), but subpixel rendering from some browsers and zoom levels may make it go past it, so we add an allowance
@vercel

vercel Bot commented Jun 18, 2026

Copy link
Copy Markdown

@Pipluppp is attempting to deploy a commit to the Pierre Computer Company Team on Vercel.

A member of the Team first needs to authorize it.

@Pipluppp Pipluppp changed the title [diffs] Fix truncation markers showing on filename even when it fits horizontally [trees] Fix truncation markers showing on filename even when it fits horizontally Jun 19, 2026
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.

Bug: [@pierre/trees] file names show stray ellipsis/truncation artifacts at certain browser zoom levels

1 participant