-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Premium Content: Remove double banners #46659
Conversation
Adding in serenity for possible review since they've worked or are actively working on this block also. |
This PR does not affect the size of JS and CSS bundles shipped to the user's browser. Generated by performance advisor bot at iscalypsofastyet.com. |
} } | ||
className="connect-stripe components-tab-button" | ||
> | ||
{ __( 'Connect Stripe', 'full-site-editing' ) } |
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.
ℹ️ String reuse speeds up translation and improves consistency. The following string might make a good alternative and has already been translated 28 times:
translate( 'Stripe Connection' )
ES Score: 6
</span> | ||
<span className="premium-content-block-nudge__message"> | ||
{ __( | ||
'This block will be hidden from your visitors until you connect to Stripe.', | ||
'Premium content will be hidden from your visitors until you connect to Stripe.', |
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.
🆗 This change will be queued for retranslation. We'll use the existing translations in the meantime.
Caution: This PR affects files in the Editing Toolkit Plugin on WordPress.com D51610-code has been created so you can easily test it on your sandbox. See this FieldGuide page about developing the Editing Toolkit Plugin for more info: PCYsg-ly5-p2 |
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.
Oh, man, this is a great UI improvement overall! I am seeing the same thing Miguel sees...it definitely makes for a slightly confusing user experience. 🤔 I also am only seeing "Connect" instead of "Connect Stripe" on the block-level controls; not sure if this is the desired text or not. (I think "Connect Stripe" is probably clearer.) |
Thanks for the reviews! It should definitely show the the parent block toolbar on first insert, I will check that and see what's going on. As a follow up to this I'll also be working on persisting the parent navigation bar in some way (see https://github.com/Automattic/view-design/issues/94). Right now the user would need to hover over the child block icon, and select the parent block icon that pops up. |
@mmtr I made some tweaks. Can you try the block focus again? This is what I get on my sandbox: |
@blackjackkent Did you have the latest version? I'm not able to reproduce the "Connect" vs "Connect Stripe" text. It should always be "Connect Stripe". |
This is working for me in testing, but I have concerns about the subtlety of the Stripe connection component with this change. It's not obvious that the toolbar is a call to action and a required first step for making this block work. A user can publish a post with a Premium Content block that has not been connected to Stripe and there's no warning or messaging; the block simply does not appear on the front end. I worry this makes it look broken and will generate more support requests for an already confusing block. |
@sixhours I totally agree re: front end. I have a follow up issue for this. https://github.com/Automattic/view-design/issues/95 What I will do is add a message in the front end about connecting Stripe if this has not been done. There's a few issues that I'm coming straight back to this sprint, I'm just trying to break them out into separate PRs. |
@apeatling No idea why I was just seeing "Connect" before but it looks fine now! Re @sixhours 's comment -- is there a way to give the button a color highlight? (maybe red text or something like that?) That way it would draw the eye a little more. |
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.
Awesome, it works great now!
It's not obvious that the toolbar is a call to action and a required first step for making this block work. A user can publish a post with a Premium Content block that has not been connected to Stripe and there's no warning or messaging
I share this concern too. Do we have any other block that includes a required action in the block toolbar? I have the feeling that the block toolbar has always being used for customizing the block, so I'm not sure if users will be aware that they have to click on that action in order to make the block work.
Anyway, this dramatically improves the UX in other aspects so I don't want to block changes here due to that. But if we notice there is a spike if published posts containing Premium Content blocks without a Stripe connection, we should reconsider bringing back the Stripe nudge.
const shouldShowConnectButton = () => { | ||
if ( ! shouldUpgrade && apiState !== API_STATE_CONNECTED && connectURL ) { | ||
return true; | ||
} | ||
|
||
stripeNudge = <StripeNudge { ...props } stripeConnectUrl={ stripeConnectUrl } />; | ||
} | ||
return false; | ||
}; |
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.
Nitpick and non-blocking: This can be simplified to
const shouldShowConnectButton = () => ! shouldUpgrade && apiState !== API_STATE_CONNECTED && connectURL;
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.
Thanks, I'll fix this in a followup PR.
Thanks for the reviews. I'm going to work on the call to action, and communicating that Stripe connection is required in follow up PRs. 👍 |
ab2a951
to
85b700b
Compare
✅ Rebased. |
This Pull Request is now available for translation here: https://translate.wordpress.com/deliverables/5067016 Thank you @apeatling for including a screenshot in the description! This is really helpful for our translators. |
Release 2.8.3: * Editor close button should deal with situation where experimental GB feature is unavailable (#46666) * Premium Content: Remove double banners (#46659) * Premium Content: Add missing migrations for margin fix (#46924) * Editing Toolkit: Add a workaround to prevent slider blocks breaking the editor at full width (#46951) * Focused Launch: added WIP Focused Launch modal behind a flag (#46686)
Translation for this Pull Request has now been finished. |
Changes proposed in this Pull Request
Update the premium content block to remove the Stripe connect banner, and the subscriber/non subscriber banner. Doing this means there is no persistent block UI in the canvas, improving the design experience for patterns using this block. These two banners have been merged into the block toolbar for the block.
Testing instructions
yarn dev --sync
in thewp-calypso/apps/editing-toolkit
directoryFixes https://github.com/Automattic/view-design/issues/84
cc @ianstewart