-
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
Short Name empty #200
Comments
Yeah, I think we should just eliminate trying to automatically derive a |
Is there really a limit of 12 chars? I use the filter too and think its better to eliminate the regex. |
There is no hard limit on 12 characters, as far as I know. The limit is just to be short enough to fit with an icon. Ref. https://developer.mozilla.org/en-US/docs/Web/Manifest/short_name |
Actually, Chrome recommends a 12 character limit for short_name: https://developer.chrome.com/apps/manifest/name#short_name But it isn't reliable to compute this automatically, so let's get rid of it. It should only be supplied by a site explicitly. |
I've opened a PR to remove it: #201 |
I have a problem with the Regex used here to shorten the page name: https://github.com/xwp/pwa-wp/blob/8fbaf8b928f60aaf7477e2fdae7e19baae55f0cf/wp-includes/class-wp-web-app-manifest.php#L139
My domain name is exacly 12 characters long, following by a dot TLD: "Travel-Dealz.de". "Travel-Dealz" would be a beautiful shortname but because the Regex
/^.{0,12}(?= |$)/
only looks for spaces, my short_name is completly emtpy: https://regexr.com/4i7mtMy proposal is to look for spaces and dots:
/^.{0,12}(?=[ .]|$)/
see here https://regexr.com/4i7mqThe text was updated successfully, but these errors were encountered: