Closed SantosGuillamot closed 1 year ago
That's great Mario! 👏
I'm just testing it and running into some issues though. I've started a local environment using Local and downloaded the zips.
We should also update the README to explain that if you want to try out the demo you can just use the zips but if you want to make changes to the blocks and tinker with them then it's probably easier using Docker + wp-env
.
It seems to be an issue with how the ZIP file is created for the theme. If I copy and paste the folder into the themes
folder, it seems to work fine. I still have to review it properly as well.
There was a mismatch with some names not having a dash. It should be solved now.
I've changed the base branch to clean-repo
because this doesn't make sense until that one is merged. We don't want to create a ZIP file with the runtime code because that would be incompatible with installing the WP Directives plugin.
The issue with wp-env
should be solved now.
Moreover, I updated the README with the new instructions. I tried to make it a bit more generic, so people using different local development tools can get it running, but keeping the instructions to run it with wp-env
. Feel free to modify anything.
I'm using wp-env and I get this error on the frontend:
I'm not able to reproduce the error, even using wp-env
. Could you confirm it is still happening with the current status of this branch?
This seems related to how we're now defining the initial state on the server in https://github.com/c4rl0sbr4v0/wp-movies-demo/pull/21 and not an issue with this PR so I'm going to approve but let's wait to merge https://github.com/c4rl0sbr4v0/wp-movies-demo/pull/21 first.
This pull request is built on top of https://github.com/c4rl0sbr4v0/wp-movies-demo/pull/21 instead of main
, so it shouldn't be a problem to merge this one if we consider it ready, right?
I'm not able to reproduce the error, even using wp-env.
Okay, I believe I know what is happening:
favorites-number
block uses state.wpmovies.favoriteMovies
, which is defined in the post-favorite
block.favorites-number
block, but not the post-favorite
, it returns that error. For example, if you reload in the search results or in an actor page.I've moved the state.wpmovies.favoriteMovies
to the favorites-number
block, which should be present in all the pages as it is included in the header.
Blocks should be self-sufficient. Repeating the same state is fine if more than one block depends on it. The store is just merged on the server.
Okay, that makes sense, I've added the state
to both blocks.
This PR aims to include a GitHub action that takes care of two things:
package.json
each time there is a push tomain
. Right now it is hardcoded to be always a patch.This way, users would be able to download the plugin and the theme directly from:
And the links will be updated with the latest changes.
I've created a fake 0.1.1 release for testing purposes, and as a way to showcase that files are downloadable. We might need to delete it before merging this Pull Request.