feat(studio): adopt the official dioxus-primitives color picker#81
Merged
Conversation
The color picker now faithfully wraps the upstream component from DioxusLabs/components (already a git dependency; nothing feature- gated): primitive Root/Trigger/Popover with the library's controlled open, outside-dismiss and global-Escape — restoring the outside-click dismiss lost in #80 — and continuous on_color_change during drags. Our side keeps only: the --rm-* theme values, a one-line right:0 styling divergence (the inspector hugs the right edge), the #77 live HSV mirror, and panel-wide exclusivity driving the primitive's controlled open (pure apply_open_change, tested). All #80 inline-mode code and the abandoned floating-v2 stub are deleted. Documented trade-off: neither the pinned commit nor upstream HEAD implements viewport collision handling (verified) — vertical clipping near the window bottom remains possible until upstream adds it; a dependency bump will inherit their fix when it lands.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User decision: use the official color picker from dioxuslabs.com/components rather than a fourth in-house positioning implementation.
default-features = falseonly drops router): controlled open, outside-click dismiss and global Escape from the library (restores what fix(studio): color picker expands inline — floating positioning removed #80 lost), continuouson_color_changeduring drags.--rm-*theme values, a singleright:0styling divergence (the inspector hugs the right edge), the feat(studio): optimistic in-memory edits (near-instant canvas) + inspector round 4 #77 live HSV mirror, and panel-wide one-picker exclusivity driving the primitive's controlled open (apply_open_change, pure + tested). Call sites unchanged.toggle_picker.primitives/src/popover.rsand the preview CSS at HEAD — static per-side positioning only). Vertical clipping near the window bottom remains possible; when upstream lands collision handling, a dependency bump inherits it. Contributing that fix upstream is the natural next step if it bites.Verify:
cargo check -p rustmotion-studio✓ ·cargo test --workspace→ 403 passed ✓ ·cargo fmt --check✓ · clippy gated ≤1 ✓