filips123 / PWAsForFirefox

A tool to install, manage and use Progressive Web Apps (PWAs) in Mozilla Firefox
https://pwasforfirefox.filips.si
Mozilla Public License 2.0
2.25k stars 51 forks source link

Add option to browse icons in hard drive #279

Open Aleksandra0056 opened 1 year ago

Aleksandra0056 commented 1 year ago

Problem Description

If you want to add icon for PWA, then there is only option to add icon from URL.

Proposed Solution

Add option to add icon for PWA from hard drive (or simply browse icons).

Additional Information

(Nothing)

filips123 commented 1 year ago

The main problem that prevents this from being easily implemented is that extension popups cannot handle file upload dialogs. (Additionally, it would add some complexity to the system integration code.)

However, I don't know how useful this actually is. Even if you want to set a custom icon, you would almost always download it from somewhere, so you could just add it from the URL, right?

ThijmenDam commented 1 year ago

I don't really have a strong opinion on the issue at hand, but I do have a quick tip for macOS users that would like to use a local icon. Select the PWA .app file, use command + i and drag your local icon to the icon in the top-left of the info panel.

spoorun commented 1 year ago

I often have to create, alter, or improve an icon for my PWA apps. (Using a 4K screen and often the images available online aren't quite suitable for to sizing, lack of transparencyz format etc. So I end up linking to the icons directly via editing the desktop file, so the URL option is not much use you me, and a file picker would be very handy.

However, editing the desktop file is not such an issue I guess, and those people who don't know how to edit desktop file are less likely to be editing icon images.

filips123 commented 1 year ago

I'll keep this issue open, but considering that you can already manually edit icons, it won't be a priority. I might implement it in the future, or if Firefox allows file pickers inside extension popups.

mstromboli commented 1 year ago

On the subject of icons, I like the suggestion of being able to supply an icon from a local drive. However, I have a different question/issue about icons. Even when I supply an icon link through the 'Icon URL' option of the PWA extension, that icon does not appear on the Taskbar of the PWA itself. And I do not know where the icon that actually is displaying is coming from. I'm referring to WhatsApp. The icon on the Taskbar item has an annoying black background and is of low quality in general. What can I do to correct this on my computer. I am using Windows 10. Thanks so much.

filips123 commented 1 year ago

Default WhatsApp icon looks fine to me (white circle and normal resolution), and it seems WhatsApp now provides a web app manifest which links that icon. I think they've only started doing this recently, so maybe you've installed it before this was the case. You can try to reinstall WhatsApp PWA to apply the new manifest.

About why your custom icon is not displayed: I think this might be because I forgot to load it in the system integration, so it loads the default icon instead. I'll try to fix this in the next release.

Another possibility is that Windows caches the old icon of a window. You can also try to restart your computer in case this cleans the cache.

mstromboli commented 1 year ago

I've restarted and even had my computer off for several days and the same result is that a grainy icon with black background is displayed in the toolbar, as seen in this image image

When I set up WhatsApp, I specified an icon that was clearly not the one that is displayed image

And even when I specify an icon that has no color at all in it, such as this one, I still get the colored one with the black background.
image

Thanks so much for the help so far

filips123 commented 1 year ago

I've made some changes in 2.5.0 that may fix your issue.

mstromboli commented 1 year ago

Was this update going fix the problem with the taskbar icon or did 2.5.0 improve a different issue?

Windows taskbar still has the ugly black background around the WhatsApp logo image

Icon for PWA titlebar displays the one I specified through the PWA for Firefox extension though. This always worked for me anyway image

I did not see where specifying an icon from a person's hard drive is working.

I have also rebooted as well.

filips123 commented 1 year ago

It was supposed to fix your issue where custom icons from URLs didn't work. I don't know why it still doesn't work for you, as it works fine for me on Windows 10...

mstromboli commented 1 year ago

It is so strange indeed. I am using Windows 10 as well. The custom icon URL does work for the application titlebar (green-colored image in previous message) at the top of the window.
But, for the Windows taskbar item (dark blue-colored image in previous message), at the bottom of screen by the 'Start' button, it is still the ugly black-background icon. That particular icon must not be connected to the icon that appears in the titlebar at the top of the window. Other than this one annoyance, I love the PWAsForFirefox extension!

mstromboli commented 1 year ago

Success! I was finally prompted to install version 2.5.0 and it resolved the problem. I no longer have the nasty old WhatsApp icon in my taskbar, which you can see below.
image

Thanks so much!