-
Notifications
You must be signed in to change notification settings - Fork 100
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
Facilitate indicating the site icon as being maskable #304
Comments
I saw this same issue this weekend using chrome canary, if there is no customisation on the panel should it include it maskable by default? |
I don't think it should be maskable by default because then it could crop the icon undesirably. |
You are right, the checkbox is the best option. |
There should probably be an explanation of what it means to be maskable. I could see regular users having very confused looks on their face while viewing this option.
|
//A site owner can fix this problem by just adding the purpose property to all of the icons:// Sorry, I am not a developer. Where exactly does that go? Somewhere inside pwa_manifest.json? |
It can go in your theme's |
Thank you. This did it for me. A tip for others - always flush the cache. :) |
Update: Per below in #304 (comment) I think we should skip any FSE-specific integration for now given the Customizer is still linked to for setting the Site Icon. |
This is something else that comes up over and over again, so we need a UI to indicate the icon is maskable. If not using a block-based theme, the Site Icon control in the Customizer is where the UI should live per my screenshot above. Otherwise, if using a block-based theme when the Customizer is not available, I'm not entirely clear where the UI should be located. I suppose it would be an extension to the Site Logo block? |
@westonruter I have taken this up. Related to the scenario of issue I and @ankitrox discussed the possibilities to make this fully compatible in FSE. Here are some key points from the discussion: Customizer
FSE
|
It would be a nice touch if clicking this checkbox would apply a mask to the icon so the user can see what effect it has. This would in part limit the need for having a link to explain what maskable icons are.
I'm not too familiar with how FSE site icon is managed. The non-FSE Custom Logo is stored as a In looking further, I saw the WP Tavern article about this and:
So the ability to set the maskable flag would still be available for FSE themes, if they click that “Site Icon settings” link. To me it seems like there should be a non-Customizer way to set the Site Icon when using FSE. All this to say: I think it's probably good to just skip the FSE integration for now, given that the user can (and probably should) use the Customizer for this. Presumably the UI for managing the Site Icon will evolve in the FSE Site Editor, so probably best to not spend too much time on it right now. |
Currently when we upload icon, it is already rounded corner giving the impression that it is masked. If we apply above-mentioned strategy, we may need to make the icon square shaped by default. When checkbox for maskable icon is checked, we can add border-radius to icon. Does this sound fine @westonruter ? |
The rounded corners are good, but they're not round enough. It should instead apply the “minimum safe zone” as described at https://web.dev/maskable-icon/#are-my-current-icons-ready |
@westonruter Showing icon in non-maskable-icon.mp4maskable-icon.mp4 |
Yes, that looks good! |
Following are some observations related to Site Icon being Maskable.
Customize_.Quality.Assurance.PWA.Site.Just.another.WordPress.site.mp4
cc: @westonruter |
Very interesting. I hadn't seen this warning before. I see it also reported here:
In the latter case, the fix was just to duplicate the icon and give one But this presumes that the chosen icon actually is suitable for masking and non-masking. If we want to be extra sure for the user, we could duplicate the preview image to appear alongside the checkbox and only show it and give it a masking when the checkbox is selected, leaving the original preview as-is without any masking. But that may be excessive. In general I'd think that if an icon is maskable then it should be presumed to work without masking as well.
Yes, it makes sense that the field should be hidden when no icon is selected. Good catch. |
QA Passed ✅ Reference: #770 (comment) |
As reported on the support forum, when doing a Lighthouse PWA audit, the web app manifest generated by the plugin currently gets a warning:
Read more about this on web.dev: Manifest doesn't have a maskable icon.
A site owner can fix this problem by just adding the
purpose
property to all of the icons:The plugin could also automatically add this
maskable
property. But these both assume that the icon is actually maskable. Is this good to assume? What if we added a new checkbox after where the Site Icon is supplied in the Customizer to let the user indicate it is maskable:Related: #246
The text was updated successfully, but these errors were encountered: