Skip to content
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

Site launch multiple tabs #391

Closed
Unkn0wn-MDCLXIV opened this issue Sep 3, 2023 · 5 comments
Closed

Site launch multiple tabs #391

Unkn0wn-MDCLXIV opened this issue Sep 3, 2023 · 5 comments
Labels
enhancement New feature or request
Milestone

Comments

@Unkn0wn-MDCLXIV
Copy link

Extend the site launch command to accept multiple webapps and start each of them in a seperate tab.
This way you can create a shortcut to launch mutliple PWAs in a single windows without dragging them together,

@Unkn0wn-MDCLXIV Unkn0wn-MDCLXIV added the enhancement New feature or request label Sep 3, 2023
@filips123
Copy link
Owner

Couldn't you just create a simple script that runs firefoxpwa site launch for each web app?

@Unkn0wn-MDCLXIV
Copy link
Author

That will launch them in two different windows instead.

@filips123
Copy link
Owner

You want to launch multiple URLs, but they should all be merged inside a single PWA window? So, something like:

firefoxpwa site launch SITE-ID --url https://github.com/filips123/PWAsForFirefox/issues/391 --url https://github.com/ --url https://github.com/filips123/PWAsForFirefox

(note: this doesn't actually work)

@filips123
Copy link
Owner

Also, a few more questions.

What to do when the tabs mode is disabled but you try to launch multiple URLs? Opening them as tabs won't work because tabs are hidden. Should it then open each URL in a separate web app window?

What to do when the launch type is set to specific values and a window of the same web app is already opened?

  • When the launch type is set to 0 (open in a new window, default), there shouldn't be any problem. It could just open a new window with all of the provided URLs as tabs.
  • When it is set to 1 (open in a new tab), there also shouldn't be any problem. In that case, it could just use an existing window of that web app and open URLs as new tabs.
  • The problem is when the launch type is set to 2 (replace the existing tab).
    • Should it replace the existing tab with the first provided URL and load all others as new tabs? This has the advantage that opening multiple URLs will still work, but it also means that the behaviour won't actually match what preference described, which might be confusing.
    • Should it replace the same existing tab with each URL, effectively loading only the last (or first) URL? This is what would match the name of the preference ("replace the existing tab") the most, but might still be confusing and will prevent loading multiple URLs if this option is enabled.
    • And what to do if there are already multiple tabs opened and you try to open multiple new URLs? Should it replace all of the existing tabs with requested URLs, and open the remaining URLs (if any) in new tabs?
  • When the launch type is set to 3 (focus existing window), no URLs should open. This matches the current behaviour.

@filips123 filips123 added question Further information is requested and removed question Further information is requested labels Sep 17, 2023
@filips123
Copy link
Owner

After some consideration, I think that opening multiple URLs when the tabs mode is disabled or the launch type is set to replace the tab will be unsupported behaviour, at least in the initial version. There won't be anything preventing you from trying, but it might not work completely as expected. This will make the code much simpler than other options.

@filips123 filips123 modified the milestones: 3.0.0, 2.8.0 Sep 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

No branches or pull requests

2 participants