From c829f69e1b580904f27524e76a5199e43b30b99d Mon Sep 17 00:00:00 2001 From: "tae.virus" Date: Mon, 13 Apr 2026 15:45:50 +0900 Subject: [PATCH] fix(vue): batch color picker drag updates into one undo entry (#187) PropertyListRoot's update() and patch() pushed a new undo entry on every call, so dragging a color slider or color area in the fill, stroke, or effect pickers filled the undo stack with dozens of intermediate entries per interaction. Cmd+Z had to be pressed many times to revert a single conceptual color change. Wrap update() and patch() in a debounced begin/commit batch keyed by (op, propKey, index, nodeIds). Rapid events collapse into one undo entry, and the batch commits after 300ms of idle. Changing prop key, index, or selection flushes the previous batch immediately, and add/remove/toggleVisibility flush any pending batch before running so button actions never mix with drag history. The existing explicit batch in toggleVisibility for multi-node is preserved. --- CHANGELOG.md | 4 ++ .../vue/src/PropertyList/PropertyListRoot.vue | 44 +++++++++++++++++-- 2 files changed, 45 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ce948e8a4..fae1c1b6c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Fixes + +- Fix color picker dragging flooding the undo stack — fill/stroke/effect color and opacity drags now collapse into a single undo entry per interaction via debounced batching in `PropertyListRoot` + ## 0.11.6 — 2026-04-08 ### Fixes diff --git a/packages/vue/src/PropertyList/PropertyListRoot.vue b/packages/vue/src/PropertyList/PropertyListRoot.vue index 0e11ea779..a4ec045ec 100644 --- a/packages/vue/src/PropertyList/PropertyListRoot.vue +++ b/packages/vue/src/PropertyList/PropertyListRoot.vue @@ -1,5 +1,5 @@