-
Notifications
You must be signed in to change notification settings - Fork 2k
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
FSE: Add block pattern infrastructure #40105
Conversation
Caution: This PR has changes that must be merged to WordPress.com |
This PR does not affect the size of JS and CSS bundles shipped to the user's browser. Generated by performance advisor bot at iscalypsofastyet.com. |
It already exists as a Core pattern.
@obenland should https://calypso.live/?branch=add/fse-block-patterns work in testing this? I tried it, but don't see the patterns button in the editor. |
FSE is using wp-calypso as a development environment only, it's not integrated with it. |
Core images are super limiting. |
Just to expand on this for clarity, what do you mean?
With clarity on this, contributors like me can take clear next actions to help. |
@obenland do we want tracks events for the todo list? |
It depends on what we want to track. I assume which pattern was inserted? Anything else? |
Yep. Definitely which pattern was inserted. Can we track any other engagement with the patterns? Deletion and editing? Can we track if the Pattern sidebar was opened? |
@lancewillett the first! The ones that can be hosted / bundled there might be a more restrictive set than what could be used here. (I believe Unsplash was being used fine for WP.com.) |
I don't think you can easily track this since patterns become just regular blocks once inserted. I'd only count insertion. |
The patterns inserter surfaces the inserted blocks and a success notice, so to track patterns the best we could do would be to track success notices and then filter those? It wouldn't be very high quality data however. It would not account for translations and contain the entire notice text. |
Gutenberg is not built with tracking in mind, so we're rather limited in the ways we can track things. These are the events we're currently tracking:
We could track block modifications, I'm just not sure how useful that'll be. From what I was able to find out it looks like it fires for every keystroke when typing text, not just once after a block was updated. |
@ianstewart @iamtakashi When you get a chance, could you add the |
We've started tracking that at … … with the Ready to Ship label in that repo. |
@ianstewart @iamtakashi I updated and added all patterns that are ready to ship. These are the adjustments I made:
Remaining blocker:
|
After a discussion with @iamtakashi and @ianstewart in p1584641583330800-dotcom-view-design-slack, we decided to create a dedicated pattern site for patterns and images to live. This will also allow us to switch to using json files easily, if we decide to do so at a later point in time. |
@obenland Thanks for moving forward with a dedicated site approach. I am glad the process of adding and updating patterns is going to be easy. I appreciate it :bowing: In the meantime, if I want to update some of the patterns that have already been added, what is the best way to do that? It's not urgent or anything, but I want to fix something in a pattern before the UI becomes available. |
Following up with some internal conversations, it seems to be decided to use pbNZNv-I-p2 to store both patterns and their assets for hot-linking.
@iamtakashi Any updates on your required changes to patterns? Should I look for them somewhere in the dedicated site? I think we might need to act more quickly on this, as the Gutenberg update is coming to dotcom soon. |
@iamtakashi Any updates on your required changes to patterns? I was waiting for the instruction to update patterns :) Having them in the dedicated site would be the best now? If so I can move all the patterns to the site that are ready to ship this afternoon. |
Related WordPress/gutenberg#21074 |
From conversations I've been able to locate, the dedicated site seems like a way to go now. I or @obenland can port those patterns once ready over there. Some manual conversion work seems to be needed there from my understanding of the code |
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.
This is working well. I have tested with the latest Gutenberg from the plugin repo (7.7.1) which shows the pattern UI and as expected, it is filled with patterns as declared here. I have also tested with an older Gutenberg and there are no glitches or errors.
Technically, I think we are good to go on this PR. However, since we might soon get a finalized list of patterns and their assets loaded from our new designated location, I think we should either:
- wait with this PR for the final content
- remove content here and leave just the "two-columns" pattern and add other patterns separately.
Up to you to choose
Screenshot of the feature as a reference:
Ok, I've added all the ready-to-ship patterns (11 patterns) to the master site now. |
@iamtakashi I added all remaining patterns except "Subscription". The jetpack subscription block kept breaking in preview and on insert, so we'll have to revisit that one. |
@obenland Weird. Can you open an issue with what you saw? It's probably worth to report here as the block seems to be worked on soon. Automattic/jetpack#15076 |
Temporarily removing a broken-looking block pattern. Ref: #40105 (comment)
Temporarily removing a broken-looking block pattern. Ref: #40105 (comment)
Until we have a better version of tracking would it be worthwhile/complicated to track this for EN only? |
It wouldn't be complicated, I'm just not sure how usable that data will be. It would track the pattern title, so patterns like "Call For Action" would not be distinguishable. |
Changes proposed in this Pull Request
Testing instructions
TODO
full-site-editing
text domain even works?