-
Notifications
You must be signed in to change notification settings - Fork 745
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trying to add apostrophe to title text turns inputs into title text! #1295
Comments
Yes, can be please get rid of this 'power feature' that allows creating multi-word variable names? (It happens because of the I'm removing the 'good student project' tag, because although this is simple, this one piece of code that needs to be re-written! There have been multiple issues (and at least a couple that are still open) related to parsing of inputs. IMO, the '%' shortcut is useful, but beyond that, we really need to simplify what happens because there are too many oddities in creating block inputs. (Try messing with adding an input after the fact and things get very confusing.) |
OH, the filtering is also due to the fact that apostrophes break XML serialization..., so that one was a no-go. |
Well, this is tricky. To me, allowing multi-word variables - including formal parameters - is a critical feature and it has absolute priority, even over allowing apostrophes in block labels. But I guess one is as exotic as the other. I don't know any programming language that allows multi-word formal parameters, but then again I don't know any programming language that allows apostrophes inside function names :-) |
I never said we remove the feature! I only said we remove the user shortcut. The '%' is, after all, a shortcut, time-saver feature. Edit: And I mean, only for multi-word names, single words are easy enough to deal with. I agree that we should keep multi-word input names! We can have both by having a XML encode / decode function for block specs. It really shouldn't be super hard. We just |
that could work, you're right. |
I'm not even insisting that apostrophe should work. But if not, I should get an error message, not a disaster! (Such as losing all my formal parameters, or losing everything when I hit OK.) Also let me point out that this problem didn't arise in the initial make-a-block dialog. I was already in the Block Editor when I tried prepending the word "Brian's" to the title text. In my humble opinion the root of the problem is using the same representation for internal storage of the prototype and for user I/O. The internal form should really be a list, not a text string, but with text strings as some of its elements. Or, if that's too slow to parse, at least use an invisible character (unicode < 32) to flag parameters. Then you can have any arbitrarily complicated translation from what the user types to the internal form. You can even let the user type % for parameters. And you can allow the two-character sequence %' for the beginning of a multi-word parameter, while still treating ' as an ordinary character in other contexts. |
Yeah. It seems like we have two problems here:
Michael Ball
|
Also, it's weird that I can have an apostrophe in a variable name, but not in a block name. This is yet another apostrophe inconsistency for the user. |
Can we revisit this? In some languages (like mine) apostrophes are super important for meaning.
Still low priority, but please don't let it be forgotten ^^ |
I'm with Michael, only more so. No %' in the make-a-block dialog. In fact, I wouldn't even mind no % in make-a-block! Or rather, % should just be a regular character with no special meaning. Use some nonprinting character in internal specs, and if you have to have a power-user feature, use the same nonprinting character in the dialog! You can echo it as ◊ or something. |
Imo the % shortcut is too valuable to lose entirely. But I do think we can have that and fix this issue — it’s just that I think it’s easier to create parameters as you are creating the block. Otherwise you’re more likely to just stick them at the end, which of course works but is nowhere near as pleasant. :) |
Workaround: use the ’ character (the typesetter's apostrophe). |
I tried to prepend the word "Brian's" to the title of this block. The apostrophe was filtered out, but now I see percent signs as title text instead of seeing inputs.
Worse, when I click "Apply," the block instance in the scripting area turns into just
The text was updated successfully, but these errors were encountered: