Skip to content

Add a paste button beside Copy - #159

Closed
ryankiley wants to merge 8 commits into
mainfrom
ryan/paste-button
Closed

ryankiley wants to merge 8 commits into
mainfrom
ryan/paste-button

Conversation

@ryankiley

@ryankiley ryankiley commented Oct 18, 2026 •

Copy link
Copy Markdown
Owner

Paste reads the clipboard inside the click and takes back a copy's values object, the changed-only map or a whole toJSON() state through fromJSON, one undo step, saved and announced like any load. A value lands only where it fits the control (same type all the way down, a tuple of the same length, a colour the browser parses, one of a list's options, never a disabled control), so a stray key, a mistyped value or a reserved path is skipped rather than coerced or written onto a prototype; its icon flashes a check, or a cross when nothing fits. The parse lives in a lazy chunk, the markup toolbar gets the same button, a button control whose action isn't a function no longer throws, and the size gate moves to 23 KiB for the icons. A paste tells a screen reader what it did, through the status region #163 added.

Paste reads the clipboard inside the click and takes back a copy's values object, the changed-only map or a whole toJSON() state through fromJSON, one undo step, saved and announced like any load. A value lands only where it fits the control, so a stray key, a mistyped value or a reserved path is skipped, never coerced or written onto a prototype; nothing usable shows a red cross. The parse lives in a lazy chunk, the markup toolbar gets the same button, and the gate moves to 23 KiB for the icons.
A disabled control takes nothing; a tuple must keep its length and a list of stops stay between 2 and 64; a colour must be one the browser can parse, not just one that starts like it; a key holding a literal dot pastes back from the panel's own copy; and a layout that changes nothing reports nothing pasted.
Tweakit no longer shows toasts. The copy button confirms with its icon's check alone, the presets menu with its list and the values it loads, and a markup button with no handler does nothing visible; the toast's code and CSS go, 234 B off the core download.
@ryankiley
ryankiley changed the base branch from main to ryan/no-toasts October 18, 2026 15:14
With the toast gone, one visually hidden status region for the page says it in words instead: values copied, nothing changed, copy failed, a preset saved or loaded. Sighted users see nothing new.
Base automatically changed from ryan/no-toasts to main October 18, 2026 21:35
@ryankiley

Copy link
Copy Markdown
Owner Author

Closing: picking a row or folder (#160) covers the paste worth having, and #160 now carries this PR's paste checks without the toolbar button.

@ryankiley ryankiley closed this Oct 18, 2026
@ryankiley
ryankiley deleted the ryan/paste-button branch October 18, 2026 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant