mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-25 02:21:53 +00:00
#8284: restore Brush Options canvas color sampling
This commit is contained in:
@@ -418,6 +418,7 @@ impl VectorcraftApp {
|
||||
/// and the tool remembered for the toolbar group and for the Touch workspace's drawing mode
|
||||
/// stays as it was.
|
||||
pub(crate) fn try_select_tool(&mut self, id: &str) -> Result<(), String> {
|
||||
crate::dialogs::cancel_brush_key_color(self, false);
|
||||
// The tip of a pen whose eraser end selected the Eraser doesn't undo this choice, and
|
||||
// neither does letting go of a held tool shortcut.
|
||||
self.pen_end.forget_tool();
|
||||
|
||||
@@ -13,8 +13,12 @@ use super::{Color32, Drag, Mods, Point, PointerEvent, PointerKind, Pos2, Shape,
|
||||
/// Dispatch canvas pointer, keyboard and drop events through the active document view.
|
||||
pub(super) fn handle_input(app: &mut VectorcraftApp, ui: &Ui, resp: &egui::Response, rect: egui::Rect) {
|
||||
// A modal dialog takes the canvas's presses, finger taps, long touches and view navigation, from the frame it opens.
|
||||
let cancelled = crate::dialogs::refresh_brush_key_color(app);
|
||||
let modal = crate::panel_docking::modal_open(app, ui.ctx());
|
||||
let (pointer, m, space, hover) = wheel_view(app, ui, resp, rect, modal);
|
||||
if (cancelled && pointer.primary_pressed()) || crate::dialogs::brush_key_color_input(app, ui, resp, rect) {
|
||||
return;
|
||||
}
|
||||
let v = *app.view().unwrap_or(&View::default());
|
||||
let xf = Xf::at(rect, &v, app.canvas_ui_zoom);
|
||||
// A lifted pen or finger takes the pointer away in the frame it lifts (egui's `PointerGone`),
|
||||
|
||||
@@ -17,6 +17,7 @@ pub mod action_stop;
|
||||
pub mod artboard_options;
|
||||
pub mod blend_options;
|
||||
mod brush_art_options;
|
||||
pub(crate) use brush_art_options::{brush_key_color_canvas, brush_key_color_input, cancel_brush_key_color, refresh_brush_key_color};
|
||||
pub mod brush_delete;
|
||||
pub mod brush_options;
|
||||
pub mod brush_replace_art;
|
||||
@@ -681,6 +682,7 @@ pub(crate) fn field_set(app: &mut VectorcraftApp, field: &str, old: Option<&Valu
|
||||
/// Close the open dialog as Cancel does, rolling back a live preview and showing the dialog it was
|
||||
/// opened over (`ui.dialog.cancel`).
|
||||
pub fn cancel(app: &mut VectorcraftApp) {
|
||||
cancel_brush_key_color(app, true);
|
||||
missing_fonts::requeue_replaced(app);
|
||||
// More Settings' pop-up and Save Preset end on their own; New Document stays.
|
||||
if app.ui.dialog.as_mut().is_some_and(new_document::close_popup) {
|
||||
@@ -741,6 +743,7 @@ pub(crate) fn reset(app: &mut VectorcraftApp) -> DialogResult {
|
||||
|
||||
/// Apply the open dialog (OK).
|
||||
pub fn confirm(app: &mut VectorcraftApp) -> DialogResult {
|
||||
cancel_brush_key_color(app, true);
|
||||
missing_fonts::requeue_replaced(app);
|
||||
let Some(d) = app.ui.dialog.clone() else { return Err("no dialog open".into()) };
|
||||
// A file dialog it shows off the UI thread confirms the dialog as it is again.
|
||||
@@ -780,6 +783,7 @@ pub(crate) fn opened_by_panel(app: &mut VectorcraftApp) {
|
||||
/// Draws the active dialog and handles shared initial focus, keyboard shortcuts and actions.
|
||||
/// Inline actions and footer buttons use the same confirmation and preview rollback paths.
|
||||
pub fn show(app: &mut VectorcraftApp, ctx: &egui::Context) {
|
||||
refresh_brush_key_color(app);
|
||||
crate::shortcuts::hold_back_keys(app, ctx);
|
||||
about::show(app, ctx);
|
||||
settle(app);
|
||||
@@ -837,7 +841,8 @@ pub fn show(app: &mut VectorcraftApp, ctx: &egui::Context) {
|
||||
let initial = if revolves { egui::vec2((ctx.content_rect().width() / 2.0 - 226.0).max(0.0), -40.0) } else { egui::vec2(0.0, -40.0) };
|
||||
let id = egui::Id::unique(("dialog", d.kind.as_str()));
|
||||
let id = if revolves { id.with("revolve") } else { id };
|
||||
modal::show_at(ctx, &heading, id, initial, MARGIN, |ui| {
|
||||
let canvas_pick = brush_key_color_canvas(app, ctx);
|
||||
modal::show_at(ctx, &heading, id, initial, MARGIN, canvas_pick, |ui| {
|
||||
// Never wider than the window (a large UI scale in a small window): the text wraps.
|
||||
let room = (ctx.content_rect().width() - 2.0 * (f32::from(MARGIN) + EDGE_GAP)).max(EDGE_GAP);
|
||||
ui.set_min_width(spec.min_width.min(room));
|
||||
|
||||
@@ -719,12 +719,130 @@ fn tile_doc(art: &Node, w: f64, h: f64) -> Option<Document> {
|
||||
Some(doc)
|
||||
}
|
||||
|
||||
/// The private dialog marker survives with its draft, never in the brush definition.
|
||||
const KEY_COLOR_DOC: &str = "__keyColorDoc";
|
||||
|
||||
fn key_color_owner_valid(app: &VectorcraftApp) -> bool {
|
||||
let Some(pick) = app.ui.brush_key_color_pick.as_ref() else { return false };
|
||||
app.session.active().is_some_and(|doc| doc.uid == pick.doc)
|
||||
&& app.ui.dialog.as_ref().is_some_and(|dialog| {
|
||||
dialog.kind == super::brush_options::KIND
|
||||
&& dialog.str("colorization") == "hueShift"
|
||||
&& dialog.fields.get(KEY_COLOR_DOC).and_then(Value::as_u64) == Some(pick.doc)
|
||||
})
|
||||
}
|
||||
|
||||
fn key_color_pick_active(app: &VectorcraftApp) -> bool {
|
||||
key_color_owner_valid(app) && app.session.tool_id() == "eyedropper" && app.session.tool_options()["brushKeyColor"] == true
|
||||
}
|
||||
|
||||
/// Only the owned Brush Options pick opens an input aperture; other modal owners still block it.
|
||||
pub(crate) fn brush_key_color_canvas(app: &VectorcraftApp, ctx: &egui::Context) -> Option<egui::Rect> {
|
||||
(key_color_pick_active(app)
|
||||
&& !app.ui.about
|
||||
&& !app.ui.palette_open
|
||||
&& !app.file_dialog_open()
|
||||
&& !crate::updates_ui::blocks_input(app)
|
||||
&& !egui::Popup::is_any_open(ctx))
|
||||
.then_some(app.canvas_rect)
|
||||
.flatten()
|
||||
}
|
||||
|
||||
/// Clear only the transient mode owned by this dialog, including a parked eyedropper.
|
||||
pub(crate) fn cancel_brush_key_color(app: &mut VectorcraftApp, restore: bool) {
|
||||
let Some(pick) = app.ui.brush_key_color_pick.take() else { return };
|
||||
let options = Map::from_iter([("brushKeyColor".into(), json!(false)), ("stop".into(), Value::Null)]);
|
||||
app.session.set_tool_options(Some("eyedropper"), &options);
|
||||
if restore && app.session.tool_id() == "eyedropper" {
|
||||
app.return_to_tool(&pick.back);
|
||||
}
|
||||
}
|
||||
|
||||
/// Refresh before real canvas input and dialog layout, so a stale press cannot reach another tool.
|
||||
pub(crate) fn refresh_brush_key_color(app: &mut VectorcraftApp) -> bool {
|
||||
if app.ui.brush_key_color_pick.is_none() || key_color_pick_active(app) {
|
||||
return false;
|
||||
}
|
||||
let restore = !key_color_owner_valid(app) && app.session.tool_id() == "eyedropper";
|
||||
cancel_brush_key_color(app, restore);
|
||||
true
|
||||
}
|
||||
|
||||
/// A foreground color click owns its physical Down/Up; the restored tool receives neither.
|
||||
pub(crate) fn brush_key_color_input(app: &mut VectorcraftApp, ui: &egui::Ui, response: &egui::Response, rect: egui::Rect) -> bool {
|
||||
if app.ui.brush_key_color_pick.is_none() {
|
||||
return false;
|
||||
}
|
||||
let (pointer, focused, lost) = ui.input(|input| {
|
||||
let up = input
|
||||
.events
|
||||
.iter()
|
||||
.position(|event| matches!(event, egui::Event::PointerButton { button: egui::PointerButton::Primary, pressed: false, .. }));
|
||||
let gone = input.events.iter().position(|event| matches!(event, egui::Event::PointerGone));
|
||||
let lost = gone.is_some_and(|gone| up.is_none_or(|up| gone < up))
|
||||
|| input.events.iter().any(|event| matches!(event, egui::Event::Touch { phase: egui::TouchPhase::Cancel, .. }))
|
||||
|| input.multi_touch().is_some()
|
||||
|| response.long_touched();
|
||||
(input.pointer.clone(), input.focused, lost)
|
||||
});
|
||||
let pending = app.ui.brush_key_color_pick.as_ref().is_some_and(|pick| pick.press.is_some());
|
||||
if pending && (!focused || lost || (!pointer.primary_down() && !pointer.primary_released())) {
|
||||
cancel_brush_key_color(app, true);
|
||||
return true;
|
||||
}
|
||||
if brush_key_color_canvas(app, ui.ctx()).is_none() {
|
||||
if let Some(pick) = app.ui.brush_key_color_pick.as_mut() {
|
||||
pick.press = None;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if !focused {
|
||||
return true;
|
||||
}
|
||||
if pointer.primary_pressed()
|
||||
&& response.hovered()
|
||||
&& let Some(point) = pointer.interact_pos().filter(|point| rect.contains(*point) && ui.clip_rect().contains(*point))
|
||||
{
|
||||
let xf = crate::canvas::Xf::at(rect, app.view().unwrap_or(&crate::View::default()), app.canvas_ui_zoom);
|
||||
if let Some(pick) = app.ui.brush_key_color_pick.as_mut() {
|
||||
pick.press = Some(xf.to_doc(point));
|
||||
}
|
||||
}
|
||||
if pointer.button_released(egui::PointerButton::Primary)
|
||||
&& let Some(point) = app.ui.brush_key_color_pick.as_mut().and_then(|pick| pick.press.take())
|
||||
{
|
||||
// The existing tool returns a deferred SwitchTool request. Release Eye before applying
|
||||
// that request, so a held color click cannot start or finish a stroke in the prior tool.
|
||||
let view = app.view_info();
|
||||
let down = vectorcraft_tools::PointerEvent::new(vectorcraft_tools::PointerKind::Down, point.x, point.y);
|
||||
let up = vectorcraft_tools::PointerEvent::new(vectorcraft_tools::PointerKind::Up, point.x, point.y);
|
||||
let sampled = app.session.pointer(&down, view);
|
||||
let released = app.session.pointer(&up, view);
|
||||
crate::canvas::apply_requests(app, sampled);
|
||||
crate::canvas::apply_requests(app, released);
|
||||
}
|
||||
true
|
||||
}
|
||||
|
||||
/// Key Color eyedropper: sample the next click on the art into this dialog's `keyColor`.
|
||||
fn key_color_eyedropper(app: &mut VectorcraftApp) {
|
||||
let back = app.session.tool_id();
|
||||
app.select_tool("eyedropper");
|
||||
fn key_color_eyedropper(app: &mut VectorcraftApp, dialog: &mut Dialog) {
|
||||
if app.ui.brush_key_color_pick.is_some() {
|
||||
cancel_brush_key_color(app, true);
|
||||
return;
|
||||
}
|
||||
let Some(doc) = app.session.active().map(|doc| doc.uid) else { return };
|
||||
if dialog.fields.get(KEY_COLOR_DOC).and_then(Value::as_u64).is_some_and(|owner| owner != doc) {
|
||||
return;
|
||||
}
|
||||
let back = app.session.tool_id().to_string();
|
||||
if let Err(error) = app.try_select_tool("eyedropper") {
|
||||
app.status(error);
|
||||
return;
|
||||
}
|
||||
app.session.set_tool_option("brushKeyColor", &json!(true));
|
||||
app.session.set_tool_option("stop", &json!(back));
|
||||
dialog.fields.insert(KEY_COLOR_DOC.into(), json!(doc));
|
||||
app.ui.brush_key_color_pick = Some(crate::state::BrushKeyColorPick { doc, back, press: None });
|
||||
}
|
||||
|
||||
fn colorization_body(app: &mut VectorcraftApp, ui: &mut egui::Ui, d: &mut Dialog) {
|
||||
@@ -762,7 +880,7 @@ fn colorization_body(app: &mut VectorcraftApp, ui: &mut egui::Ui, d: &mut Dialog
|
||||
}
|
||||
}
|
||||
if widgets::icon_button(ui, "pipette", tl!("Eyedropper: click the art to sample the key color"), false, 22.0).clicked() {
|
||||
key_color_eyedropper(app);
|
||||
key_color_eyedropper(app, d);
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -770,6 +888,17 @@ fn colorization_body(app: &mut VectorcraftApp, ui: &mut egui::Ui, d: &mut Dialog
|
||||
|
||||
/// Apply a sampled colour to the open Brush Options dialog (`brushKeyColor` tool request).
|
||||
pub(super) fn apply_key_color_sample(app: &mut VectorcraftApp, color: &Value) {
|
||||
let marked = app.ui.dialog.as_ref().is_some_and(|dialog| dialog.fields.contains_key(KEY_COLOR_DOC));
|
||||
if app.ui.brush_key_color_pick.is_some() {
|
||||
if !key_color_owner_valid(app) {
|
||||
cancel_brush_key_color(app, false);
|
||||
return;
|
||||
}
|
||||
cancel_brush_key_color(app, false);
|
||||
} else if marked {
|
||||
// A reply cannot change the draft after its owned pick was cancelled or replaced.
|
||||
return;
|
||||
}
|
||||
let Some(d) = app.ui.dialog.as_mut().filter(|d| d.kind == super::brush_options::KIND) else { return };
|
||||
if d.str("colorization") != "hueShift" {
|
||||
return;
|
||||
|
||||
@@ -13,18 +13,44 @@ use crate::theme::{self, Tokens};
|
||||
/// screen's centre until it is moved, with `margin` inside its frame. `add` draws the contents and
|
||||
/// should start with [`heading`] (or [`drag_band`]) so the window can be moved.
|
||||
pub(crate) fn show<R>(ctx: &egui::Context, title: &str, id: Id, nudge: f32, margin: i8, add: impl FnOnce(&mut egui::Ui) -> R) -> Option<R> {
|
||||
show_at(ctx, title, id, egui::vec2(0.0, nudge), margin, add)
|
||||
show_at(ctx, title, id, egui::vec2(0.0, nudge), margin, None, add)
|
||||
}
|
||||
|
||||
/// A modal that starts at a chosen offset, then keeps the user's dragged position.
|
||||
pub(crate) fn show_at<R>(ctx: &egui::Context, title: &str, id: Id, initial: Vec2, margin: i8, add: impl FnOnce(&mut egui::Ui) -> R) -> Option<R> {
|
||||
pub(crate) fn show_at<R>(
|
||||
ctx: &egui::Context,
|
||||
title: &str,
|
||||
id: Id,
|
||||
initial: Vec2,
|
||||
margin: i8,
|
||||
canvas_pick: Option<Rect>,
|
||||
add: impl FnOnce(&mut egui::Ui) -> R,
|
||||
) -> Option<R> {
|
||||
let t = Tokens::get(ctx);
|
||||
let dim = backdrop();
|
||||
egui::Area::new(dim.id).order(dim.order).fixed_pos(egui::Pos2::ZERO).show(ctx, |ui| {
|
||||
// Modal, but the canvas isn't dimmed so previews stay readable (as in the reference app).
|
||||
// Not focusable (`Sense::click()` is): Tab goes through the dialog's controls, not the backdrop.
|
||||
ui.allocate_rect(ctx.content_rect(), egui::Sense::CLICK);
|
||||
});
|
||||
if let Some(canvas) = canvas_pick {
|
||||
let screen = ctx.content_rect();
|
||||
let canvas = canvas.intersect(screen);
|
||||
// Separate areas keep their hit rectangles outside the canvas. One area around a hole
|
||||
// would still cover the canvas with its enclosing rectangle.
|
||||
let regions = [
|
||||
Rect::from_min_max(screen.min, egui::pos2(screen.right(), canvas.top())),
|
||||
Rect::from_min_max(egui::pos2(screen.left(), canvas.top()), egui::pos2(canvas.left(), canvas.bottom())),
|
||||
Rect::from_min_max(egui::pos2(canvas.right(), canvas.top()), egui::pos2(screen.right(), canvas.bottom())),
|
||||
Rect::from_min_max(egui::pos2(screen.left(), canvas.bottom()), screen.max),
|
||||
];
|
||||
for (index, region) in regions.into_iter().enumerate().filter(|(_, region)| region.width() > 0.0 && region.height() > 0.0) {
|
||||
egui::Area::new(dim.id.with(index)).order(dim.order).fixed_pos(region.min).show(ctx, |ui| {
|
||||
ui.allocate_rect(region, egui::Sense::CLICK);
|
||||
});
|
||||
}
|
||||
} else {
|
||||
egui::Area::new(dim.id).order(dim.order).fixed_pos(egui::Pos2::ZERO).show(ctx, |ui| {
|
||||
// Modal, but the canvas isn't dimmed so previews stay readable (as in the reference app).
|
||||
// Not focusable (`Sense::click()` is): Tab goes through the dialog's controls, not the backdrop.
|
||||
ui.allocate_rect(ctx.content_rect(), egui::Sense::CLICK);
|
||||
});
|
||||
}
|
||||
let shown = egui::Window::new(title)
|
||||
.id(id)
|
||||
.order(egui::Order::Foreground)
|
||||
|
||||
@@ -6,6 +6,14 @@ use vectorcraft_geom::Point;
|
||||
|
||||
use crate::theme::Brightness;
|
||||
|
||||
/// A Brush Options Key Color click, owned by its dialog and document until release or cancel.
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct BrushKeyColorPick {
|
||||
pub doc: u64,
|
||||
pub back: String,
|
||||
pub press: Option<Point>,
|
||||
}
|
||||
|
||||
/// Per-document view (camera).
|
||||
#[derive(Clone, Copy, Debug, Serialize, Deserialize)]
|
||||
pub struct View {
|
||||
@@ -563,6 +571,8 @@ pub struct UiState {
|
||||
pub tab_hid: Option<TabHid>,
|
||||
pub view: ViewFlags,
|
||||
pub dialog: Option<Dialog>,
|
||||
#[serde(skip)]
|
||||
pub brush_key_color_pick: Option<BrushKeyColorPick>,
|
||||
/// Messages to show in a dialog once the open one is closed (`dialogs::confirm::tell`), in
|
||||
/// the order they came.
|
||||
#[serde(skip)]
|
||||
@@ -1194,6 +1204,7 @@ impl Default for UiState {
|
||||
tab_hid: None,
|
||||
view: ViewFlags::default(),
|
||||
dialog: None,
|
||||
brush_key_color_pick: None,
|
||||
told: vec![],
|
||||
answering_control: false,
|
||||
flyout: None,
|
||||
|
||||
@@ -0,0 +1,395 @@
|
||||
//! Regression coverage for Brush Options Key Color sampling through the real modal canvas route.
|
||||
#![allow(clippy::unwrap_used, clippy::expect_used, clippy::panic)]
|
||||
|
||||
use egui::{Event, Modifiers, PointerButton, Pos2, RawInput, Rect, vec2};
|
||||
use serde_json::json;
|
||||
use vectorcraft_color::{Color, Paint};
|
||||
use vectorcraft_engine::Session;
|
||||
use vectorcraft_geom::Point;
|
||||
use vectorcraft_tools::{PointerEvent, PointerKind};
|
||||
use vectorcraft_ui_egui::{VectorcraftApp, canvas};
|
||||
|
||||
const BRUSH: &str = "Original key-color fixture";
|
||||
const PICK_KEY: &str = "Eyedropper: click the art to sample the key color";
|
||||
|
||||
fn frame(app: &mut VectorcraftApp, ctx: &egui::Context, events: Vec<Event>) -> egui::FullOutput {
|
||||
let mut raw = RawInput { events, focused: true, screen_rect: Some(Rect::from_min_size(Pos2::ZERO, vec2(1600.0, 1100.0))), ..Default::default() };
|
||||
app.raw_input_hook(ctx, &mut raw);
|
||||
ctx.run_ui(raw, |ui| {
|
||||
app.tick(ui.ctx());
|
||||
app.ui(ui);
|
||||
})
|
||||
}
|
||||
|
||||
fn settle(app: &mut VectorcraftApp, ctx: &egui::Context) {
|
||||
for _ in 0..4 {
|
||||
frame(app, ctx, vec![]).textures_delta.clear();
|
||||
}
|
||||
}
|
||||
|
||||
fn click_at(app: &mut VectorcraftApp, ctx: &egui::Context, at: Pos2, modifiers: Modifiers) {
|
||||
let press = |pressed| Event::PointerButton { pos: at, button: PointerButton::Primary, pressed, modifiers };
|
||||
frame(app, ctx, vec![Event::ModifiersChanged(modifiers), Event::PointerMoved(at)]).textures_delta.clear();
|
||||
frame(app, ctx, vec![press(true)]).textures_delta.clear();
|
||||
frame(app, ctx, vec![press(false)]).textures_delta.clear();
|
||||
frame(app, ctx, vec![Event::ModifiersChanged(Modifiers::NONE)]).textures_delta.clear();
|
||||
}
|
||||
|
||||
fn click_control(app: &mut VectorcraftApp, ctx: &egui::Context, label: &str) {
|
||||
let mut bounds = None;
|
||||
for _ in 0..3 {
|
||||
let mut output = frame(app, ctx, vec![]);
|
||||
if let Some(update) = &output.platform_output.accesskit_update {
|
||||
bounds = update.nodes.iter().find(|(_, node)| node.label() == Some(label)).and_then(|(_, node)| node.bounds());
|
||||
}
|
||||
output.textures_delta.clear();
|
||||
if bounds.is_some() {
|
||||
break;
|
||||
}
|
||||
}
|
||||
let bounds = bounds.unwrap_or_else(|| panic!("missing actual Brush Options control: {label}"));
|
||||
let at = egui::pos2(((bounds.x0 + bounds.x1) * 0.5) as f32, ((bounds.y0 + bounds.y1) * 0.5) as f32);
|
||||
click_at(app, ctx, at, Modifiers::NONE);
|
||||
settle(app, ctx);
|
||||
}
|
||||
|
||||
fn key_color(app: &VectorcraftApp) -> Color {
|
||||
let dialog = app.ui.dialog.as_ref().expect("Brush Options remains open");
|
||||
assert_eq!(dialog.kind, "brushOptions");
|
||||
assert_eq!(dialog.fields.get("colorization"), Some(&json!("hueShift")));
|
||||
vectorcraft_engine::cmd::color_value(dialog.fields.get("keyColor").expect("Key Color field")).unwrap()
|
||||
}
|
||||
|
||||
fn open_options(app: &mut VectorcraftApp, ctx: &egui::Context) {
|
||||
app.run("ui.brushOptions", json!({"name": BRUSH})).unwrap();
|
||||
settle(app, ctx);
|
||||
assert_eq!(key_color(app), Color::BLACK, "the original brush has a black key, distinct from the blue canvas sample");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn key_color_sampling_reaches_the_canvas_while_brush_options_stays_open() {
|
||||
vectorcraft_ui_egui::i18n::set_current(vectorcraft_ui_egui::i18n::Lang::EN);
|
||||
let mut app = VectorcraftApp::new(Session::new(), Default::default());
|
||||
app.run("file.new", json!({"width": 400, "height": 300})).unwrap();
|
||||
app.run("paint.setFill", json!({"color": "#000000"})).unwrap();
|
||||
let art = app.run("shape.rectangle", json!({"x": 300, "y": 30, "width": 20, "height": 12})).unwrap()["id"].clone();
|
||||
app.run(
|
||||
"brush.new",
|
||||
json!({"type": "art", "name": BRUSH, "ids": [art], "params": {"colorization": {"method": "hueShift", "key": Color::BLACK}}}),
|
||||
)
|
||||
.unwrap();
|
||||
app.run("paint.setFill", json!({"color": "#336699"})).unwrap();
|
||||
app.run("shape.rectangle", json!({"x": 20, "y": 120, "width": 80, "height": 60})).unwrap();
|
||||
app.run("select.none", json!({})).unwrap();
|
||||
app.ui.task_bar = false;
|
||||
app.ui.view.rulers = false;
|
||||
app.canvas.worker_started = true;
|
||||
let ctx = egui::Context::default();
|
||||
ctx.enable_accesskit();
|
||||
for _ in 0..8 {
|
||||
frame(&mut app, &ctx, vec![]).textures_delta.clear();
|
||||
}
|
||||
let view = app.view_mut().unwrap();
|
||||
view.zoom = 3.0;
|
||||
view.center = Point::new(200.0, 150.0);
|
||||
view.rotation = 0.0;
|
||||
settle(&mut app, &ctx);
|
||||
let point = Point::new(60.0, 150.0);
|
||||
let at = canvas::Xf::at(app.canvas_rect.unwrap(), app.view().unwrap(), ctx.zoom_factor()).to_screen(point);
|
||||
assert!(app.canvas_rect.unwrap().contains(at));
|
||||
|
||||
// Positive control: this exact coordinate is colored art and the ordinary real UI route hits it.
|
||||
let control_document = app.session.active().unwrap().doc.clone();
|
||||
app.run("paint.setFill", json!({"color": "#e020c0"})).unwrap();
|
||||
app.select_tool("eyedropper");
|
||||
click_at(&mut app, &ctx, at, Modifiers::SHIFT);
|
||||
let expected_key = match &app.session.paint.fill {
|
||||
Paint::Solid { color, .. } => *color,
|
||||
_ => panic!("ordinary Eye sampled a solid color"),
|
||||
};
|
||||
assert_eq!(expected_key.to_hex(), "#336699", "ordinary real UI Eyedropper hits the sample point");
|
||||
assert_eq!(app.session.active().unwrap().doc, control_document);
|
||||
assert!(app.session.active().unwrap().selection.objects.is_empty());
|
||||
app.run("paint.setFill", json!({"color": "#e020c0"})).unwrap();
|
||||
app.select_tool("paintbrush");
|
||||
let state = app.session.active().unwrap();
|
||||
let (document, selection, revision) = (state.doc.clone(), state.selection.clone(), state.revision);
|
||||
let history = (state.history.undo.len(), state.history.redo.len());
|
||||
let paint = app.session.paint.clone();
|
||||
let unchanged = |app: &VectorcraftApp| {
|
||||
let state = app.session.active().unwrap();
|
||||
assert_eq!(state.doc, document);
|
||||
assert_eq!(state.selection, selection);
|
||||
assert_eq!(state.revision, revision);
|
||||
assert_eq!((state.history.undo.len(), state.history.redo.len()), history);
|
||||
assert_eq!(app.session.paint, paint);
|
||||
};
|
||||
|
||||
// Separate callback control, not the failure witness: the existing tool-to-dialog route works.
|
||||
open_options(&mut app, &ctx);
|
||||
click_control(&mut app, &ctx, PICK_KEY);
|
||||
assert_eq!(app.session.tool_id(), "eyedropper");
|
||||
assert_eq!(app.session.tool_options()["brushKeyColor"], true);
|
||||
let view = app.view_info();
|
||||
canvas::dispatch(&mut app, &PointerEvent::new(PointerKind::Down, point.x, point.y), view);
|
||||
settle(&mut app, &ctx);
|
||||
assert_eq!(key_color(&app), expected_key, "the callback can update this hue-shift dialog");
|
||||
assert_eq!(app.session.tool_id(), "paintbrush");
|
||||
unchanged(&app);
|
||||
click_control(&mut app, &ctx, "Cancel");
|
||||
assert!(app.ui.dialog.is_none());
|
||||
unchanged(&app);
|
||||
|
||||
// Reopen from the unchanged brush so the real canvas witness starts with the original black key.
|
||||
open_options(&mut app, &ctx);
|
||||
click_control(&mut app, &ctx, PICK_KEY);
|
||||
assert_eq!(app.session.tool_id(), "eyedropper");
|
||||
assert_eq!(app.session.tool_options()["brushKeyColor"], true);
|
||||
assert_eq!(app.session.tool_options()["stop"], "paintbrush");
|
||||
let fields = app.ui.dialog.as_ref().unwrap().fields.clone();
|
||||
let modal = ctx.memory(|memory| memory.area_rect(egui::Id::unique(("dialog", "brushOptions")))).expect("the real Brush Options window bounds");
|
||||
let now = canvas::Xf::at(app.canvas_rect.unwrap(), app.view().unwrap(), ctx.zoom_factor()).to_screen(point);
|
||||
assert!(now.distance(at) < 0.1, "the control and witness use the same canvas coordinate");
|
||||
assert!(!modal.contains(at), "sample visible art outside the dialog body, not a covered control");
|
||||
unchanged(&app);
|
||||
click_at(&mut app, &ctx, at, Modifiers::NONE);
|
||||
settle(&mut app, &ctx);
|
||||
unchanged(&app);
|
||||
let actual_key = key_color(&app);
|
||||
assert_eq!(actual_key, expected_key, "the armed Key Color eyedropper must receive the real canvas click through the retained dialog");
|
||||
let mut expected_fields = fields;
|
||||
expected_fields.insert("keyColor".into(), serde_json::to_value(expected_key).unwrap());
|
||||
assert_eq!(app.ui.dialog.as_ref().unwrap().fields, expected_fields, "only the dialog Key Color changes");
|
||||
assert_eq!(app.session.tool_id(), "paintbrush");
|
||||
assert_eq!(app.session.tool_options_of("eyedropper")["brushKeyColor"], false);
|
||||
}
|
||||
|
||||
// Additional controls are appended; the independently reproduced witness above is unchanged.
|
||||
fn modal_fixture() -> (VectorcraftApp, egui::Context, Pos2) {
|
||||
vectorcraft_ui_egui::i18n::set_current(vectorcraft_ui_egui::i18n::Lang::EN);
|
||||
let mut app = VectorcraftApp::new(Session::new(), Default::default());
|
||||
app.run("file.new", json!({"width": 400, "height": 300})).unwrap();
|
||||
app.run("paint.setFill", json!({"color": "#000000"})).unwrap();
|
||||
let art = app.run("shape.rectangle", json!({"x": 300, "y": 30, "width": 20, "height": 12})).unwrap()["id"].clone();
|
||||
app.run(
|
||||
"brush.new",
|
||||
json!({"type": "art", "name": BRUSH, "ids": [art], "params": {"colorization": {"method": "hueShift", "key": Color::BLACK}}}),
|
||||
)
|
||||
.unwrap();
|
||||
app.run("paint.setFill", json!({"color": "#336699"})).unwrap();
|
||||
app.run("shape.rectangle", json!({"x": 20, "y": 120, "width": 80, "height": 60})).unwrap();
|
||||
app.run("select.none", json!({})).unwrap();
|
||||
app.ui.task_bar = false;
|
||||
app.ui.view.rulers = false;
|
||||
app.canvas.worker_started = true;
|
||||
let ctx = egui::Context::default();
|
||||
ctx.enable_accesskit();
|
||||
for _ in 0..8 {
|
||||
frame(&mut app, &ctx, vec![]).textures_delta.clear();
|
||||
}
|
||||
let view = app.view_mut().unwrap();
|
||||
view.zoom = 3.0;
|
||||
view.center = Point::new(200.0, 150.0);
|
||||
view.rotation = 0.0;
|
||||
settle(&mut app, &ctx);
|
||||
let at = canvas::Xf::at(app.canvas_rect.unwrap(), app.view().unwrap(), ctx.zoom_factor()).to_screen(Point::new(60.0, 150.0));
|
||||
app.run("paint.setFill", json!({"color": "#e020c0"})).unwrap();
|
||||
app.select_tool("paintbrush");
|
||||
open_options(&mut app, &ctx);
|
||||
let modal = ctx.memory(|memory| memory.area_rect(egui::Id::unique(("dialog", "brushOptions")))).unwrap();
|
||||
assert!(app.canvas_rect.unwrap().contains(at) && !modal.contains(at));
|
||||
(app, ctx, at)
|
||||
}
|
||||
|
||||
fn document_defaults(app: &VectorcraftApp) -> (serde_json::Value, vectorcraft_tools::PaintDefaults) {
|
||||
let state = app.session.active().unwrap();
|
||||
(
|
||||
json!({"document": state.doc, "selection": state.selection, "revision": state.revision,
|
||||
"undo": state.history.undo.len(), "redo": state.history.redo.len()}),
|
||||
app.session.paint.clone(),
|
||||
)
|
||||
}
|
||||
|
||||
fn escape(app: &mut VectorcraftApp, ctx: &egui::Context) {
|
||||
for pressed in [true, false] {
|
||||
frame(
|
||||
app,
|
||||
ctx,
|
||||
vec![
|
||||
Event::ModifiersChanged(Modifiers::NONE),
|
||||
Event::Key { key: egui::Key::Escape, physical_key: Some(egui::Key::Escape), pressed, repeat: false, modifiers: Modifiers::NONE },
|
||||
],
|
||||
)
|
||||
.textures_delta
|
||||
.clear();
|
||||
}
|
||||
settle(app, ctx);
|
||||
}
|
||||
|
||||
fn sample_press(app: &mut VectorcraftApp, ctx: &egui::Context, at: Pos2, modifiers: Modifiers) {
|
||||
frame(app, ctx, vec![Event::ModifiersChanged(modifiers), Event::PointerMoved(at)]).textures_delta.clear();
|
||||
frame(app, ctx, vec![Event::PointerButton { pos: at, button: PointerButton::Primary, pressed: true, modifiers }]).textures_delta.clear();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn unarmed_brush_and_other_modal_keep_blocking_canvas_input() {
|
||||
for other_modal in [false, true] {
|
||||
let (mut app, ctx, at) = modal_fixture();
|
||||
if other_modal {
|
||||
click_control(&mut app, &ctx, "Cancel");
|
||||
app.run("ui.newBrush", json!({})).unwrap();
|
||||
settle(&mut app, &ctx);
|
||||
}
|
||||
app.select_tool("eyedropper");
|
||||
let before = document_defaults(&app);
|
||||
click_at(&mut app, &ctx, at, Modifiers::SHIFT);
|
||||
settle(&mut app, &ctx);
|
||||
assert_eq!(document_defaults(&app), before, "an unarmed modal must still block the same canvas point");
|
||||
if !other_modal {
|
||||
assert_eq!(key_color(&app), Color::BLACK);
|
||||
}
|
||||
click_control(&mut app, &ctx, "Cancel");
|
||||
assert!(app.ui.dialog.is_none());
|
||||
click_at(&mut app, &ctx, at, Modifiers::SHIFT);
|
||||
match &app.session.paint.fill {
|
||||
Paint::Solid { color, .. } => assert_eq!(color.to_hex(), "#336699", "the same point works after the modal closes"),
|
||||
_ => panic!("ordinary Eye returns a solid color"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn key_color_reentry_escape_cancel_and_tool_choice_restore_only_the_owned_pick() {
|
||||
let (mut app, ctx, _) = modal_fixture();
|
||||
let before = document_defaults(&app);
|
||||
click_control(&mut app, &ctx, PICK_KEY);
|
||||
assert_eq!(app.session.tool_options()["stop"], "paintbrush");
|
||||
click_control(&mut app, &ctx, PICK_KEY);
|
||||
assert_eq!(app.session.tool_id(), "paintbrush", "reentry must not capture Eye as its own return tool");
|
||||
assert_eq!(key_color(&app), Color::BLACK);
|
||||
click_control(&mut app, &ctx, PICK_KEY);
|
||||
escape(&mut app, &ctx);
|
||||
assert_eq!(app.session.tool_id(), "paintbrush");
|
||||
assert_eq!(key_color(&app), Color::BLACK, "the first Escape ends sampling and keeps the draft");
|
||||
escape(&mut app, &ctx);
|
||||
assert!(app.ui.dialog.is_none(), "the second Escape closes Brush Options");
|
||||
open_options(&mut app, &ctx);
|
||||
click_control(&mut app, &ctx, PICK_KEY);
|
||||
click_control(&mut app, &ctx, "Cancel");
|
||||
assert_eq!(app.session.tool_id(), "paintbrush");
|
||||
assert!(app.ui.dialog.is_none());
|
||||
open_options(&mut app, &ctx);
|
||||
click_control(&mut app, &ctx, PICK_KEY);
|
||||
app.select_tool("rectangle");
|
||||
settle(&mut app, &ctx);
|
||||
assert_eq!(app.session.tool_id(), "rectangle", "an explicit choice wins over automatic restoration");
|
||||
assert_eq!(key_color(&app), Color::BLACK);
|
||||
assert_eq!(document_defaults(&app), before);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn key_color_release_samples_once_without_lending_or_sending_up_to_paintbrush() {
|
||||
let (mut app, ctx, at) = modal_fixture();
|
||||
click_control(&mut app, &ctx, PICK_KEY);
|
||||
let before = document_defaults(&app);
|
||||
let inputs = app.session.input_count();
|
||||
let modifiers = Modifiers { ctrl: true, command: true, ..Modifiers::NONE };
|
||||
sample_press(&mut app, &ctx, at, modifiers);
|
||||
assert_eq!(app.session.tool_id(), "eyedropper", "Cmd/Ctrl must not lend Selection in this foreground pick");
|
||||
assert_eq!(app.session.input_count(), inputs, "the physical Down is retained until its release");
|
||||
assert_eq!(key_color(&app), Color::BLACK);
|
||||
frame(&mut app, &ctx, vec![Event::PointerMoved(at + vec2(2.0, 0.0))]).textures_delta.clear();
|
||||
assert_eq!(app.session.input_count(), inputs, "holding/moving the pick must not start a stroke");
|
||||
frame(&mut app, &ctx, vec![Event::PointerButton { pos: at, button: PointerButton::Primary, pressed: false, modifiers }]).textures_delta.clear();
|
||||
assert_eq!(app.session.input_count(), inputs + 2, "only the existing Eye Down and Eye Up reach Session");
|
||||
assert_eq!(app.session.tool_id(), "paintbrush");
|
||||
assert!(!app.session.pointer_held());
|
||||
assert!(!app.session.in_interaction());
|
||||
assert_eq!(key_color(&app).to_hex(), "#336699");
|
||||
assert_eq!(document_defaults(&app), before);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn key_color_lost_press_or_replaced_target_cannot_commit_on_a_later_up() {
|
||||
for exit in ["focus", "pointerGone", "dialog", "document"] {
|
||||
let (mut app, ctx, at) = modal_fixture();
|
||||
click_control(&mut app, &ctx, PICK_KEY);
|
||||
sample_press(&mut app, &ctx, at, Modifiers::NONE);
|
||||
assert_eq!(key_color(&app), Color::BLACK);
|
||||
match exit {
|
||||
"focus" => {
|
||||
let mut raw =
|
||||
RawInput { focused: false, screen_rect: Some(Rect::from_min_size(Pos2::ZERO, vec2(1600.0, 1100.0))), ..Default::default() };
|
||||
app.raw_input_hook(&ctx, &mut raw);
|
||||
ctx.run_ui(raw, |ui| {
|
||||
app.tick(ui.ctx());
|
||||
app.ui(ui);
|
||||
})
|
||||
.textures_delta
|
||||
.clear();
|
||||
}
|
||||
"pointerGone" => {
|
||||
frame(&mut app, &ctx, vec![Event::PointerGone]).textures_delta.clear();
|
||||
}
|
||||
"dialog" => {
|
||||
app.run("ui.brushOptions", json!({"name": BRUSH})).unwrap();
|
||||
}
|
||||
"document" => {
|
||||
app.run("file.new", json!({"width": 400, "height": 300})).unwrap();
|
||||
}
|
||||
_ => panic!("unexpected test exit: {exit}"),
|
||||
}
|
||||
settle(&mut app, &ctx);
|
||||
assert_eq!(app.session.tool_id(), "paintbrush", "{exit}: invalidated picks restore the original tool");
|
||||
let before = document_defaults(&app);
|
||||
let fields = app.ui.dialog.as_ref().map(|dialog| dialog.fields.clone());
|
||||
frame(
|
||||
&mut app,
|
||||
&ctx,
|
||||
vec![
|
||||
Event::PointerMoved(at),
|
||||
Event::PointerButton { pos: at, button: PointerButton::Primary, pressed: false, modifiers: Modifiers::NONE },
|
||||
],
|
||||
)
|
||||
.textures_delta
|
||||
.clear();
|
||||
settle(&mut app, &ctx);
|
||||
assert_eq!(document_defaults(&app), before, "{exit}: an unrelated Up cannot commit a ghost sample or stroke");
|
||||
assert_eq!(app.ui.dialog.as_ref().map(|dialog| dialog.fields.clone()), fields, "{exit}: no late callback changes the draft");
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn key_color_ok_saves_the_sampled_brush_key_and_reopened_cancel_preserves_it() {
|
||||
let (mut app, ctx, at) = modal_fixture();
|
||||
let before = document_defaults(&app);
|
||||
let selection = app.session.active().unwrap().selection.clone();
|
||||
let undo = app.session.active().unwrap().history.undo.len();
|
||||
click_control(&mut app, &ctx, PICK_KEY);
|
||||
click_at(&mut app, &ctx, at, Modifiers::NONE);
|
||||
settle(&mut app, &ctx);
|
||||
assert_eq!(key_color(&app).to_hex(), "#336699");
|
||||
assert_eq!(app.session.tool_id(), "paintbrush");
|
||||
assert_eq!(document_defaults(&app), before, "sampling changes only the dialog draft before OK");
|
||||
|
||||
click_control(&mut app, &ctx, "OK");
|
||||
assert!(app.ui.dialog.is_none(), "the actual OK button commits and closes Brush Options");
|
||||
let state = app.session.active().unwrap();
|
||||
assert_eq!(state.selection, selection);
|
||||
assert_eq!(state.history.undo.len(), undo + 1, "saving the changed brush definition is one Brush Options edit");
|
||||
assert!(state.history.redo.is_empty());
|
||||
assert_eq!(app.session.paint, before.1, "OK does not change the default paints");
|
||||
|
||||
// Open from the saved brush, rather than the black-key fixture helper.
|
||||
app.run("ui.brushOptions", json!({"name": BRUSH})).unwrap();
|
||||
settle(&mut app, &ctx);
|
||||
assert_eq!(key_color(&app).to_hex(), "#336699", "reopening reads the sampled key saved by OK");
|
||||
let saved = document_defaults(&app);
|
||||
click_control(&mut app, &ctx, "Cancel");
|
||||
assert!(app.ui.dialog.is_none());
|
||||
assert_eq!(document_defaults(&app), saved, "Cancel leaves the stored definition, history and default paints intact");
|
||||
app.run("ui.brushOptions", json!({"name": BRUSH})).unwrap();
|
||||
settle(&mut app, &ctx);
|
||||
assert_eq!(key_color(&app).to_hex(), "#336699", "Cancel preserves the stored sampled key");
|
||||
assert_eq!(document_defaults(&app), saved);
|
||||
}
|
||||
+3
-2
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+3
-1
@@ -1,6 +1,6 @@
|
||||
# UI and interaction parity
|
||||
|
||||
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-16 · **Change:** minor (Recolor Artwork follow-up (#8031, remaining #4028): native Lab input, picker swatch libraries and Assign-row menus; UI interaction regression coverage; scores and estimates unchanged; previously: #8005: the Color spectrum fills a resized panel; scores and estimates unchanged; previously: Pencil continuation, straight-line and closing cursors; scores and estimates unchanged; previously: Graphic Styles list fills a taller panel, #2992; scores and estimates unchanged; previously: library panels' lists fill a taller panel, #2992; scores and estimates unchanged; previously: Swatches list fills a taller panel, #1638; scores and estimates unchanged; previously: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: macOS: the canvas cursor stays after the pointer moves, #6362; scores and estimates unchanged; previously minor: Remove Background in the Contextual Task Bar, Properties › Quick Actions and the Control bar; previously minor: Ruler origin: the corner drag snaps as a drawn point does; previously minor: Live Paint Bucket fills faces crossed in one drag (#6373); previously: #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: Outline view: images and gradient meshes are picked on what Outline draws, so a click inside them reaches the path behind, #6437; previously minor: a middle-click on a document tab closes it, #6506; previously minor: Blob Brush: a round tip's preview is the outline of the area it adds, round at both ends, as the stroke it commits (#4343); scores and estimates unchanged; previously:; ruler double-click adds a guide at the pointer, #5239; G5: Inventory Icons built-in symbol library (four built-ins); previously minor: files that record no units open in Preferences › Units › General, #5820; previously minor: interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; Control bar › Snapping includes the existing Snap to Glyph and Alignment Guides toggles (#6164); scores and estimates unchanged; floating tab groups collapse into the side icon rail and opened rail panels fold back into it, #5925 in part; numeric fields step on wheel hover without taking keyboard focus, #5949; Character Styles panel: a double-click on a style's row opens its Character Style Options; the dialog keeps a fixed width and scrolls its sections, so its buttons stay on screen; Selection QoL: marquee modes and visible feedback, #5313; #3380 deletion-only review follow-up: independent survivors keep gradient placement, owned subpaths avoid discarded copies, and contracts/status/evidence are clarified; endpoint highlighting remains open; scores and estimates unchanged; Drop Shadow and glow dialogs: spinner arrows, #5367, #5368; Stroke Weight Up and Down shortcuts, #5797; Layers: Rename (`ui.rename`) opens the name field of the selected layer, group or object, #5324; Properties in Edit Artboards: Transform section above the Artboards section, #5219; scrubby labels: the Control bar's Stroke: and Opacity: links and the Properties panel's Stroke link scrub their fields, #4088; Properties: Quick Actions has Repeat Options for one selected repeat, #5181; Direct Selection: Shift-click picks several blend spine points, which drag together, #5285; Direct Selection: Cmd/Ctrl held lends the Selection tool and shows its bounding box, #3901; Join tool trims two crossing open paths and joins them at the crossing, #5844; Control bar: Paragraph: link and Align left/center/right while type is selected, #5372; shape tools: a press on the selection's centre point moves it and one in the rotate zone outside a box corner turns it, #5477; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x; Units › East Asian Type acts, with Q and Ha units; scores unchanged)
|
||||
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-17 · **Change:** minor (Brush Options Key Color: restore canvas input for the existing one-shot pick, then resume the retained draft and previous tool (#8284; six full-app input regressions passed); scores and estimates unchanged; previously: Recolor Artwork follow-up (#8031, remaining #4028): native Lab input, picker swatch libraries and Assign-row menus; UI interaction regression coverage; scores and estimates unchanged; previously: #8005: the Color spectrum fills a resized panel; scores and estimates unchanged; previously: Pencil continuation, straight-line and closing cursors; scores and estimates unchanged; previously: Graphic Styles list fills a taller panel, #2992; scores and estimates unchanged; previously: library panels' lists fill a taller panel, #2992; scores and estimates unchanged; previously: Swatches list fills a taller panel, #1638; scores and estimates unchanged; previously: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: macOS: the canvas cursor stays after the pointer moves, #6362; scores and estimates unchanged; previously minor: Remove Background in the Contextual Task Bar, Properties › Quick Actions and the Control bar; previously minor: Ruler origin: the corner drag snaps as a drawn point does; previously minor: Live Paint Bucket fills faces crossed in one drag (#6373); previously: #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: Outline view: images and gradient meshes are picked on what Outline draws, so a click inside them reaches the path behind, #6437; previously minor: a middle-click on a document tab closes it, #6506; previously minor: Blob Brush: a round tip's preview is the outline of the area it adds, round at both ends, as the stroke it commits (#4343); scores and estimates unchanged; previously:; ruler double-click adds a guide at the pointer, #5239; G5: Inventory Icons built-in symbol library (four built-ins); previously minor: files that record no units open in Preferences › Units › General, #5820; previously minor: interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; Control bar › Snapping includes the existing Snap to Glyph and Alignment Guides toggles (#6164); scores and estimates unchanged; floating tab groups collapse into the side icon rail and opened rail panels fold back into it, #5925 in part; numeric fields step on wheel hover without taking keyboard focus, #5949; Character Styles panel: a double-click on a style's row opens its Character Style Options; the dialog keeps a fixed width and scrolls its sections, so its buttons stay on screen; Selection QoL: marquee modes and visible feedback, #5313; #3380 deletion-only review follow-up: independent survivors keep gradient placement, owned subpaths avoid discarded copies, and contracts/status/evidence are clarified; endpoint highlighting remains open; scores and estimates unchanged; Drop Shadow and glow dialogs: spinner arrows, #5367, #5368; Stroke Weight Up and Down shortcuts, #5797; Layers: Rename (`ui.rename`) opens the name field of the selected layer, group or object, #5324; Properties in Edit Artboards: Transform section above the Artboards section, #5219; scrubby labels: the Control bar's Stroke: and Opacity: links and the Properties panel's Stroke link scrub their fields, #4088; Properties: Quick Actions has Repeat Options for one selected repeat, #5181; Direct Selection: Shift-click picks several blend spine points, which drag together, #5285; Direct Selection: Cmd/Ctrl held lends the Selection tool and shows its bounding box, #3901; Join tool trims two crossing open paths and joins them at the crossing, #5844; Control bar: Paragraph: link and Align left/center/right while type is selected, #5372; shape tools: a press on the selection's centre point moves it and one in the rotate zone outside a box corner turns it, #5477; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x; Units › East Asian Type acts, with Q and Ha units; scores unchanged)
|
||||
>
|
||||
> Tech Circuit update (2026-11-14): three original procedural brushes; ten built-in brush libraries (G5).
|
||||
>
|
||||
@@ -385,6 +385,7 @@ next unit in the order a right-click on a ruler lists them, from Feet back to Po
|
||||
|
||||
| Interaction | Status | Evidence |
|
||||
|---|---|---|
|
||||
| Brush Options › Key Color eyedropper yields to one canvas click, then resumes the same draft and previous tool | done | #8284; the pick changes the dialog draft without painting or editing the document. OK applies the brush options; Cancel discards them. Escape ends the pick without sampling before a later Escape cancels the dialog. Six full-app input regressions in `crates/ui-egui/tests/brush_keycolor_modal_repro.rs` cover the actual pick, OK/reopen/Cancel, Escape, reentry, held clicks, stale releases and ordinary modal blocking. |
|
||||
| Ordinary Save refused by filesystem permissions/read-only storage offers Save As | focused UI regressions passed; native acceptance pending | #6146; `io::tests_read_only_save`; same name/format suggested; unchanged format keeps options, changed format opens its Save options; Documents folder, UID-bound continuation; cancellation and automation isolation |
|
||||
| Selection artwork drag hovers a visible document tab to activate it, then drops editable artwork on its canvas | done | `tests_document_drag`, `edit.dropSelection`, lossless resource and one-step Undo regressions; a release over another document's tiled pane copies it there too (`canvas::panes` tests), and so does a release over a floating window drawn inside the main window (`doc_windows` tests); overflow-menu drag and floating OS windows remain separate |
|
||||
| A document tab dragged along the tab strip moves its document; a line marks where it goes, the current document and every document's view stay as they were, and a drag off the strip still floats it | done | #5663, [public source](https://helpx.adobe.com/illustrator/using/customizing-workspace.html); `document.move`; `tests::tab_reorder`, `chrome::tests` (drop index with floating and view tabs), `engine` `tests::document_move` |
|
||||
@@ -561,6 +562,7 @@ before release (#6373). [Paint faces and edges](https://helpx.adobe.com/illustra
|
||||
|
||||
| Date | Change | Summary |
|
||||
|---|---|---|
|
||||
| 2026-11-17 | minor | Brush Options Key Color (#8284): restore canvas input for its existing eyedropper, then resume the retained draft and previous tool; OK/Cancel and Escape remain separate actions. Six full-app input regressions passed; scores and estimates unchanged. |
|
||||
| 2026-11-16 | minor | Recolor Artwork follow-up (#8031, remaining #4028): native Lab input, picker swatch libraries and Assign-row menus; UI interaction regression coverage; scores and estimates unchanged. |
|
||||
| 2026-11-16 | minor | Recolor Artwork › Assign: native Lab entry in the Color Picker, swatch libraries access in the picker, and row context menu options (Pick from Swatches, Limit to Library) (#4028). Scores and estimates unchanged. |
|
||||
| 2026-11-16 | minor | Color panel: the spectrum fills the vertical space of a resized panel, with options shown or hidden (#8005). Compact auto-fit flyouts and embedded mixers keep their existing size. Evidence: panels::color::tests::the_spectrum_grows_with_the_color_panel. Scores and estimates unchanged. |
|
||||
|
||||
Reference in New Issue
Block a user