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.26k stars 52 forks source link

Web apps should remember previous window positions and restore sessions properly #256

Open filips123 opened 1 year ago

filips123 commented 1 year ago

Problem Description

When multiple web apps are installed in the same profile, individual web apps will not remember their previous window positions and sizes. This makes it hard to automatically open a web app with s specific window position and size. Additionally, in some cases (#238), web apps never remember window positions, although this seems to be a Firefox bug and not specific to PWAsForFirefox.

Similarly, the session restore feature and pinned tabs (when the tabs mode is enabled) are also shared between all web apps in a profile.

Proposed Solution

Each web app (even if multiple are in the same profile) should store its window position and size, pinned tabs, and session history.

Additional Information

This may be hard to implement because these features are quite complex and hard to modify by UserChrome scripts. I opened this issue so it can be tracked in the future if needed.

There is a workaround on Linux to set the initial position for web app windows: #153

mstromboli commented 1 year ago

I have two apps through PWAsforFirefox, which I love. What I didn't like was that they both opened in various places and sizes on my screen. I discovered a helpful add-on that I have used with great success. I have specified the size and location where my FirefoxPWA will open. Perhaps it might help others as well. It is found named 'Change New Maximized Window to Resizable' and is found at https://addons.mozilla.org/en-US/firefox/addon/change-maximized-to-resizable/

Casuallynoted commented 6 months ago

I've been having an issue where when I open a PWA it fills the entire screen, even going behind my plasma panels- this means I have to use tricks to make the top bar visible and resize it to something reasonable. I believe this might be the same issue.

filips123 commented 6 months ago

I don't think this is related. This issue is about the problem that PWAs don't remember positions from the last time that specific PWA was opened, but instead from the last time any PWA was opened in the same profile (which is normal Firefox behavior). Another issue (#238) is that sometimes PWAs do not remember positions at all, but that seems to be Firefox issue and not related to PWAsForFirefox.

Can you please check if you can also reproduce your issue with normal Firefox, downloaded from here?