Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[Bug]: Split-screen target width assumes a 16px gap but the renderer uses 6px

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

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

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

評価

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

調査の方向性

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 の本文から書いたものです。

説明

bug good first 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
  1. Enable split-screen comparison.
  2. Set a target width, for example 1920.
  3. 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

環境構築

はじめの一歩

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

suradet-ps/codeframe のほかの issue

suradet-ps/codeframe の issue をすべて見る

似ている issue

Rust の issue をもっと見る

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

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