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

Mailchimp gutenberg block #10619

Merged
merged 0 commits into from
Dec 28, 2018
Merged

Conversation

artpi
Copy link
Contributor

@artpi artpi commented Nov 14, 2018

This turns shortcode introduced in #10597 into a server-rendered gutenberg block.

The JS part of the process is in Automattic/wp-calypso#28798

zrzut ekranu 2018-11-22 o 16 10 37

Testing instructions

  1. Checkout Mailchimp: Gutenberg block wp-calypso#28798 in calypso
  2. Checkout this PR to your Jetpack dir
  3. Build script with npm run sdk gutenberg client/gutenberg/extensions/presets/jetpack -- --output-dir=~/GIT/jetpack/_inc/blocks -w to your proper Jetpack dir
  4. Search for email-subscribe block, use it, publish and see on the frontend

If you want the block to actually work (collect email):
(this is the same flow as in #10597)
You need to be an a12n to connect Mailchimp.

  1. In Sharing (https://wordpress.com/sharing/) you have to connect your MC account
  2. Select an MC list
  3. Go to published page with block
  4. Submit email
  5. Go to your mailchimp account to see the email there

@artpi artpi added [Status] In Progress [Focus] Blocks Issues related to the block editor, aka Gutenberg, and its extensions developed in Jetpack labels Nov 14, 2018
@artpi artpi self-assigned this Nov 14, 2018
@artpi artpi requested a review from a team as a code owner November 14, 2018 18:26
Copy link
Member

@tyxla tyxla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this! ❤️

How do you feel about moving the client side of the block to Calypso, and have it be built by the SDK and shipped as part of the Jetpack preset, under the Jetpack category?

I'm happy to provide you with some details and all the support you'll need if that sounds good to you.

@artpi
Copy link
Contributor Author

artpi commented Nov 15, 2018

How do you feel about moving the client side of the block to Calypso, and have it be built by the SDK and shipped as part of the Jetpack preset, under the Jetpack category?

@tyxla how exactly would that work? Move the javascript itself to Calypso?
What if someone is using Gutenberg on wp-admin?

I am confused a bit, since I have exatly 6 hours of Gutenberg experience now so please pardon my naive questions :)

@tyxla
Copy link
Member

tyxla commented Nov 19, 2018

@tyxla how exactly would that work? Move the javascript itself to Calypso?

Yes :) That is how we've been working on many other blocks for Jetpack.

Then, we use the SDK for building the blocks (you can read more about it here).

What if someone is using Gutenberg on wp-admin?

Good question - we release the blocks from Calypso as a separate npm package, and have a process to include and use that package in Jetpack. You can read more about it in pafL3P-4t-p2.

Finally, if you need some examples, you can have a look at the blocks we already have in Calypso, for example Markdown.

Let me know if you have any questions!

@artpi artpi added [Status] Needs Review To request a review from Crew. Label will be renamed soon. and removed [Status] In Progress labels Nov 22, 2018
@artpi artpi changed the title WIP Mailchimp gutenberg block Mailchimp gutenberg block Nov 23, 2018
@jeherve jeherve added [Status] In Progress DO NOT MERGE don't merge it! and removed [Status] Needs Review To request a review from Crew. Label will be renamed soon. labels Nov 26, 2018
@artpi artpi merged commit 9f70a5d into mailchimp/introduce-shortcode Dec 28, 2018
@artpi artpi deleted the mailchimp/gutenberg branch December 28, 2018 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Shortcodes / Embeds [Focus] Blocks Issues related to the block editor, aka Gutenberg, and its extensions developed in Jetpack
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants