linebender / linebender/parley

Text truncation with ellipsis

Open
#304 5 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Rust
Stars
736
Forks
120
Avg merge
1d 3h
Merged PRs (30d)
53

Description

See the [CSS `text-overflow` property](https://developer.mozilla.org/en-US/docs/Web/CSS/text-overflow).

If we want to truncate some text rather than wrap it, it'd be nice to do that cleanly with an ellipsis instead of just clipping it:

![Image](https://github.com/user-attachments/assets/f90423af-290b-4d3a-bebf-a0641bd3b403)

egui supports arbitrary text truncation strings (Firefox also extends `text-overflow` to support that too); I'm not sure how difficult that would be.

It seems the appearance (font and size) of the ellipsis is determined in CSS by the "parent" style, which requires us to define that as well--see https://github.com/linebender/parley/issues/291.

This is necessary for porting egui to Parley.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file or test is named; start by locating the text truncation entry point and reviewing the CSS text-overflow behavior described here. Compare the requested ellipsis and arbitrary truncation strings with egui, then read parley issue #291 for parent-style handling. Done means truncation uses an ellipsis instead of clipping and its appearance is handled consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, rust
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.