Move ESNext to default code example shown#17873
Merged
Conversation
Member
Member
Author
|
Thanks @gziolo we are coordinating together. This PR was to start for tutorial section, while he was going to work on other doc sections. 👍 |
mkaz
commented
Nov 3, 2019
Member
Author
mkaz
left a comment
There was a problem hiding this comment.
Switch JS to JSX for code syntax
...designers-developers/developers/tutorials/block-tutorial/applying-styles-with-stylesheets.md
Outdated
Show resolved
Hide resolved
...signers-developers/developers/tutorials/block-tutorial/block-controls-toolbar-and-sidebar.md
Outdated
Show resolved
Hide resolved
docs/designers-developers/developers/tutorials/block-tutorial/creating-dynamic-blocks.md
Outdated
Show resolved
Hide resolved
docs/designers-developers/developers/tutorials/block-tutorial/creating-dynamic-blocks.md
Outdated
Show resolved
Hide resolved
...developers/developers/tutorials/block-tutorial/introducing-attributes-and-editable-fields.md
Outdated
Show resolved
Hide resolved
docs/designers-developers/developers/tutorials/block-tutorial/writing-your-first-block-type.md
Outdated
Show resolved
Hide resolved
- Also remove 05 numbering of examples, does not exist in examples repo And 05 in the examples repo is the recipe card.
Update loading of dependencies and version to match examples repo, using the asset_file from build script.
Switch JS to JSX for code syntax
df0f4b2 to
6e1dbe1
Compare
oandregal
reviewed
Dec 17, 2019
docs/designers-developers/developers/tutorials/block-tutorial/creating-dynamic-blocks.md
Outdated
Show resolved
Hide resolved
oandregal
reviewed
Dec 17, 2019
docs/designers-developers/developers/tutorials/block-tutorial/creating-dynamic-blocks.md
Outdated
Show resolved
Hide resolved
oandregal
approved these changes
Dec 17, 2019
Member
oandregal
left a comment
There was a problem hiding this comment.
I've left a couple of suggestions. Other than that, this is ready to land.
…creating-dynamic-blocks.md Co-Authored-By: Andrés <nosolosw@users.noreply.github.com>
…creating-dynamic-blocks.md Co-Authored-By: Andrés <nosolosw@users.noreply.github.com>
20 tasks
mkaz
added a commit
that referenced
this pull request
Jun 4, 2020
This was referenced Jun 6, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This changes the documentation in the block tutorials. It adds clarification around ES5 and ESNext and by default shows ESNext code. This sets the documentation for having ESNext as a more preferred syntax, but does not remove any of the ES5 examples.
The reasoning behind this change is that it can be quite confusing to see mostly ES5 code in the documentation but then it is not the primary use case "in the wild". This makes for an odd disconnect, and I think the docs should reflect the real usage.
For example, the core Gutenberg packages and block library are all in ESNext, as well as the readme.md examples for each component is only in ESNext syntax. This is easiest to see using the WP Storybook
Additionally the majority of plugins and blocks from other code bases are in ESNext syntax, people learning Gutenberg will use these as a reference which can be confusing. CoBlocks is just but one example of many.
Initially discussed in Editor Chat
How has this been tested?
Confirm documentation still makes sense and works as described. No real functional change, the majority is just reordering of ESNext code block ahead of ES5.
View live on the branch here
Types of changes
Documentation updates.