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

Add serialization of field values #5072

Merged
merged 3 commits into from
Jul 30, 2021

Conversation

BeksOmega
Copy link
Collaborator

The basics

  • I branched from project-cereal
  • My pull request is against project-cereal
  • My code follows the style guide

Link for Diff: BeksOmega/blockly@cereal/mutator-serialization...BeksOmega:cereal/field-serialiation

The details

Resolves

Work on project cereal.
Dependent on #5054

Proposed Changes

Adds serializing field values to JSOs.

Does not handle deserialization.

Reason for Changes

Serializing state is good.

Test Coverage

Added tests for different categories of types the field could return. Also added a test for wrapping the default XML implementation.

Additional Information

I got rid of one of the outer suites, so the test file looks like I made a lot of changes when I didn't. The new field tests are at the bottom of the file.

I'm also planning on adding tests for individual fields as I add JSO serialization to them.

@BeksOmega BeksOmega requested a review from a team as a code owner July 15, 2021 14:52
@BeksOmega BeksOmega requested review from moniika and removed request for a team July 15, 2021 14:52
@BeksOmega BeksOmega changed the title Cereal/field serialiation Add serialization of field values Jul 15, 2021
@BeksOmega BeksOmega marked this pull request as draft July 15, 2021 14:54
@BeksOmega BeksOmega requested review from maribethb and alschmiedt and removed request for moniika July 15, 2021 14:54
@BeksOmega BeksOmega added breaking change Used to mark a PR or issue that changes our public APIs. and removed breaking change Used to mark a PR or issue that changes our public APIs. labels Jul 16, 2021
* inline: ?boolean,
* data: ?string,
* extra-state: *
* fields: ?Object<string, *>
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be !Object<string, *>|undefined? since I think if we don't have any fields this does not get set?

@google google deleted a comment from alschmiedt Jul 23, 2021
@BeksOmega BeksOmega force-pushed the cereal/field-serialiation branch from c540903 to 5008d5f Compare July 30, 2021 15:18
@BeksOmega BeksOmega marked this pull request as ready for review July 30, 2021 15:30
@BeksOmega BeksOmega merged commit 95c8809 into google:project-cereal Jul 30, 2021
BeksOmega added a commit to BeksOmega/blockly that referenced this pull request Sep 13, 2021
* Add tests for field serialization

* Add field serialization

* Fixup types and tests
@BeksOmega BeksOmega deleted the cereal/field-serialiation branch September 16, 2021 15:32
BeksOmega added a commit that referenced this pull request Sep 17, 2021
* Add tests for field serialization

* Add field serialization

* Fixup types and tests
alschmiedt pushed a commit to alschmiedt/blockly that referenced this pull request Sep 20, 2021
* Add tests for field serialization

* Add field serialization

* Fixup types and tests
alschmiedt pushed a commit that referenced this pull request Sep 20, 2021
* Add tests for field serialization

* Add field serialization

* Fixup types and tests
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