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

オープン 初心者向け
#281 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
javascript, rust
領域
desktop

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.
主要言語
Rust
スター
2
フォーク
0
平均マージ
4時間 30分
マージ済み PR(30日)
193

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

eandualem/agent-interface のほかの issue

eandualem/agent-interface の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。