A Document can take over the reader's theme stylesheet element

Abierto Apto para principiantes
#281 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

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
Activo
Stack tecnológico
javascript, rust
Área
desktop

Línea de trabajo

Read crates/app/assets/document/theme.js, especially host(), to see how it selects the theme stylesheet. Check the existing test setup for Document pages and add a page containing an authored <style id="agent-interface-theme" media="print">. Done when the app's theme appears on screen and the authored style element is ignored or removed.

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

Descripción

The Document reader's theme script puts the app's palette and rules into a <style> element with the ID agent-interface-theme. host() in crates/app/assets/document/theme.js reuses any element that already has that ID.

A Document can therefore supply the element itself, for example <style id="agent-interface-theme" media="print"></style>. The script then writes the app's rules into that print-only stylesheet, and the page is shown on screen without the app's theme: no palette variables, no table and code styling, and no styling for the Git views that #266 adds.

Nothing leaves the page's isolation and the page's content is unchanged; a Document only spoils its own appearance. It is still wrong for the app's own stylesheet to be something the page can take over.

Found in review of #278; the script is not part of that change.

To do

  • The script uses only a style element it created itself, and removes or ignores an authored element with that ID.
  • A test page with an authored <style id="agent-interface-theme" media="print"> still gets the theme on screen.

Not in scope

  • Any other change to how Documents are themed.
Lenguaje dominante
Rust
Estrellas
2
Forks
0
Merge medio
4 h 30 min
PR fusionados (30 d)
193

Preparar el entorno

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 eandualem/agent-interface

Todos los issues de eandualem/agent-interface

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.