Snapshot box misaligns for rows holding emoji sequences

Aperta
#92 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Tranquilla
Stack tecnologico
rust
Ambito
cli, testing-qa

Direzione di ricerca

Non viene indicato alcun file o percorso di test. Inizia dall’assegnazione delle celle carattere per carattere della griglia e dalla misurazione di alacritty_terminal UnicodeWidthChar, quindi riproduci il caso di snapshot family-emoji. Il lavoro è completato quando si concorda una gestione delle sequenze di emoji che mantenga i bordi degli snapshot allineati in modo coerente tra i backend.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

A snapshot frame is drawn to the grid's column count, but the grid measures a character at a time while a terminal renders an emoji sequence as one glyph. A row holding one comes out narrower than its frame.

Reproducing, with no window title involved:

Str-width= 14  ╭────────────╮
Str-width=  8  │👨‍👩‍👧‍👦ab  │      ← six columns short
Str-width= 14  │            │
Str-width= 14  ╰────────────╯

The grid puts that family emoji in 8 columns (one cell plus 4 continuations) because alacritty_terminal measures with UnicodeWidthChar per character. A terminal draws it in 2, which is what UnicodeWidthStr reports for the whole string. The same gap affects skin-tone modifiers, keycaps, and a base character followed by a variation selector.

Measured on unicode-width 0.2.2:

sequence per character whole string
👨‍👩‍👧‍👦 8 2
👍🏽 4 2
1️⃣ 1 2
❤️ 1 2

This predates #91 and is independent of it: #91 only made the title measure whole strings, since it is a string we place rather than grid content. Fixing the rows means changing how the grid assigns cells to a sequence, which is a decision about the emulator seam rather than about the serializer, and would want the same treatment in every backend.

Worth deciding whether shell-use follows its emulator here or groups sequences itself before the two disagree somewhere more visible than a snapshot border.

Lingua principale
Rust
Stelle
305
Fork
29
Merge medio
2g 5h
PR unite (30g)
22

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

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di microsoft/tui-test

Tutte le issue di microsoft/tui-test

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.