Skip to content
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

[WIP] Add gutenberg block #7

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open

[WIP] Add gutenberg block #7

wants to merge 4 commits into from

Conversation

ktbee
Copy link
Contributor

@ktbee ktbee commented Jul 13, 2018

I thought I'd make my work so far available to anyone who wants to continue figuring out gutenblocks for Mobile stories.

This PR:

  • Updates ACF to a version that works with Gutenber image uploads
  • Adds a Mobile Stories plugin for Gutenberg (this needs to be activated in the Plugins admin menu) that is based on create-guten-block
  • Adds a pre- composer install script to copy the Mobile Stories plugin to the right directory in the theme so the WordPress editor can find it where it expects it to be.

Gotchas

To update the plugin, I would cd into the Mobile Stories plugin root directory and run npm start so that it compiled automatically as I was working on it. However with each change I wanted to see in the editor, I needed to run composer install again to copy that version to the right plugins directory. I'm certain this can be improved, it was just the workaround I have for now to keep the plugin in the theme.

This branch currently has a bug where once you save content in the gutenblock and refresh the page, the editor says an external source changed the plugin and prevents you from using the dynamic UI (you can only edit it as HTML). I think it's because the save function's output is a little different from the edit, but I haven't fully tracked it down yet. More light reading here:

WordPress/gutenberg#6856
WordPress/gutenberg#7604

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant