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.
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
New Package: Gutenpride Template to use with the tutorial #27881
New Package: Gutenpride Template to use with the tutorial #27881
Changes from 11 commits
e324e8e
52be5aa
4b7b40e
4d9d2e0
4993875
4881f09
a1e92a6
7f41065
f7cae04
7945d75
3c50043
e720a6d
3d42782
45a8aec
1e8d29a
c06b22f
b975aec
64cc123
734a5a2
66b307a
dacc299
242aecc
bbc5409
48678a5
25fd165
e3888fa
bb6eab4
7c73995
61f0c34
4305b13
a47601a
065fa3c
3b99aff
4bf4309
e70284d
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a fix added for the original template, see:
https://github.com/WordPress/gutenberg/blob/master/packages/create-block/lib/templates/esnext/src/save.js.mustache
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a fix for this in save.js.mustache. In edit.js.mustache, Should I wrap a
<div { ...useBlockProps() }>
around<TextControl>
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question. In theorhy, it should work with Input as well, but I don't know that :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assets are copied to
assets
folder that is at the same level assrc
in the generated plugin:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jessynd This also answers your question regarding the assets folder. The folder won't actually show up after you have build the block from the template. It is only for the template itself :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have enough context but I can explain what happens here. There are two folders in the scaffolded block:
assets
with the fontsrc
with JS and CSS fileswp-scripts build
orwp-scripts start
they start processing throughsrc/index.js
, so they need to be able to find a relative path to the font, that's why it goes one level up.In the
build
folder, there isfonts
folder create by webpack, and the font is probably copied there (I don't know webpack code).