Skip to content

Conversation

@heliacer
Copy link

@heliacer heliacer commented Oct 3, 2025

The basics

The details

Resolves

Implements JSON Block Definition interface proposed in #9387

Proposed Changes

Introduces a new JsonBlockDefinition in core/interfaces/

  • Added core/interfaces/i_json_block_definition.ts with JsonBlockDefinition and BlockArg definitions
  • Migrated Block.jsonInit, jsonInitFactory, defineBlocksWithJsonArray and createBlockDefinitionsFromJsonArray to use the new interface
  • Migrated interpolate to use the new BlockArg type
  • Updated all built-in block JSON definitions in blocks/ to explicitly set 'output': null to match the default behaviour in the block factory
  • Removed legacy AnyDuringMigration usage for JSON block definitions

Reason for Changes

Makes it easier to write valid JSON Block definitions without having to always rely on the block factory

Test Coverage

I ran the unit test suite and manually loaded the playground with the updated blocks to ensure they still render and connect correctly

Documentation

Not needed

Additional Information

I found another issue while testing (unrelated to this) in the default Playground, when Categories: (typed variables) is selected, the colour category errors out because of an invalid colour_picker definition

@heliacer heliacer requested a review from a team as a code owner October 3, 2025 21:23
@heliacer heliacer requested a review from gonfunko October 3, 2025 21:23
@heliacer heliacer marked this pull request as draft October 3, 2025 21:23
@heliacer heliacer marked this pull request as ready for review October 3, 2025 21:54
@heliacer
Copy link
Author

heliacer commented Nov 3, 2025

@gonfunko bump, will this be considered? 👀

@gonfunko
Copy link
Contributor

gonfunko commented Nov 3, 2025

Yes, sorry for the delay on this! Will try to get you an initial review this week, thank you for the ping on it.

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.

2 participants