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

Update Quick Start GIF for Create Block Docs #27602

Closed
zzap opened this issue Dec 9, 2020 · 9 comments · Fixed by #28037
Closed

Update Quick Start GIF for Create Block Docs #27602

zzap opened this issue Dec 9, 2020 · 9 comments · Fixed by #28037
Assignees
Labels
[Status] In Progress Tracking issues with work in progress [Tool] Create Block /packages/create-block [Type] Developer Documentation Documentation for developers [Type] Enhancement A suggestion for improvement.

Comments

@zzap
Copy link
Member

zzap commented Dec 9, 2020

This is not really a bug but there's no type for updating the docs (maybe create one :) ).

In .gif animation for create block package readme file we still have this command for creating a block:

npm init @wordpress/block todo-list

However, code snippet below is up to date and show different command:

npx @wordpress/create-block todo-list

Also, animation clearly shows this command should be executed in plugins folder:

cd wp-content/plugins

This is not mentioned anywhere in text and I think it should be.

@annezazu annezazu added [Type] Developer Documentation Documentation for developers [Type] Enhancement A suggestion for improvement. labels Dec 10, 2020
@gziolo gziolo added the [Tool] Create Block /packages/create-block label Dec 10, 2020
@gziolo
Copy link
Member

gziolo commented Dec 10, 2020

To be clear, both commands work exactly the same. npm init @wordpress/block is shorter but for some reasons we use npx @wordpress/create-block now in the documentation. This demo is hosted on nake.wordpress.org so it could be updated there if it isn't used in some old post. Otherwise we should still upload it to make.wordpress.org and update the reference in the README file.

Next week we are publishing packages to npm so we could record new demo just after it happens to have the latest version.

@zzap
Copy link
Member Author

zzap commented Dec 10, 2020

Next week we are publishing packages to npm so we could record new demo just after it happens to have the latest version.

Awesome. Thank you.

By the way, I love that we recommend npx over npm even though the end result is the same.

@gziolo
Copy link
Member

gziolo commented Dec 17, 2020

There is a new version of @wordpress/create-block available so we can record a new GIF presenting how this tool looks in action.

@gziolo
Copy link
Member

gziolo commented Jan 7, 2021

I recorded a new GIF that contains more details and uses interactive mode:
wordpress-create-block

@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Jan 7, 2021
@gziolo
Copy link
Member

gziolo commented Jan 7, 2021

Also, animation clearly shows this command should be executed in plugins folder:

It isn't a strong requirement. You can run it anywhere, but then you probably will want to move somehow your plugin to test with WordPress. I removed that part from the demo to avoid confusion.

@zzap
Copy link
Member Author

zzap commented Jan 7, 2021

Thank you so much @gziolo it looks great :)

Yes, of course you can run it anywhere and it will build files but every next step need that folder to be inside plugins dir. I don't think people just build custom blocks (or anything for that matter) without checking how it works until it's done.

As this is documentation for building blocks as WordPress plugins, I'd argue we should note somewhere that plugins should be working directory for initiating the whole process.

@gziolo
Copy link
Member

gziolo commented Jan 7, 2021

As this is documentation for building blocks as WordPress plugins, I'd argue we should note somewhere that plugins should be working directory for initiating the whole process.

Good point, I will open another PR that includes a note in the Quick Start section. 👍🏻

@gziolo
Copy link
Member

gziolo commented Jan 7, 2021

Another PR is ready #28052.

@zzap
Copy link
Member Author

zzap commented Jan 7, 2021

That's awesome. Thank you so much 💯

gziolo added a commit that referenced this issue Jan 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Status] In Progress Tracking issues with work in progress [Tool] Create Block /packages/create-block [Type] Developer Documentation Documentation for developers [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants