-
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
(3P) Premium Blocks: Add contextual tip for upgrade star icon #44050
Comments
@sfougnier @jancavan Is there a chance I could defer to you for the creation of that star-with-background SVG that's being displayed in the tip? |
It looks like the goal is to overwrite the In Gutenberg:
I'm not seeing a way that the tips can modified from outside gutenberg. Two possible ways to approach this:
I haven't tried B yet, I'll spend some time playing around with it tomorrow. |
In testing, I was able to use Now, I can add I'm not seeing a way to do this with CSS, but I'm open to suggestions if anyone has any. I think we need some sort of modification to gutenberg. Edit: Checking on a CSS driven approach with :after and .content. |
Here's a css only approach. I used a placeholder SVG star from wikipedia for the time being. The positioning of it can be tweaked as well. .block-editor-inserter__tips {
.components-tip {
svg {
visibility: hidden;
}
}
&::before {
display: block;
content: ' ';
background-image: url( 'https://upload.wikimedia.org/wikipedia/commons/1/18/Five-pointed_star.svg' );
position: absolute;
background-size: 24px 24px;
height: 24px;
width: 24px;
}
&::after {
content: 'Premium tools are available for you to preview within your site without an upgrade.';
position: absolute;
bottom: 16px;
right: 16px;
left: 50px;
height: 39px;
z-index: 11;
background: #fff;
text-align: center;
overflow: hidden;
}
}
Issues:
|
Note about customizing through Gutenberg. Even if we are able to add an override mechanism for |
The star asset can be found here: |
Halting work on this, unassigning. |
@mreishus What are the next steps for this? |
Decide which approach to use: CSS:
Integration with Gutenberg:
|
WordPress/gutenberg#22109 (comment) has some good feedback from Core maintainers around creating a Tips API to register, unregister, and display Tips. It might be worth investing time into making that properly extensible for more ease of use down the road |
Latest design Design Links |
Closing this issue as it's not needed at this time. |
This will add a contextual tip to explain the meaning of the premium block stars, introduced in #44048.
I'm not sure if that is even possible currently, we should investigate if we can use
__experimentalInserterMenuExtension
for that and maybe position that tip via CSS.Screenshot
Prior Art
See 123-gh-dotcom-manage
The text was updated successfully, but these errors were encountered: