Skip to content

Conversation

@BeksOmega
Copy link
Contributor

The basics

  • I branched from develop
  • My pull request is against develop
  • My code follows the style guide
  • I ran npm run format and npm run lint

The details

Resolves

Fixes #7339

Proposed Changes

Passes a doFullSerialization parameter to blocks' saveExtraState methods.

Reason for Changes

This parameter signals that they should serialize all of their state (instead of just serializing a reference to it) for use during copy-paste.

Test Coverage

N/A

Documentation

N/A

Additional Information

Dependent on #7356

@github-actions github-actions bot added the PR: feature Adds a feature label Aug 7, 2023
@BeksOmega BeksOmega force-pushed the feat/do-full-serialization branch from 32a57f3 to b644721 Compare August 15, 2023 21:01
@BeksOmega BeksOmega marked this pull request as ready for review August 15, 2023 21:08
@BeksOmega BeksOmega requested a review from a team as a code owner August 15, 2023 21:08
@BeksOmega BeksOmega requested a review from maribethb August 15, 2023 21:08
core/block.ts Outdated
*
* @param doFullSerialization Whether or not to serialize the full state of
* the extra state (rather than possibly saving a reference to some
* state). This is used during copy-paste.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: could you say which way this should be used in copy-paste? e.g. "This should be true when pasting a block." Actually it might be helpful to have more documentation on this parameter because I'm not sure how this is meant to be used. If I am creating custom blocks, I need more information on what is "full" serialization and what isn't. Maybe you can add more documentation to devsite and then link to it here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added links under blocks and fields. Can't add links under icons because the base icon class doesn't implement serialization - subclasses need to implement the ISerializable interface.

The links will be dead until the next release + release of the documentation.

@BeksOmega BeksOmega merged commit b4ce6af into RaspberryPiFoundation:develop Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: feature Adds a feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a doFullSerialization parameter to blocks

2 participants