Feature: flattenEmptyDirectories: support end-truncation for the whole flattened path instead of per-segment truncation
I maintainer di solito rispondono entro 1 giorno
@JoeJoeflyn ci sta già lavorando.
Dal 8/8/2026.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 65/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- typescript
- Ambito
- frontend
Direzione di ricerca
Start at the useFileTree entry point and trace how flattenEmptyDirectories renders flattened path segments; then locate the related tests. Determine how to support an end-truncation option while preserving per-segment truncation as the default. Done means the whole flattened path can truncate at the end and the existing default behavior remains unchanged.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Prerequisites
- I have searched for duplicate or closed feature requests
- I have read the contributing guidelines
Proposal
Currently when
flattenEmptyDirectories: true is
enabled, each path segment is
individually wrapped in a Truncate
component, resulting in display
like:
a... / b... / c... / dd... / ...
We'd like to support an option to
truncate the whole flattened path
at the end, like:
aaa / bbb / ccc /...
This is more readable and matches
how most file explorers (e.g. VS
Code) handle deep nested paths.
Proposed API:
useFileTree({
flattenEmptyDirectories: true,
flattenedSegmentsTruncation:
'end', // 'per-segment' (default) |
'end'
})
Or alternatively a CSS variable /
data attribute that consumers can
use to override the truncation
strategy via unsafeCSS.
Motivation and context
When flattenEmptyDirectories: true
is enabled and the tree is rendered
in a narrow container (e.g. a
sidebar panel pushed to the right
edge), the per-segment truncation
produces a very poor visual result
— every segment gets clipped
individually, leaving a string of
disconnected ellipses like a... /
b... / c... / dd... / .... This
makes the path nearly unreadable
and wastes space with repeated ...
markers.
VS Code handles this well by
truncating the entire flattened
path as a single string at the end
(aaa / bbb / ccc /...), which keeps
as much of the path visible as
possible and is far easier to scan
at a glance. Supporting
end-truncation for the whole path
would bring @pierre/trees in line
with this established UX pattern
and significantly improve usability
in space-constrained layouts.
- Lingua principale
- TypeScript
- Stelle
- 6.2k
- Fork
- 226
- Merge medio
- 1g 11h
- PR unite (30g)
- 33
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di pierrecomputer/pierre
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
pierrecomputer/pierre#1187 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
pierrecomputer/pierre#1150 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Bug: Dragging a selection past the edge of an editable CodeView collapses it, then stops it growingApertabug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
pierrecomputer/pierre#1189 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
pierrecomputer/pierre#1184 · 4 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 63/100
pierrecomputer/pierre#1172 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di pierrecomputer/pierre
Issue simili
-
documentation good first issue
Difficoltà 2/5 Mezza giornata Idoneità per principianti 72/100
sujithputta02/Esapay#13 ·
-
Share dialog: the address book's contact count reads "1 contacts" (no singular form in any language)Forse già presa @chibenwa l’ha presa oggi. Apertaai-driven-qa bug claude Cosmetic
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
linagora/twake-contacts-frontend#271 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
Koenkk/zigbee2mqtt#33402 ·
I maintainer di solito rispondono entro 1 giorno
-
dx P2 platform Stellar Wave Wave 10
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
winsznx/routedock#579 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
area:ui effort:S enhancement priority:P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno