Skip to content
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

Misleading deprecation warning & superfluous dummy input #6557

Closed
NeilFraser opened this issue Oct 17, 2022 · 2 comments
Closed

Misleading deprecation warning & superfluous dummy input #6557

NeilFraser opened this issue Oct 17, 2022 · 2 comments
Assignees

Comments

@NeilFraser
Copy link
Contributor

Describe the bug

Loading the lists_repeat block in German prints this warning in the console:

"Deprecated use of setting size_.width to 0 to rerender a field. Set field.isDirty_ to true instead."

The block in question does no such thing.

To Reproduce

  1. Go to https://blockly-demo.appspot.com/static/demos/code/index.html?lang=de
  2. Click on 'Listen'
  3. See warning in the console.

Expected behaviour

No console warning.

Additional context

The English version of the block does not generate this warning. The difference between the two is that English has a text label containing the word "times" at the end of the block, whereas the German block inexplicably has a dummy input with a text label containing the empty string:

"LISTS_REPEAT_TITLE": "create list with item %1 repeated %2 times",
"LISTS_REPEAT_TITLE": "erzeuge Liste mit %2-mal dem Element %1​",

Thus I think there are two issues here:

  1. A misleading warning that's being printed when using an empty text label.
  2. JSON-created blocks are creating unwanted dummy inputs with empty text labels.

Found while testing Blockly Games. This is not a new error (at least a year old).

@NeilFraser NeilFraser added component: fields issue: triage Issues awaiting triage by a Blockly team member labels Oct 17, 2022
@NeilFraser NeilFraser changed the title Misleading deprecation warning Misleading deprecation warning & superfluous dummy input Oct 17, 2022
@NeilFraser NeilFraser self-assigned this Oct 18, 2022
@NeilFraser
Copy link
Contributor Author

Found the source of the error. There's an invisible zero width space character (U+200B) in the German version of LISTS_REPEAT_TITLE.

@NeilFraser
Copy link
Contributor Author

Fixed both issues. Also contacted Translatewiki to suggest an upstream filter for zero-width space characters.

@maribethb maribethb removed the issue: triage Issues awaiting triage by a Blockly team member label Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants