Skip to content

refactor: Make InsertionMarkerPreviewer's block serialization amenable to subclassing.#9282

Merged
gonfunko merged 1 commit intodevelopfrom
insertion-marker
Aug 6, 2025
Merged

refactor: Make InsertionMarkerPreviewer's block serialization amenable to subclassing.#9282
gonfunko merged 1 commit intodevelopfrom
insertion-marker

Conversation

@gonfunko
Copy link
Contributor

@gonfunko gonfunko commented Aug 6, 2025

The basics

The details

Resolves

Fixes part of gonfunko/scratch-blocks#193

Proposed Changes

This PR refactors InsertionMarkerPreviewer to make the serialization of a block to JSON for use as an insertion marker overridable in a subclass. Previously, this was done in a private method which also did various other setup tasks. This meant that subclasses could not practically change the configuration options passed to serialization.blocks.save(), whereas they can now override the new serializeBlockToInsertionMarker() method to do so.

@gonfunko gonfunko requested a review from a team as a code owner August 6, 2025 19:05
@gonfunko gonfunko requested a review from RoboErikG August 6, 2025 19:05
@gonfunko gonfunko merged commit af57a3e into develop Aug 6, 2025
17 checks passed
@gonfunko gonfunko deleted the insertion-marker branch August 6, 2025 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants