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

Gutenpack Subscription Block (Take two) #28887

Merged
merged 11 commits into from
Dec 14, 2018
Merged

Conversation

gititon
Copy link
Contributor

@gititon gititon commented Nov 27, 2018

Changes proposed in this Pull Request

This pull request adds the Gutenberg Subscription block.

The Subscription block invites visitors to sign up to be notified when there are new posts on a site.

When the block has focus in the editor, editors can toggle whether to show the number of subscribers in the block. When it doesn't have focus, editors will see the number of subscribers if they toggled that on.

Testing instructions

Note that the block still is going to receive some CSS ❤️(cc @MichaelArestad) , so please focus on testing its functionality for now.

  1. Checkout this Calypso branch and the corresponding Jetpack branch, Gutenpack Subscription Block jetpack#10564.

  2. Run the command to build the Subscription block from your wp-calypso repo directory:

npm run sdk gutenberg client/gutenberg/extensions/presets/jetpack -- --output-dir=/<path_to_jetpack_repo>/_inc/blocks -w
  1. Connect Jetpack if it isn't connected

  2. Create a new post and add the Jetpack Subscription Block.

  3. Toggle the "show number of subscribers". Confirm that you see the number of subscribers when the block loses focus.

  4. Publish the post. Confirm that you see it on the frontend.

  5. Subscribe by using the block with a user or two (they will have to be a connected Jetpack user)

  6. Confirm that you see the number of subscribed users on the frontend (when the toggle was enabled for the block in the editor) and the editor when the block doesn't have focus.

@gititon gititon added Jetpack [Status] In Progress [Goal] Gutenberg Working towards full integration with Gutenberg labels Nov 27, 2018
@matticbot
Copy link
Contributor

@gititon gititon added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. and removed [Status] In Progress labels Nov 30, 2018
@gititon gititon self-assigned this Nov 30, 2018
@aldavigdis aldavigdis added the [Feature] Subscriptions All subscription-related things such as paid and unpaid, user management, and newsletter settings. label Nov 30, 2018
@gititon gititon force-pushed the subscriptions-block-two branch from 1a93993 to 4357945 Compare December 13, 2018 15:46
…g attributes to use camelcase for consistency
const { showSubscribersTotal } = attributes;
return (
<RawHTML
>{ `[jetpack_subscription_form show_subscribers_total="${ showSubscribersTotal }" show_only_email_and_button="true"]` }</RawHTML>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
>{ `[jetpack_subscription_form show_subscribers_total="${ showSubscribersTotal }" show_only_email_and_button="true"]` }</RawHTML>
>{ `[jetpack_subscription_form show_subscribers_total="${ showSubscribersTotal }" show_title="false"]` }</RawHTML>

I think we should go this way with the format of the shortcode, but let's change it on a following iteration

Copy link
Contributor

@lezama lezama left a comment

Choose a reason for hiding this comment

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

let's 🚢 this!

@gititon gititon merged commit b2f453b into master Dec 14, 2018
@gititon gititon deleted the subscriptions-block-two branch December 14, 2018 22:06
@matticbot matticbot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Dec 14, 2018
blowery added a commit that referenced this pull request Dec 18, 2018
…sh-2019

* origin/master:
  change "expert" to "support" in page route and title (#29459)
  Add note to concierge upsell page about sessions only being offered in English. (#29461)
  Jetpack Blocks: Fix webpack warnings due to dynamic import (#29509)
  Gutenberg: Reset core resolvers on site change (#29445)
  Signup: Remove Masterbar from Signup (#28886)
  Fix missing bumpStat call (#29504)
  Gutenberg Jetpack Preset: Generate imports dynamically from index.json (#29435)
  Fix the clean:public script to do a better job cleaning public/ folder (#29354)
  Tiled gallery: Add alignWide support (#29493)
  Tiled Gallery: Add noResize to block save (#29496)
  Show G Suite user fields by default (#29458)
  ColorThemes: Add GA and bumpStat events for scheme picking (#29413)
  Remove legacy mock for extensions reducer (#29397)
  Antispam promo card: tweak copy to make it clearer (#29440)
  prevent 0 as street number for ebanx checkouts (#29487)
  Gutenberg: Update Related Posts to use the posts endpoint (#29439)
  remove override on payment methods name in India (#29406)
  Add a space to separate "the" from the holiday name placeholder. (#29479)
  Revert "Migrate my-sites/sharing to webpack css pipeline (#28607)" (#29463)
  Gutenpack Subscription Block (Take two) (#28887)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Subscriptions All subscription-related things such as paid and unpaid, user management, and newsletter settings. [Goal] Gutenberg Working towards full integration with Gutenberg Jetpack
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants