mealie-recipes / mealie

Mealie is a self hosted recipe manager and meal planner with a RestAPI backend and a reactive frontend application built in Vue for a pleasant user experience for the whole family. Easily add recipes into your database by providing the url and mealie will automatically import the relevant data or add a family recipe with the UI editor
https://docs.mealie.io
GNU Affero General Public License v3.0
5.59k stars 608 forks source link

feat: Added images to PWA shortcuts #3744

Closed Choromanski closed 1 week ago

Choromanski commented 1 week ago

What type of PR is this?

What this PR does / why we need it:

It adds icons to the PWA shortcuts, currently on android the shortcuts have a white square next to them. This adds icons that match the menu bar.

Before

Which issue(s) this PR fixes:

None

Special notes for your reviewer:

I kinda guessed where to put the SVGs and what to name them as they need to be publicly addressable. I'm open to changing there location/names.

Testing

Built the docker container and was able to get the images to work, no other functionality has changed.

After

michael-genson commented 1 week ago

LGTM, though I'm a little confused why this works; @boc-the-git any idea why this seems to work and it didn't work on your initial PR? Maybe because they're svgs?

Initial PWA shortcuts PR: https://github.com/mealie-recipes/mealie/pull/3255

Choromanski commented 1 week ago

It looks like they only defined the app icons and didn't define any shortcut icons.

w3c documentation example

michael-genson commented 1 week ago

In boc's initial commit he did, he just removed them since they didn't work: https://github.com/mealie-recipes/mealie/pull/3255/commits/00f32ae5a8b151c39ae3ec7d509341c2f2953ce5

Reverted here: https://github.com/mealie-recipes/mealie/pull/3255/commits/1a158d13e1ed0bd3c1c05f9bd962eb4eb8c74430

Choromanski commented 1 week ago

It's super finicky when I tried putting the "type" field in it didn't work.

boc-the-git commented 1 week ago

LGTM, though I'm a little confused why this works; @boc-the-git any idea why this seems to work and it didn't work on your initial PR? Maybe because they're svgs?

Initial PWA shortcuts PR: https://github.com/mealie-recipes/mealie/pull/3255

No idea. Maybe I tried png only and it didn't work. Maybe something else.

This PR makes me extremely happy! Well done @Choromanski

michael-genson commented 1 week ago

??? That's so bizarre. Okay good enough for me. Thanks! The icons have been bugging me forever