Skip to content

Review contents of blockly.js #5208

@rachel-fenichel

Description

@rachel-fenichel

blockly.js is full of public stuff that doesn't really fit on any namespace. This is a problem because internal code requiring it causes circular dependencies.

The fix is to move everything in blockly.js out into separate files and require those from inside the codebase, while leaving aliases behind in blockly.js for anything that should stay publicly accessible.

In some cases, we also need setters so that external code can change those values.

In other cases, properties should just not be exported.

This issue is for tracking decisions about these properties and whether those decisions have been implemented.

Needs decision:

  • hideChaff
  • alert
  • confirm
  • prompt
  • hueToHex

Can be internal:

Exported function, but moved to a different file and aliased.

Exported function, used only externally and therefore left in blockly.js:

  • isNumber: Used in generators
  • defineBlocksWithJsonArray: Used in block definitions
  • svgSize: Deprecated already, and marked for removal in March 2022
  • resizeSvgContents

Exported read-only property:

  • [ ]

Exported settable property:

Can be removed:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions