New Document dialog: orientation toggle, size presets, and a guard against 0-size documents
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 38/100
調査の方向性
Start in editor/src/messages/dialog/new_document_dialog/ and read how the dialog stores W/H, handles Infinite Canvas, and submits dimensions. The request specifies orientation toggling, screen and paper presets, and a 1 px minimum; keep changes within the dialog as described. Done means the controls behave as specified and submission creates a nonzero artboard when Infinite Canvas is off.
索引モデルが issue の本文から書いたものです。
説明
The New Document dialog (editor/src/messages/dialog/new_document_dialog/) currently has a name field, an Infinite Canvas checkbox, and W/H inputs. I'd like to propose a few small quality-of-life improvements that live entirely inside the dialog. PortfolioMessage::NewDocumentWithName, GraphOperationMessage::NewArtboard and the rest of Submit would stay as they are.
1. Portrait / Landscape toggle
An "Orientation" row with a two-option Portrait / Landscape radio, replacing the need to swap W and H by hand. The active option follows the dimensions (landscape when W > H). Clicking the inactive one swaps W and H, so one click toggles. A small swap button between W and H does the same toggle, for people who think in terms of swapping the two numbers. All of these are disabled while Infinite Canvas is checked, and the radio is also disabled for square sizes.
A plain swap-dimensions button was already attempted in #4138, which was closed in the backlog cleanup (#4647) rather than for a problem with the idea. Bot review feedback there was only that it should be disabled in infinite-canvas mode. I think a labeled toggle that shows the current orientation is clearer than an unlabeled swap icon, but I'm happy to go with only an icon button if you prefer.
2. Size presets
A dropdown above Dimensions with common sizes:
- Screen: 1920x1080, 1280x720, 3840x2160, 1080x1080
- Paper: A3, A4, A5, Letter
Picking one fills W/H in the current orientation. A preset stays selected when the orientation is toggled, and editing W/H by hand switches the dropdown to "Custom". Presets are plain dialog state and never reach the document code. Paper sizes are pixel values at an assumed 96 DPI (CSS px), which is open to discussion.
3. Guard against 0-size documents
W and H currently have a minimum of 0. If either is 0 with Infinite Canvas off, Submit skips creating the artboard (self.dimensions.x > 0 && self.dimensions.y > 0), so the user silently gets an empty document with no artboard. I'd raise the minimum to 1, so a typed 0 clamps to 1 px. Open to disabling OK instead if you prefer.
Related
- Enter doesn't confirm the dialog after editing values (#3601). I'd be glad to include a fix for this in the same PR, since it's the same dialog.
- Footer button mnemonics (#3605), which touches the same dialog.
Willingness to implement
I'd like to implement this myself if you approve. I already have a working prototype (about 80 lines, all inside new_document_dialog/), so the screenshot is the real dialog. I know the backlog is tight for 1.0, so I'd keep the PR small and dialog-only, with before/after screenshots. If you'd like it split (for example the guard and orientation toggle first, presets after), I'm happy to do that.
The mockup screenshots are generated with the help of AI.
- 主要言語
- Rust
- スター
- 27.8k
- フォーク
- 1.3k
- 平均マージ
- 17時間 32分
- マージ済み PR(30日)
- 171
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
GraphiteEditor/Graphite のほかの issue
-
`third-party-licenses` fails on Windows when the parent process is PowerShell対応中かも @sahilshingate01 が 9 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
GraphiteEditor/Graphite#4745 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Resizing a text box by one edge handle incorrectly locks both Max Width and Max Height, silently clipping text再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
GraphiteEditor/Graphite#4396 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Type hint is selected in node graph view再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
GraphiteEditor/Graphite#4311 ·
メンテナーはふだん 1 日以内に返信
-
`cargo run` fails on WebAssembly target due to `CARGO_BUILD_TARGET` leaking into `rustc_codegen_spirv` build再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
GraphiteEditor/Graphite#3939 · コメント 2 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
GraphiteEditor/Graphite#4853 ·
メンテナーはふだん 1 日以内に返信
GraphiteEditor/Graphite の issue をすべて見る
似ている issue
-
good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
servo/rust-smallvec#827 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
nowledge-co/hawdb#1400 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
calcit-lang/caps#16 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
penso/herdr-gpui#934 ·
メンテナーはふだん 1 日以内に返信
-
🎉 Add Bossanovaオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
jaywcjlove/awesome-mac#4096 ·
メンテナーはふだん 1 日以内に返信