Skip to content

parse %-words as inputs when splitting edited label fragments - #3565

Open
gigamonkey wants to merge 1 commit into
jmoenig:devfrom
gigamonkey:fix-percent
Open

parse %-words as inputs when splitting edited label fragments#3565
gigamonkey wants to merge 1 commit into
jmoenig:devfrom
gigamonkey:fix-percent

Conversation

@gigamonkey

Copy link
Copy Markdown
Contributor

It seems that typing bar %m into the title-text field of the input-slot dialog (the + in the block editor) leaves us in a weird state: It turns %m into an input but it's named %m instead of m: refreshPrototype split the multi-word label into plain text fragments, but the rebuilt prototype spec turned the %m word into an input morph, which then got the stale text fragment (labelString '%m', type null) assigned to it.

This PR mirror's labelPart's parsing when splitting: a word starting with % becomes an input fragment with the % stripped.

Typing 'bar %m' into the title-text field of the input-slot dialog (the
'+' in the block editor) created an input named '%m' instead of 'm':
refreshPrototype split the multi-word label into plain text fragments,
but the rebuilt prototype spec turned the '%m' word into an input morph,
which then got the stale text fragment (labelString '%m', type null)
assigned to it. Mirror labelPart's parsing when splitting: a word
starting with '%' becomes an input fragment with the '%' stripped.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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