Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

[Bug]: Preview annotation comments do not support RTL text direction

Cerrado Apto para principiantes
#4,644 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@abdelrhmanehab10 ya está trabajando en esto.

Desde el 9/9/2026.

  • #10999 de @abdelrhmanehab10 — cerrado sin fusionar
  • #11005 de @abdelrhmanehab10 — abierto
  • #16747 de @haithamassoli44 — abierto

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
78/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Tranquilo
Stack tecnológico
typescript
Área
desktop, frontend

Línea de trabajo

Comienza en apps/desktop/src/preview/PickPreload.ts alrededor de las líneas 414-419, donde se crea el área de texto de anotación. Reproduce el problema con un comentario en árabe en una página LTR y, después, inspecciona cómo el overlay de anotación recibe la dirección del documento inspeccionado. Se considera terminado cuando el texto de los comentarios RTL y de dirección mixta se muestra correctamente, mientras la barra de herramientas y los controles del editor mantienen un diseño estable.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Area

apps/desktop

Summary

Arabic and other RTL comments in the browser annotation editor use the inspected page's text direction instead of the comment's own content. On a normal LTR page, the RTL comment is aligned incorrectly; on an RTL page, the entire annotation toolbar is mirrored.

Steps to reproduce
  1. Open any left-to-right page in the T3 Code desktop browser panel, for example https://example.com.
  2. Click Annotate preview.
  3. Select any element so the annotation comment editor appears.
  4. Type an Arabic comment, for example كبّر هذا العنوان.
Expected behavior

The comment field should infer direction from the entered text. Arabic, Hebrew, Persian, and other RTL comments should start from the right and preserve readable bidirectional ordering.

The annotation toolbar and editor controls should keep their own stable layout regardless of the inspected page's direction.

Actual behavior

The annotation comment field inherits the inspected page's direction:

  • On an LTR page, Arabic annotation text remains in an LTR field and is aligned/ordered incorrectly.
  • On an RTL page, the comment flows RTL, but the annotation chrome is also mirrored, including the tool order and Attach button placement.

This couples the annotation UI to the host document instead of handling the comment direction independently.

Impact

Minor bug or occasional failure. RTL users can enter a comment, but the field is awkward to edit and mixed RTL/LTR content such as URLs, selectors, and code tokens can be displayed in the wrong visual order.

Version or commit

Reproduced on 0.0.29-nightly.20260724.893 (ece05087a70e).

Environment

T3 Code desktop nightly, Linux/X11, Electron.

Screenshots, recordings, or supporting files

Actual behavior on an LTR page: the short Arabic comment is anchored to the left side of the field.

Arabic annotation comment remains LTR on an LTR page

Diagnostic control with the host page set to RTL: the same comment moves to the right, but the toolbar order and Attach button also reverse. This shows that the annotation overlay inherits direction from the inspected page.

Forcing the host page to RTL also mirrors annotation controls

Related but not duplicate: #1771 is a broad proposal for bidi-ready renderer styling and message bodies. This report is narrowly about the desktop preview annotation overlay and its comment textarea.

Technical note

Current main at 5719e8ac4020 creates the annotation <textarea> without a dir attribute. Giving the comment field content-based direction such as dir="auto", while explicitly isolating the annotation chrome from the host document direction, appears to be the smallest relevant scope.

Workaround

No practical per-comment workaround. Temporarily changing the inspected document's root direction to RTL also changes the page and annotation controls.

Lenguaje dominante
TypeScript
Estrellas
24.8k
Forks
6.4k
Merge medio
11 h 33 min
PR fusionados (30 d)
312

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de pingdotgg/t3code

Todos los issues de pingdotgg/t3code

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.