-
Notifications
You must be signed in to change notification settings - Fork 274
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 Interactive Block Playground package #220
Add Interactive Block Playground package #220
Conversation
changeOrigin: true, | ||
secure: true, | ||
}, | ||
'/plugin-proxy': { |
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.
For later – a standard vite config with these endpoints in place would be super useful
@@ -0,0 +1,19 @@ | |||
{ |
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.
CI won't be happy until this mimics tsconfig setup from other projects: three tsconfig.json files and a reference in the root tsconfig.base.json.
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 b432c70 👍
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.
Although, I'm not sure if that's entirely correct. I've now removed the reference in
the base tsconfig.json because I was getting a referenced project must have composite:true
TS error here.
The tsconfig files are just copied over from the website
package. As far as I
can see the website
package does not have the reference in the base tsconfig.
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 was getting a referenced project must have composite:true TS error here.
That seems like a bug: nrwl/nx#4508
Looks like it can be fixed by having a step called build
in project.json
– which is a good idea anyway if this is to benefit from all the build
-related automations (e.g. CI build checks).
As far as I can see the website package does not have the reference in the base tsconfig.
Ah, that was an oversight – thanks! I just fixed it in 82386e7
return new DOMParser().parseFromString(response.text, 'text/html')!; | ||
} | ||
|
||
async function createNewPost( |
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.
Follow-up: This would make a great Blueprint step
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.
Opened a separate PR for this: #234. Once that one is merged, I can just use the step in this package.
@michalczaplinski this is great! I left a few nits for now and a few follow-up tasks for later – I'm happy to merge this as soon as CI is great and the nits are addressed. I know the code is quite messy, but it's still a |
Co-authored-by: Adam Zielinski <adam@adamziel.com>
Co-authored-by: Adam Zielinski <adam@adamziel.com>
a2d583b
to
2f6ff6a
Compare
Hey @adamziel I think I've addressed all the nits now and made the CI pass. Do you wanna give it another review? |
@michalczaplinski looking good! I added a suggestion to clean up Also, I just landed the Interactive Code Block today which ships with a CodeMirror React component and some utilities to build WordPress plugins. Let's look into reusing some of these bits once this one is merged. |
Accept changes from Adam Co-authored-by: Adam Zielinski <adam@adamziel.com>
@adamziel and I updated the So, now you can do for example: {
step: 'installPlugin',
pluginZipFile: {
resource: 'url',
url: '/plugin-proxy?repo=WordPress/block-interactivity-experiments&name=block-interactivity-experiments.zip',
}
} Done in ed5c11f |
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.
Great first spike, thank you @michal
Bringing the https://github.com/michalczaplinski/interactive-block-playground into this repo.
Screen.Recording.2023-04-27.at.20.51.30.mov
Opening this early, even though:
nx
andvite
incorrectly.playgroundOrigin
like the website does here.nx
task to watch & rebuild the plugins and zip them so thatbuild-zips.cjs
worksYou can try it out it with
npm run dev:editor
from the repo root.