Files
pdfcraft/crates/ui-egui/tests/it/main.rs
T
aiongg d764a8ebca refactor(ui): side panels on craft-ui task panes and the shared rail (#4606)
* refactor(ui): side panels on craft-ui task panes and the shared rail

The Tools pane and the open side panel are docked craft-ui task panes
(craft_ui::panes::PaneHost, Columns policy, no title bars, not movable),
and the rail is craft_ui::panes::Rail with the page navigation cluster
as its foot. On the right, outermost first: the rail, Tools when
Preferences > Tools panel side is Right, the side panel, the page.
Read mode uses the same panes without Tools; All tools full view still
covers them. Floating, tab groups and drag-in are gone with docking.rs.

- Widths are resizable within the old limits and saved under a new
  side_panels preference (version 1) with the Tools side and open state.
  The old docking value is read once as plain JSON and dropped on save.
- ui.dock becomes ui.panel {panel: tools|side, open, width};
  ui.dock.reset resets the side panels ("Reset side panels").
- F4 shows or hides the side panel (reopening the last one) and
  Shift+F4 the Tools panel, as View menu commands.
- craft-ui pinned to e9630ae7 (craft-libs#309).

* fix(ui): side panels clippy lint and the dragged-width test's grab offset

* chore(deps): pin craft-ui at 7c42807, whose pane resize edges work over the page

* chore(deps): pin craft-ui at craft-libs main ea4c823, with panes::Rail
2026-10-25 12:06:35 -04:00

83 lines
2.0 KiB
Rust

//! The crate's integration tests, linked into one test binary. `perf.rs` keeps its own process:
//! its frame-time budgets would charge each measurement for the other tests running beside it.
mod support;
/// Tests that render pixels (`h.render()`) take this first, so only one wgpu device exists at a
/// time. Lavapipe crashes when another test creates its Vulkan instance meanwhile (segfault in
/// `vkCreateSampler` during a concurrent `vkCreateInstance`). On machines without a GPU, wgpu falls
/// back to Microsoft's WARP, whose ARM64 pixel-shader JIT crashes (access violation in
/// `d3d10warp!PixelJitProgram::ClassifyVars`) when two devices compile at once, as on GitHub's
/// Windows 11 ARM64 runner. Hold it for the whole test (declared before the harness, so it's
/// released after the device is dropped).
static GPU: std::sync::Mutex<()> = std::sync::Mutex::new(());
fn gpu() -> std::sync::MutexGuard<'static, ()> {
// A test that panicked while holding it leaves nothing to clean up.
GPU.lock().unwrap_or_else(std::sync::PoisonError::into_inner)
}
mod accessibility;
mod actions;
mod animate;
mod attach_picker_target;
mod attachment_row;
mod bookmark_position;
mod bookmarks;
mod bulk_fields;
mod buttons;
mod camera;
mod column_select;
mod combine_grid;
mod commands;
mod comment_pin;
mod comments;
mod compare;
mod content;
mod control;
mod create;
mod date_format;
mod dialog_chrome;
mod document_links;
mod editing;
mod editor_taps;
mod export;
mod fill_sign;
mod folders;
mod fonts;
mod forms;
mod identity;
mod javascript;
mod layer_actions;
mod links;
mod marks;
mod object_selection;
mod ocr;
mod open_action;
mod organize_drag;
mod pageboxes;
mod panel_snapshots;
mod pdf_links;
mod pickers;
mod pointer;
mod preferences_layout;
mod prepare;
mod print;
mod protect;
mod reading_colors;
mod recovery;
mod redact;
mod reload;
mod side_panels;
mod signing;
mod stamps;
mod text_select;
mod theme;
mod theme_button;
mod trust_signer;
mod ui;
mod updates;
mod view;
mod viewer;
mod xfa;