-
-
Notifications
You must be signed in to change notification settings - Fork 763
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
feat: PWA Additions #3896
feat: PWA Additions #3896
Conversation
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.
Hey thanks for the work on this 😊
Before we can get to reviewing this.
Your Indentation setting is set to a different value than two spaces. Please use this for all code regarding mealie.
See the changes in frontend/nuxt.config.js
as example
I resolved the spacing issue, sorry about that. |
Thanks for the quick fix. One thing. If you are already in there, would you be able to update the mealie icons to no longer include the white background? That would make it more consistent with the rest of the icons. |
I just went ahead and added some screenshots I made to resolve 2 of the warnings in the dev console: This also lets us use the Richer Install UI: |
Do we have the original vector image anywhere? I tried working on the PNG for an hour and couldn't make it look good with my below average photo editing skills. |
oh i thought there was an svg version of that in the frontend, but apparently i was wrong and there is just the white background version. I have posted the svg code bellow, feel free to come back to me if you need anything more.
|
Just pushed them, let me know what you think. The icons on the previous photos seemed to have been a little off center - I believe I fixed this as well. |
Thanks for the information. 👍 This might be a me issue then. I did try installing via a different port with the same result. |
I tried again today with two different machines, with different browsers and launching nuxt on different ports with the same results. Now i am out of computers and none the wiser why it would show up for you and not for me 🧐 |
Do you have any errors in Chrome Dev Tools under Application > Manifest? PWAs require HTTPS but I've noticed HTTP works if you use localhost. Is it possible you are not using localhost and missing HTTPS? |
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.
Ok, i figured it out and it was pretty much me being uninformed. I actually did not install as PWA but as an chrome app or however those things are called.
Long story short. Everything shows up correctly including the shortcuts.
Thanks for your work on this and helping me with the review! 🚀
Glad I could help! |
name: "Mealie", | ||
short_name: "Mealie", | ||
id: "mealie", |
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.
FWIW this defaults to the PWA's host at time of installation. Using a fixed value in the manifest will prevent users from installing potentially multiple different Mealie instances. Not that this is a common use case but worth mentioning nontheless.
https://developer.chrome.com/docs/capabilities/pwa-manifest-id
You have to update the THEME variables: https://docs.mealie.io/documentation/getting-started/installation/backend-config/ |
What type of PR is this?
What this PR does / why we need it:
This PR adds PWA Manifest members to make the application more useable across different platforms.
Special notes for your reviewer:
Open to and encourage feedback on all manifest members updated - I've documented the changes I've made and provided reference links.
I would also like to implement the Richer Install UI but I'm going to need screenshots from both desktop and mobile if you could point me to any screenshots you have that would be great.
Note: All mobile screenshots need to be the same dimensions and all desktop screenshots need to be the name dimensions
Testing
Built docker image and was able to test functionality of all new members with the exception of
display_override
See change screen shots below.
Changes
Shortcut Icons:
Resized them and was required to have one that was 96x96 to resolve icon warnings in Chrome Dev Tools
Before:
Now:
Changed icons to PNG so that the icons show up on desktop - I also changed them to #E58325 for contrast
Before:
After:
scope:
"/"
Sets the scope of the application
dir:
"auto"
Sets the text direction - Set to auto to allow support of both right to left and left to right
Note: Since the lang is set to "en" this could probably be set to "ltr" but I can't verify that.
id:
"mealie"
Unique identifier for the PWA
display_override;
["standalone","minimal-ui","browser","window-controls-overlay"]
Sets display priority
prefer_related_applications:
false
If applications in the related_applications section should be preferred over PWA.
Currently no official non-web applications exist but if one is developed in the future is should be listed in
related_applications
and this should be set totrue
handle_links:
"preferred"
:In-scope links should be opened within the installed PWA
orientation:
"any"
Default orientation of the application
categories:
["food"]
Categories the application belongs to
launch_handler:
{"client_mode": ["focus-existing", "auto"]}
How the application is launched
edge_side_panel:
{"preferred_width": 400}
The preferred width when launching the PWA in an Edge side panel