-
Notifications
You must be signed in to change notification settings - Fork 136
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 faust blockset
command
#1585
Conversation
Signed-off-by: Joe Fusco <[email protected]>
Signed-off-by: Joe Fusco <[email protected]>
Signed-off-by: Joe Fusco <[email protected]>
Signed-off-by: Joe Fusco <[email protected]>
Signed-off-by: Joe Fusco <[email protected]>
Signed-off-by: Joe Fusco <[email protected]>
Signed-off-by: Joe Fusco <[email protected]>
Signed-off-by: Joe Fusco <[email protected]>
Signed-off-by: Joe Fusco <[email protected]> # Conflicts: # package-lock.json
Signed-off-by: Joe Fusco <[email protected]>
Signed-off-by: Joe Fusco <[email protected]>
Signed-off-by: Joe Fusco <[email protected]>
Signed-off-by: Joe Fusco <[email protected]>
Signed-off-by: Joe Fusco <[email protected]>
Signed-off-by: Joe Fusco <[email protected]>
Signed-off-by: Joe Fusco <[email protected]>
Signed-off-by: Joe Fusco <[email protected]>
Signed-off-by: Joe Fusco <[email protected]>
🦋 Changeset detectedLatest commit: b641ca8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Signed-off-by: Joe Fusco <[email protected]>
Signed-off-by: Joe Fusco <[email protected]>
Signed-off-by: Joe Fusco <[email protected]>
Signed-off-by: Joe Fusco <[email protected]>
Signed-off-by: Joe Fusco <[email protected]>
Signed-off-by: Joe Fusco <[email protected]>
Signed-off-by: Joe Fusco <[email protected]>
Signed-off-by: Joe Fusco <[email protected]>
Signed-off-by: Joe Fusco <[email protected]>
Nice work on this @josephfusco and @theodesp! Could we style Block B a little (like we have for block A) for the editor? When added and in save mode, it's not detectable: Screen.Recording.2023-10-13.at.2.16.56.PM.mov |
Can confirm I saw this |
we don't bundle |
@TeresaGobble the block is there I think the styles make it disappear. I will update the text color. |
📦 Next.js Bundle Analysis for @faustwp/getting-started-exampleThis analysis was generated by the Next.js Bundle Analysis action. 🤖
|
Page | Size (compressed) |
---|---|
global |
245.33 KB (🟡 +35.49 KB) |
Details
The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.
Any third party scripts you have added directly to your app using the <script>
tag are not accounted for in this analysis
If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!
New Page Added
The following page was added to the bundle from the code in this PR:
Page | Size (compressed) | First Load | % of Budget (350 KB ) |
---|---|---|---|
/example |
843 B |
246.15 KB | 70.33% |
@josephfusco @theodesp When adding blocks to the home page, they are not displayed on the headless frontend. Do we need to import the proper GraphQL fragments (i.e. |
Did a code review and everything looks good. I think we just need to expose the Block A & B to the |
Will add the fragments. |
@@ -23,7 +23,6 @@ jobs: | |||
matrix: | |||
next-dir: [ | |||
'examples/next/faustwp-getting-started', | |||
'examples/next/block-support' |
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.
Adding this one is problematic.
@@ -11,3 +11,5 @@ | |||
@import '@wordpress/base-styles/breakpoints'; | |||
@import '@wordpress/block-library/src/style'; | |||
@import '@wordpress/block-library/src/theme'; | |||
|
|||
@import '../wp-blocks/block-b/style.scss' |
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.
include block style here is next.js hates importing global styles within the components.
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.
LGTM! Nice work @theodesp @josephfusco
Tasks
Description
These changes introduce a new command,
faust blockset
, for the @faustwp/cli package as well as the corresponding WP REST API endpoint to handle moving the blocks from the Next.js application into the WordPress uploads directory.Related Issue(s):
Testing
nojira-add-blockset-command
. Runnpm i
andnpm run build
at root of monorepo.npm run blockset -w @faustwp/block-support-example
from the root of the monorepo - this assumes you haveplugins/faustwp/
symlinked into a local WordPress site.wp-content/uploads/faustwp/blocks/
in your WordPress site now containsblock-a
&block-b
.npm run blockset -w @faustwp/block-support-example
againwp-content/uploads/faustwp/blocks/
now only containsblock-b
.Demo
blockset-filetransfer-demo.mov