[Bug]: Split-screen target width assumes a 16px gap but the renderer uses 6px
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 78/100
調査の方向性
crates/app/src/export.rs の compute_split_scale_for_width() から始め、その間隔の値を crates/renderer/src/canvas.rs と crates/renderer/src/svg.rs の SPLIT_GAP と比較します。Issue の提案どおり、renderer crate が layout.rs で共通定義を公開しているか確認します。PNG と SVG の両方で、分割画面のエクスポートが丸め誤差の範囲内で要求された目標幅と一致すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
What happened?
The target width computation for split-screen mode assumes a 16px gap between the two panels, but the renderer uses a 6px gap. The computed scale is therefore slightly wrong and the exported image is 10 * scale device pixels narrower than the requested target width.
Steps to reproduce
- Enable split-screen comparison.
- Set a target width, for example 1920.
- Export PNG and measure the actual image width. It falls short of the target.
Expected behavior
The exported image matches the requested target width (within rounding).
Actual behavior
compute_split_scale_for_width() in crates/app/src/export.rs:266 uses the magic number 16.0 for the gap, while the drawing code uses SPLIT_GAP = 6.0 (crates/renderer/src/canvas.rs:376, crates/renderer/src/svg.rs:250).
Where did it go wrong?
PNG export / SVG export (split mode)
Settings
Split-screen enabled, target width set.
Browser
Not browser specific.
CodeFrame version
0.7.0
Console output or extra context
Suggested fix: export SPLIT_GAP from the renderer crate and use it in export.rs instead of the local literal. The constant is currently duplicated in canvas.rs and svg.rs, so a single shared definition in layout.rs would remove the duplication at the same time.
- 主要言語
- Rust
- スター
- 1
- フォーク
- 0
- 平均マージ
- 1日 7時間
- マージ済み PR(30日)
- 5
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
suradet-ps/codeframe のほかの issue
-
enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
suradet-ps/codeframe#40 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
suradet-ps/codeframe#35 ·
メンテナーはふだん 1 日以内に返信
-
documentation good first issue
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
suradet-ps/codeframe#36 ·
メンテナーはふだん 1 日以内に返信
-
[Bug]: Target width input clamps the value on every keystroke対応中かも @AnushreeKasturi が今日担当しました。 オープンbug good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
suradet-ps/codeframe#37 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
suradet-ps/codeframe#38 ·
メンテナーはふだん 1 日以内に返信
suradet-ps/codeframe の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
pop-os/cosmic-comp#2956 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
area:release criticality:p3 documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
registrystack/registry-stack#2085 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
libp2p/rust-libp2p#6694 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
EmbarkStudios/cargo-deny#910 ·