Repository navigation
Conversation
* Give dialogs roomier text fields and padding Single-line fields in dialogs and side panels were only as tall as one line of text, and modals used the popup frame's tight margin. Fields are now 30 points with more inset, and every modal shares one padded card so titles and buttons sit clear of the edge. * Keep long labels inside their rows and dialogs Painted names ran past the edge of fixed rows, and a page hover tip was drawn above open dialogs. Labels now end in an ellipsis, tab rows wrap, and those tips stay hidden while a dialog is open. --------- Co-authored-by: Brandon Thomas <echelon@gmail.com>
… per-page invalidation (storytold#1122) * Content edits on heavy documents: narrow refresh, cached appearances, per-page invalidation Every content edit (drag, resize, retype) on a large document ran a full synchronous refresh on the UI thread: a whole-file re-inspection plus a redraw of every missing annotation appearance, then dropped all page rasters. On a 72 MB / 202-page CAD file with 27k appearance-less annotations each commit cost ~1.5 s before anything re-rendered. Now ~0.3 s. - New Scope::Content for edits that touch only page content, resources and added content/marks (move/resize/retype/images/added items/marks): the page tree, annotations, fields, links, outline and fonts are unchanged, so refresh_content rebuilds working bytes, display bytes and renderer and validates with a light check_pages (parse plus page count, keeping the roll-back guarantee) instead of a full inspect. added/marks are re-read only when the edit can change them; undo/redo re-read both. - AppearanceCache in pdfcraft-annot: built display appearances are reused while no annotation edit runs (content edits leave every annotation dictionary alone); cleared on comment, structural and full refreshes. set_appearance is split into build/apply halves so a hit skips the draw. - check_pages in pdfcraft-render: light post-edit validation. - Viewer: single-page content edits invalidate only their page (page_changed); other pages keep tiles, text and thumbnails. - XFA dataset sync now also runs for content edits. Co-Authored-By: Muse Spark <noreply@meta.com> * Fonts added by a content edit show in Properties and doc_info (read again on demand); form edits clear cached appearances too * M14: DATE_LANGUAGES is a static (21 entries trip clippy's large_const_arrays); rustfmt the Greek entry Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Preferences scroll in a short window; tests scroll to controls below the fold (storytold#487's roomier rows); the highlighter test waits for its mark under load Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Select tool: a multi-click selects only on the frame egui reports it, so a cleared selection (or the highlighter's marked word) isn't selected again The highlighter test now clicks at a human pace, with frames in between, which is what exposed it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Muse Spark <noreply@meta.com> Co-authored-by: Brandon Thomas <echelon@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Insert > Chart and Chart Design > Change Chart Type listed chart types as plain text buttons, with no picture of what each type looks like. A new chartgallery module draws a small sample chart per type in code (our own shapes and colours, no vendor artwork) and lays the types out as a grid of tiles, sample above and name below. Both menus use it; Change Chart Type marks the selected chart's current type, and a pick closes the menu. Co-authored-by: Cursor <cursoragent@cursor.com>
348f437 to
ebacf5b
Compare
FredApps
left a comment
There was a problem hiding this comment.
ReviewerA — source-read COMMENT (not an approval)
I read the head of the diff: chart-type menus show a sample of each chart (#353). The picker (Insert ▸ Chart and Chart Design ▸ Change Chart Type) shows a tile per type with a small sample chart "drawn in code (our own shapes and colours)", defined as elements in unit coordinates with a series colour. Drawing the samples from the project's own shapes avoids any image asset or Microsoft artwork, which is the right answer to the provenance question; PowerPoint's own chart icons are Microsoft's art and must not be copied, and the samples here are generic. A tile per type is many small drawings per frame, which are cheap. Colour must not be the only difference between samples for accessibility. I have not run it, and no exact-head CI result exists for this head. Nothing was run.
I ran nothing and have no exact-head CI result for this PR, so this is not an approval. Where a diff was long I read its code hunks rather than every generated or documentation line.
Status: waiting_author.
aiongg
left a comment
There was a problem hiding this comment.
AI-generated review (Opus). Not a maintainer decision.
Small fixes needed (not certain):
Adds a grid of code-drawn sample tiles for the main chart types to Insert ▸ Chart and Change Chart Type, marks the chart's current type and closes the menu on a pick. The samples use only generic shapes and colours, and no assets are added.
- egui fills a closed path correctly only when it is convex. The doughnut and sunburst ring wedges (crates/ui-egui/src/chartgallery.rs:80, outer arc plus reversed inner arc) are concave, so part of the hole gets filled. Emitting one quad per arc step keeps each piece convex.
- The area and surface samples (crates/ui-egui/src/chartgallery.rs:115 and :205) are one polygon under a polyline with a dip, which is also concave. One trapezoid per segment down to the baseline draws them correctly.
- The comment at crates/ui-egui/src/chartgallery.rs:231 says the samples are convex enough, which is not true for the doughnut and area samples.
- crates/ui-egui/src/ribbon.rs:3047 marks the type of the first chart anywhere in the selection, but chart.type is sent to the first selected shape (ribbon.rs:3059). Reading the current type from that same shape keeps the marker and the action in step.
- The named list after the tiles (ribbon.rs:1239, :3052) uses skip_while(Option::is_some).flatten() on chart_menu_types, which correctly leaves just the newer chart types (sunburst, Pareto, box and whisker) that are not already shown as tiles.
- Both menus now run the command once after the loop and call ui.close() (ribbon.rs:1244-1247, :3057-3063), so tiles and named buttons share one path.
- The menus have not been checked in the running app yet. A screenshot of both menus would confirm tile size, labels and the selected-tile highlight.
Claims checked:
- verified: Every ChartType gets a small sample chart drawn in code with the project's own shapes and colours, with no vendor artwork. (crates/ui-egui/src/chartgallery.rs:96 sample() matches every ChartType variant and returns unit-space primitives; colours come from SERIES_COLOURS at chartgallery.rs:30; no as…
- contradicted: The samples draw as the chart they stand for (unit-space bars, lines, areas, wedges, dots painted into the tile). (crates/ui-egui/src/chartgallery.rs:80 builds each doughnut wedge as one concave polygon (outer arc plus reversed inner arc), and chartgallery.rs:115 builds each area as one concave pol…
- verified: Insert ▸ Chart and Chart Design ▸ Change Chart Type show the main types as a grid of tiles, sample above and name below, instead of plain text buttons. (crates/ui-egui/src/ribbon.rs:1236 and ribbon.rs:3049 call chartgallery::picker with ChartType::MAIN; chartgallery.rs:249 picker lays out 4 tiles p…
- verified: Change Chart Type marks the selected chart's current type. (crates/ui-egui/src/ribbon.rs:3044-3047 reads the chart kind from the selection and passes it as
selected; chartgallery.rs picker fills the tile with t.selected and draws an accent outline. It takes the first chart in the selection, while… - verified: Picking a type closes the menu. (crates/ui-egui/src/ribbon.rs:1244-1247 and ribbon.rs:3057-3063 run the command and call ui.close() when a tile or named button is picked.)
- verified: Closes #353 (chart samples missing from the chart-type drop-down). (crates/ui-egui/src/ribbon.rs:1236 and ribbon.rs:3049 now show sample tiles in both chart-type drop-downs; these are the only two chart-type menus (crates/ui-egui/src/menus.rs:238 only runs insert.chart without a type).)
Recommendation: merge after the fixes above; they may be pushed to this branch.
Reviewed at ebacf5b.
|
Automated message. Not a maintainer decision. This branch conflicts with main. Could you merge or rebase main into it? The conflict needs a person to resolve. |
Summary
crates/ui-egui/src/chartgallery.rs: a small sample chart for everyChartType, drawn in code with our own shapes and colours (no vendor artwork, per AGENTS.md §1). Each sample is a list of unit-space primitives (bars, lines, areas, wedges, dots), so it is easy to test.Test plan
cargo test -p deckcraft-ui-egui --lib chartgallery: every chart type has a non-empty sample inside its box with finite coordinates, and no two main types share a samplecargo xtask ci(fmt, clippy, test, assets, layers, wasm)libxkbcommon-x11)Closes #353