blockly-samples icon indicating copy to clipboard operation
blockly-samples copied to clipboard

Clean up code style in generators for field colour blocks

Open rachel-fenichel opened this issue 1 year ago • 0 comments

Check for duplicates

  • [X] I have searched for similar issues before opening a new one.

Component

No response

Problem

No response

Request

Follow-up work from #2162.

Clean up the generator code (which is returned as a string) for blocks in field-colour.

For example, Christopher suggested this change in the Python code for the blend block:

-    functionName + '(' + colour1 + ', ' + colour2 + ', ' + ratio + ')';
+  const code = `${functionName}(${colour1}, ${colour2}, ${ratio})`;

Alternatives considered

No response

Additional context

No response

rachel-fenichel avatar Feb 09 '24 17:02 rachel-fenichel