[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add doFullSerialization support to blocks #7363

Merged
merged 2 commits into from
Aug 16, 2023

Conversation

BeksOmega
Copy link
Collaborator

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 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
core/block.ts Outdated Show resolved Hide resolved
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
Collaborator 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 google:develop Aug 16, 2023
7 checks passed
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