Trials: Id::unique for upstream's deprecated Id::new; an unused import

This commit is contained in:
bflatastic committed 2026-11-22 01:53:46 +07:00
1 parent 4a76442e8f
commit a3cbd1070f
3 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -3,7 +3,7 @@
use craft_color_ui::AreaMode;
use craft_color_ui::ui::{AreaShape, ColorArea, Gamut};
use craft_theme::{ColorModel, HsbModel, Srgba};
use craft_ui::contract::{Bind, Show as _};
use craft_ui::contract::Show as _;
use craft_ui::testing::{Fixture, Story, StoryData, StoryOutput, trial};
use egui::{Color32, Pos2, Rect, Shape, Ui, Vec2};
+2 -2
View File
@@ -86,7 +86,7 @@ fn stop_centres(fixture: &Fixture) -> Vec<egui::Pos2> {
#[trial]
fn a_command_drag_moves_every_stop_and_keeps_their_spacing_within_the_column() {
let id = egui::Id::new("ruler");
let id = egui::Id::unique("ruler");
let stops = [72.0, 144.0, 216.0].map(|at| TabStop::new(at, TabAlign::Left, TabLeader::None)).to_vec();
let values = Rc::new(RefCell::new(RulerValues { stops, ..Default::default() }));
let shown = values.clone();
@@ -113,7 +113,7 @@ fn a_command_drag_moves_every_stop_and_keeps_their_spacing_within_the_column() {
#[trial]
fn dragging_is_none_off_the_ruler_after_escape_and_once_the_ruler_stops_showing() {
let id = egui::Id::new("ruler");
let id = egui::Id::unique("ruler");
let values = Rc::new(RefCell::new(RulerValues {
stops: vec![TabStop::new(72.0, TabAlign::Left, TabLeader::None)],
..Default::default()
+1 -1
View File
@@ -19,7 +19,7 @@ name = "ToolRail"
old = "craft_ui::patterns::rail::tool::ToolRail"
new = "craft_ui::rails::ToolRail"
status = "moved"
note = "A container: `ToolRail::new(label, &slots, &current, &last_used)` takes the data, and `show_rail(ui, footer)` shows it and returns `ToolRailOutput` (`response` and `dropped` are new). The surface is the chrome surface. The rail lays out as many columns as the width it gets holds (`ToolRail::dock_grid(ctx, cells)` is its dock column's grid) and `measure_rail(ui, width, footer)` gives its size at a width. It has no column or side toggle: the dock column's double arrow switches its columns and the toolbar moves by dragging. `pick_by_key` is not ported: tool commands carry their chords in the keymap."
note = "A container: `ToolRail::new(label, &slots, &current, &last_used)` takes the data, and `show_rail(ui, footer)` shows it and returns `ToolRailOutput` (`response` and `dropped` are new). The surface is the chrome surface. The rail lays out as many columns as the width it gets holds (`DockGrid::rail(cells)` is its dock column's grid) and `measure_rail(ui, width, footer)` gives its size at a width. It has no column or side toggle: the dock column's double arrow switches its columns and the toolbar moves by dragging. `pick_by_key` is not ported: tool commands carry their chords in the keymap."
[[type]]
name = "FlyoutButton"