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

Docs: Undo/Redo: Minor edits #51085

Merged
merged 1 commit into from
May 30, 2023
Merged

Docs: Undo/Redo: Minor edits #51085

merged 1 commit into from
May 30, 2023

Conversation

mcsf
Copy link
Contributor

@mcsf mcsf commented May 30, 2023

Small follow-up of #51052.

@@ -42,13 +42,13 @@ Since the WordPress editors allow multiple entity records to be edited at the sa

And to be able to perform both undo and redo operations propertly, each modification in the list of edits contains the following information:

- Entity kind and name: Each entity in core-data is identified by a tuple kind, name. This corresponds to the identifier of the modified entity.
- Entity kind and name: Each entity in core-data is identified by the pair _(kind, name)_. This corresponds to the identifier of the modified entity.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I chose "pair" to reduce confusion for developers on whether they should actually pass a tuple [ 123, 456 ] to our API's functions, when actually the pair is always flattened into the rest of the arguments.

@@ -24,7 +24,7 @@ Once the entity is loaded, you can edit it. For example, the following code sets

The package also exposes a set of actions to manipulate the fetched entity records.

To fetch an entity record, you can call `editEntityRecord`, which takes the entity type, the entity ID and the new entity record as parameters. The following example sets the title of the post with ID 1 to "Hello World".
To edit an entity record, you can call `editEntityRecord`, which takes the entity type, the entity ID and the new entity record as parameters. The following example sets the title of the post with ID 1 to "Hello World".
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is what prompted me to open the PR; everything else is just nitpicking.

@mcsf mcsf requested a review from youknowriad May 30, 2023 09:29
@youknowriad
Copy link
Contributor

Makes sense.

@github-actions
Copy link

Flaky tests detected in 5efbc04.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5119837181
📝 Reported issues:

@mcsf mcsf merged commit cad59c4 into trunk May 30, 2023
@mcsf mcsf deleted the update/doc-undo-redo branch May 30, 2023 10:12
@github-actions github-actions bot added this to the Gutenberg 16.0 milestone May 30, 2023
sethrubenstein pushed a commit to pewresearch/gutenberg that referenced this pull request Jul 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Developer Documentation Documentation for developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants