-
Notifications
You must be signed in to change notification settings - Fork 812
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
Plan Icon: Update and use the component on My Plan page #14126
Comments
This issue has been marked as stale. This happened because:
No further action is needed. But it's worth checking if this ticket has clear reproduction steps and it is still reproducible. Feel free to close this issue if you think it's not valid anymore — if you do, please add a brief explanation. |
My original plan was to update Pretty much every "image" inside the Jetpack plugin right now is a static SVG, either as inline code or as files inside the repo itself. When we reference To give a more concrete example, here's the relevant React code snippet: <div className="dops-banner__icon-plan">
<ProductIcon slug={ product } />
</div> Here's the resulting markup for the path <div class="dops-banner__icon-plan">
<img
src="images/jetpack-premium-95eb8703805b446ffd38e9c7e9a028e1.svg"
class="product-icon is-jetpack-premium"
role="presentation"
alt=""
/>
</div> Note that the img src is relative to the current directory, which is And all the images from |
If anyone wants to take my work and run with it in the future, it's in the I should also note that I've tried adding a const fileLoader = FileConfig.loader( {
outputPath: 'images',
publicPath: `/wp-content/plugins/jetpack/_inc/build/images/`,
esModules: true,
} );
sharedWebpackConfig.module.rules.push( fileLoader ); |
These 2 pending PRs should cover what has been mentioned in this issue, except the renaming to As @mattgawarecki said, the ideal situation would be to directly import |
Problem
Even though currently there is a
PlanIcon
component in the codebase, it's used only in theBanner
component.Ideally we would use it in every time a plan icon is used, e.g. on the My Plan page (instead of using hard-coded images paths).
The problem is that those icons are different visually. E.g. here's the Personal plan icon rendered by
PlanIcon
:And here's the same Personal plan icon rendered on My Plan page:
I guess the second icon is the most up-to-date.
Solution
PlanIcon
to use the new icons for each planPlanIcon
PlanIcon
PlanIcon
toProductIcon
so that it's more genericAdditional context
This has been discovered when working on adding Jetpack Backup to the My Plan page (here's the relevant PR).
The text was updated successfully, but these errors were encountered: