New Document dialog: orientation toggle, size presets, and a guard against 0-size documents
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 38/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Rust
- Stelle
- 27.8k
- Fork
- 1.3k
- Merge medio
- 17h 32m
- PR unite (30g)
- 171
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di GraphiteEditor/Graphite
-
`third-party-licenses` fails on Windows when the parent process is PowerShellForse già presa @sahilshingate01 l’ha presa 9 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
GraphiteEditor/Graphite#4745 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Resizing a text box by one edge handle incorrectly locks both Max Width and Max Height, silently clipping textForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
GraphiteEditor/Graphite#4396 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Type hint is selected in node graph viewForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
GraphiteEditor/Graphite#4311 ·
I maintainer di solito rispondono entro 1 giorno
-
`cargo run` fails on WebAssembly target due to `CARGO_BUILD_TARGET` leaking into `rustc_codegen_spirv` buildForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
GraphiteEditor/Graphite#3939 · 2 commenti · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
GraphiteEditor/Graphite#4853 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di GraphiteEditor/Graphite
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
yunfie-twitter/Palleria#474 ·
I maintainer di solito rispondono entro 1 giorno
-
good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
servo/rust-smallvec#827 ·
I maintainer di solito rispondono entro 1 giorno
-
bug tests
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno