mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-29 01:34:29 +01:00
Artboards: port the panel-height test to the page list
main draws the Artboards panel with the shared page list, whose list fills the panel above its footer. The test now drives that panel through the panel harness: in a 300 pt and a 700 pt panel the New Artboard button ends inside the panel at its bottom and follows its height, and with 36 artboards the last row lies below the footer. The ui-parity and target-app-parity rows describe the list as it is drawn now, and a stray tab in the test name is fixed.
This commit is contained in:
1 parent
83745a0231
commit
d9c28efd41
3 files changed
+29
-2
No files matched your search
@@ -1315,3 +1315,30 @@ fn artboard_options_groups_are_a_section_gap_apart() {
|
||||
assert!((gap - row).abs() < 0.01, "{upper} to {lower}: {gap} apart, the row gap is {row}");
|
||||
}
|
||||
}
|
||||
|
||||
/// The list fills the panel above its footer, so the footer's buttons sit at the bottom of the panel and follow its
|
||||
/// height, as the Layers panel's do, and a list longer than the panel scrolls above them (#6085).
|
||||
#[test]
|
||||
fn the_list_fills_the_panel_and_the_bottom_bar_follows_its_height() {
|
||||
use crate::tests::panel_harness::Panel;
|
||||
let mut app = VectorcraftApp::new(Session::new(), Default::default());
|
||||
app.session.execute("file.new", &json!({"width": 200, "height": 150, "artboards": 36})).unwrap();
|
||||
let mut panel = Panel::new(app, show);
|
||||
// The bottom of the footer's New Artboard button in a panel `h` points tall.
|
||||
let bar_bottom = |panel: &mut Panel, h: f32| {
|
||||
panel.room(egui::vec2(300.0, h));
|
||||
panel.frame();
|
||||
panel.frame();
|
||||
panel.rect("New Artboard").bottom()
|
||||
};
|
||||
let short = bar_bottom(&mut panel, 300.0);
|
||||
assert!(short <= 300.0, "the buttons end inside a 300 pt panel, not below it: {short}");
|
||||
assert!(short > 300.0 - 40.0, "the buttons sit at the bottom of a 300 pt panel: {short}");
|
||||
// The 36th row lies at or below the footer: the rows overflow the panel and scroll above it.
|
||||
let footer_top = panel.rect("New Artboard").top();
|
||||
let hidden = !panel.shows("Artboard 36") || panel.rect("Artboard 36").top() >= footer_top;
|
||||
assert!(hidden, "the 36 rows overflow a 300 pt panel and scroll above the buttons at {footer_top}");
|
||||
let tall = bar_bottom(&mut panel, 700.0);
|
||||
assert!(tall <= 700.0, "the buttons end inside a 700 pt panel: {tall}");
|
||||
assert!(tall - short > 350.0, "the buttons follow the panel's height: {short} -> {tall}");
|
||||
}
|
||||
@@ -864,7 +864,7 @@ since 2026-10-01.
|
||||
|
||||
- **Effects in the art's bounds:** Export with Use Artboards off, Fit to Artwork Bounds, and the other exports of the whole art (EPS without artboards, Export for Screens' Full Document, Save for Web (Legacy) with Clip to Artboard off) measure each visible object as the export crops above do. The drop shadows and other effects of groups, layers, type and images are inside the image or the artboard. A Shaper group without effects of its own is measured by the art it shows, and the hidden members of a group with a drop shadow, a glow or another raster effect do not count unless it is a Shaper group or also has a geometry, Pathfinder, Crop Marks or 3D effect or a visible effect on its own fill or stroke. The SVG of an artboard keeps an object whose effects alone reach the artboard. Tests measure a group, type and an image with a drop shadow, export a group and type with Use Artboards off and fit an artboard to them.
|
||||
|
||||
- **The Artboards panel resizes with the window (#6085):** its list takes the panel's height less the bottom bar, as the Layers panel's list does, so a long artboard list scrolls in a panel that grows and shrinks with the window and the buttons stay at its bottom (`panels::artboards` test `the_list_fills_the_panel_and_the_bottom_bar_follows_its_height`, which fails with the old fixed 110/220 px list).
|
||||
- **The Artboards panel resizes with the window (#6085):** its list fills the panel above the footer, as the Layers panel's list does, so a long artboard list scrolls in a panel that grows and shrinks with the window and the buttons stay at its bottom (`panels::artboards` test `the_list_fills_the_panel_and_the_bottom_bar_follows_its_height`).
|
||||
- **EPS Save with Use Artboards:** Save As › EPS Options show Use Artboards with All or Range, for a separate file per artboard ([saving in EPS](https://helpx.adobe.com/illustrator/desktop/save-and-export/export-files-to-different-formats/save-artwork-in-eps-format.html)), unchecked by default (the scripting reference's EPS save options list `saveMultipleArtboards` with a default of false, [scripting reference](https://web.archive.org/web/20160803105056/https://wwwimages.adobe.com/content/dam/Adobe/en/devnet/illustrator/sdk/CC2015_3/Illustrator%20JavaScript%20Scripting%20Reference.pdf)). Unchecked, Save writes one file whose bounding box fits all the visible art, as Export does, without the artboards' background colors; when no art shows, the page is the first artboard in its color. An opened EPS saved back this way loses its page margins. Checked with two or more chosen artboards, the file at the path is the central file of the visible art and each artboard is also written to `<name>_<artboard>.eps` beside it. Checked with one chosen artboard, VectorCraft writes that artboard as the page of the file at the path alone (the behavior Save had since #4293). Evidence: `cmd::fileio::tests_artboard_fill::eps_save_draws_the_color_on_an_artboard_page`, `tests::save::eps_save_without_use_artboards_fits_the_box_to_art_past_the_artboard`, `tests::save::opened_eps_saves_to_its_own_file_around_its_art_or_on_its_page`, `tests::save::eps_save_with_use_artboards_writes_the_central_file_and_one_per_artboard`, `dialogs::save_options::tests::eps_save_as_shows_use_artboards_off_and_writes_the_art_or_the_artboard`.
|
||||
- **EPS Options custom flattener settings:** the help page describes flattening an EPS's transparency with a preset or with custom options, adjusted through Custom ([saving in EPS](https://helpx.adobe.com/illustrator/desktop/save-and-export/export-files-to-different-formats/save-artwork-in-eps-format.html)). EPS Options now has Custom… beside the flattener Preset. It opens Custom Transparency Flattener Options on the settings the export would use: the raster/vector balance, both resolutions, the text and stroke outline switches, Clip Complex Regions and Anti-alias Rasters. OK goes back to EPS Options with the preset shown as [Custom], the export flattens with those settings, and the next EPS Options start from them; choosing a preset drops them, and Cancel goes back to EPS Options unchanged. Preserve Alpha Transparency stays off, and overprints are kept only with Overprints set to Preserve. The [Custom] label, the remembering, the Cancel behavior, Anti-alias Rasters and the ranges (balance 0 to 100, resolutions 1 to 2400 ppi) are VectorCraft's own. Evidence: `dialogs::tests_eps::custom_flattener_options_start_from_the_preset_and_cancel_goes_back_unchanged`, `custom_flattener_options_are_exported_and_remembered_until_a_preset_is_chosen`, `bad_custom_flattener_options_keep_the_dialog_open`.
|
||||
- **EPS export and Discard White Overprint:** the help page describes Discard White Overprint as taking the overprint attribute off white objects in output, without changing the artwork ([white overprint](https://helpx.adobe.com/illustrator/desktop/manage-colors/apply-transparency-and-blending/white-overprint.html)). EPS export and PostScript printing, composite and separated, now follow Discard White Overprint in Output (Document Setup), as PDF export does: a white fill or stroke marked to overprint knocks out while the setting is on and overprints while it is off. The same page says the setting covers process white and not spot white, so a white fill linked to a spot swatch that has a color keeps overprinting. The tiles of an overprinting pattern fill overprint with it. Evidence: `cmd::fileio::tests_eps::overprints_are_kept_or_discarded`, `tests::tiles_overprint_with_their_overprinting_pattern`, `tests::white_type_fills_knock_out_with_discard_white_overprint`, `tests::spot_white_fills_overprint_with_discard_white_overprint`, `print::tests::white_overprints_knock_out_on_postscript_plates_with_discard_white_overprint`.
|
||||
|
||||
+1
-1
@@ -394,7 +394,7 @@ tools, never checked side by side) isn't captured row by row.
|
||||
| Selection tool: selected area type and type on a path show an in port and an out port (empty, an arrow where threaded, the red "+" of overflow); a click on either loads the text cursor; a click on a closed path, on empty canvas or a drag threads the text there, after the clicked frame from its out port, before it from its in port; Escape or another tool drops it; a double-click on a threaded port breaks the thread there | partial | #2572 (`text.thread.add`, `before` for the in port); the out port sits on the frame's right side above the bottom-right corner handle and the in port on its left side below the top-left one, so the handles can still be grabbed; a double-click on a threaded port breaks the thread (`text.thread.break`, [archived help](https://web.archive.org/web/20220127090642/https://helpx.adobe.com/illustrator/using/creating-text.html)); the loaded text has a cursor of its own, with a link badge over a closed path, area type or type on a path that a click threads it into |
|
||||
| Shift-click selects several artboards (Artboard tool, Artboards panel); they move, Alt-copy and delete together | done | `artboard.move`/`artboard.delete` `indices` (#1139); in the panel, Shift- and Ctrl/Cmd-click work with any tool by switching to the Artboard tool (#5698); panel menu, trash and Properties share selected-set deletion; all-selected retains artboard 1 and a single board cannot be deleted, with pointer-event and Undo/Redo coverage |
|
||||
| Artboards panel: drag a row above or below another to reorder the artboards (as Move Up / Move Down do) | done | #4687; a line shows where the row lands, `artboard.reorder` in one undo step, the moved artboard becomes active; public forum answers describe the drag |
|
||||
| Artboards panel: the list fills the panel's height and the buttons stay at its bottom, so the panel resizes with the window like the Layers panel (#6085) | done | the list takes ui.available_height() less the bottom bar with ScrollArea::auto_shrink([false, false]); panels::artboards test he_list_fills_the_panel_and_the_bottom_bar_follows_its_height |
|
||||
| Artboards panel: the list fills the panel's height and the buttons stay at its bottom, so the panel resizes with the window like the Layers panel (#6085) | done | the list fills the panel above its footer, and a long list scrolls above the buttons; `panels::artboards` test `the_list_fills_the_panel_and_the_bottom_bar_follows_its_height` |
|
||||
| Artboards panel › Delete Empty Artboards | done | `artboard.deleteEmpty`; one undo step, guides go too, locked artboards stay, and artboard 1 when every artboard is empty and none is locked; an artboard is empty when no object (hidden, locked and template art included; guides not) has visual bounds that meet or touch it, a group counting by its members and a clip group or clipping layer by its members inside the clip (our reading of "no artwork"; the pages give no finer rule); [spec](https://helpx.adobe.com/illustrator/desktop/create-manage-artboards/add-edit-artboards/delete-artboards.html) |
|
||||
| Artboard Delete/Backspace delete selected boards while protecting artwork, the last board and active drags | done | Headless shortcut regressions in `tests/distortkeys.rs` cover retaining the original first board when all are selected, single-board protection, artwork, saved state and Undo/Redo; the navigator follows the tool’s surviving board through repeated deletion and history changes. |
|
||||
| Artboard navigator synchronizes the active tool selection before deletion | done | Actual status-bar Next → Delete/Backspace and Next → Properties Delete regressions in `chrome.rs` cover surviving board records, preserved artwork and Undo/Redo; other tools keep object selection and history. **Tab-switch follow-up:** document-tab changes align the Artboard tool with the displayed board. Actual A → B → A tab clicks followed by Properties Delete and controls for same-tab multiselection, Move/Scale Artwork options and other tools passed, along with historical full CI on `a0671777`. [Validation evidence](target-app-parity.md#evidence-what-ships-today-by-area). **Clean-tab close:** with the Artboard tool active, closing a clean active tab restores the surviving document's displayed board before Properties Delete. |
|
||||
|
||||
Reference in new issue
Block a user