mailpile / gui-o-matic

A minimal, cross-platform tool for creating simple GUIs
GNU Lesser General Public License v3.0
22 stars 7 forks source link

Syntax needed to specify that show_url should try to reuse a tab. #9

Closed ghost closed 6 years ago

ghost commented 6 years ago

From the now-current version of PROTOCOL.md:

FIXME: In a new tab? Or reuse a tab we already opened? Make this configurable by adding args to a dictionary?

Reusing Tabs

The current version of show_url contains a single attribute, namely the string url.

We need at least args to specify both

The latter aids in the selection of the tab to be reused.

One idea is to restrict the set of tabs, from which a tab may be selected for reuse, by a constraint on the tab's URL, in the form of a prefix.

Example

Assume a web application which is running on https://localhost/foo/ and that a show_url is issued with:

In the user's default browser, there are three open tabs:

  1. https://example.com
  2. https://localhost/foo/bar
  3. https://localhost/bar/foo
  4. https://localhost/foo

The gui-o-matic implementation may reuse either of tabs 2 and 4. (Note the lack of a leading slash in 4.)

Limitations

Taking over the user's browser, such as by reusing a tab, is intrusive. In some cases, reusing a tab might not be acceptable - such as when the tab contains user-entered data which can get lost. This is to say that for the aforementioned idea, it is useful to be able to specify paths relative to reuse_prefix which may not be reused.

ghost commented 6 years ago

This issue blocks https://github.com/peturingi/gui-o-mac-tic/issues/6

ghost commented 6 years ago

Rejected. Reuse support will not be implemented.