Extract the edit-post module as a reusable package#10429
Conversation
There was a problem hiding this comment.
Not sure if npm will allow downgrading
There was a problem hiding this comment.
It was not released :)
There was a problem hiding this comment.
it was as 1.0.1 - somehow private doesn't stop Lerna from publishing ...
There was a problem hiding this comment.
I don't see it in npm, I think we're fine.
04bd9be to
1057025
Compare
| @@ -1,10 +0,0 @@ | |||
| .edit-post-post-trash { | |||
There was a problem hiding this comment.
I confirm it can be safely removed. It's dead code.
| @@ -265,16 +286,3 @@ body.gutenberg-editor-page { | |||
| } | |||
| } | |||
| } | |||
|
|
|||
There was a problem hiding this comment.
I confirmed this with @iseulde that this is dead code which is no longer necessary.
gziolo
left a comment
There was a problem hiding this comment.
I can confirm that everything still works as expected. I added a few commits so it would be nice to have another check for the code I added.
Amazing work @youknowriad on moving all remaining code to packages. This one marks another milestone. Looking forward to see the outcome of work started by @omarreiss and @atimmer to see it consumed in WordPress core.
|
Thanks for the help @gziolo |
tofumatt
left a comment
There was a problem hiding this comment.
This package is not meant to be used outside the WordPress context though.
Can you still have post-install messages for npm packages? Might be nice if our Gutenberg package displayed some kind of message for our (currently) WordPress-specific packages. 🤷♂️
|
@tofumatt seems like a good idea, we'll have to make sure it's not "a big warning" as the message will show up in WordPress Core and people should feel confident ignoring it. |
|
Can we try to hide this message behind env flag so we could skip it in core? |
This PR extracts the edit-post package into the npm packages. The main reason is to make it usable in WordPress Core as a npm dependency. This package is not meant to be used outside the WordPress context though.
This is also the last Gutenberg package to move to the packages folder which means all of the Gutenberg JS code is a package now. There's only one deprecated component left at the root-level which will be able to remove in one or two releases.