-
Notifications
You must be signed in to change notification settings - Fork 5
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
Tutorial on block deprecation #71
Comments
ResourcesDocumentation
Videos
Blog articles
Forums |
Things to mention
Simple demonstrationScaffold a block with |
@mburridge I have a lot of deprecation horror stories, so looking forward to this piece. Will definitely be a very valuable addition to the blog! 💪 |
@ndiego please do share. It might be nice to have a section on pitfalls and gotchas to watch out for. |
Will do. I'll put together some examples next week 💪 |
I would like to read about some nice ways to deprecate third–party blocks in favor of matured core blocks. |
A draft of the post is ready for review. Please test the code examples and that the iterations of the code and the deprecations of previous versions all work. Also any suggestions or corrections that might improve the post will be very welcome. Thanks. |
@mburridge I will read through today and add any comments I might have, but one thing that has tripped me up frequently is multiple deprecation issues. If there is more than one, sometimes the error message in the console can lead you in the wrong direction since it will only display the first error it encounters. So maybe a warning that the error message is helpful but only displays one error at a time and will not always be able to diagnose every issue. |
This is well-written, as usual, @mburridge. I learned a ton and think this is exactly the kind of content that we need on the Developer Blog. I left a handful of in-doc comments. I think my biggest note would be to try to break up the text a bit more with sections. I think this is pushing 2,000 words, so having a few headings sprinkled in there will make it easier to digest for readers. I still need to do a run-through of the code, but the copy is pretty solid at this point. |
Thanks @justintadlock. I've broken up the wall-of-text with some headings, as per your suggestion. Let me know what you think. |
@mburridge - The headings look good to me. I've finished walking through the code and left my suggestions in the document. Overall, it felt pretty straightforward, and I successfully worked through each item. It was a really nice exercise for me since I haven't tried deprecation before. I'll definitely be more at ease with doing it for future blocks. In addition to my mention of being precise about |
Glad you found it useful @justintadlock - I guess I must be doing something right! 😅
Great suggestion, thanks - I've done that. |
Public preview is now available for review. |
@mburridge Here is a publish checklist for you :-)
|
The only thing outstanding is that I can't find Fabian Kägy's profile page for the props. |
You would need to do at it manually. The site only pulls from the list of users on this site, not on all of wordpress. It's a known issue, that hasn't been fixed yet. |
Okay, I found it in the end - he spells his surname differently in his username than in is actual surname 🤷♂️ |
As far as I'm concerned this is ready to go @bph @abhansnuk @marybaum. |
"Block deprecation – a tutorial" now published. |
Why not implement a plug-in that traverses all articles containing the Attempt Block Recovery button and simulates users clicking to go to batch Recovery? |
Discussed in #67
Originally posted by mburridge January 26, 2023
If you make a change to the way that a block is rendered you will see the "invalid content" error message after the change.
This commonly occurs during development, and developers working with blocks are very aware of this and are used to dealing with it.
However, if you've already published a block and want to make changes to it in an update you won't want users to see the "invalid content" error message, which they will in each instance of the block across their site until recovery is done on each of them.
To circumvent this problem developers can "deprecate" the old version of the block.
A tutorial on how to deprecate a block, and when and why you should do it, would be a nice addition to the Developer Blog.
Reference:
Deprecation
The text was updated successfully, but these errors were encountered: