{"action":"opened","issue":{"url":"https://api.github.com/repos/mailpile/gui-o-matic/issues/9","repository_url":"https://api.github.com/repos/mailpile/gui-o-matic","labels_url":"https://api.github.com/repos/mailpile/gui-o-matic/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/mailpile/gui-o-matic/issues/9/comments","events_url":"https://api.github.com/repos/mailpile/gui-o-matic/issues/9/events","html_url":"https://github.com/mailpile/gui-o-matic/issues/9","id":321124676,"number":9,"title":"Syntax needed to specify that show_url should try to reuse a tab.","user":{"login":"peturingi","id":1230353,"avatar_url":"https://avatars1.githubusercontent.com/u/1230353?v=4","gravatar_id":"","url":"https://api.github.com/users/peturingi","html_url":"https://github.com/peturingi","followers_url":"https://api.github.com/users/peturingi/followers","following_url":"https://api.github.com/users/peturingi/following{/other_user}","gists_url":"https://api.github.com/users/peturingi/gists{/gist_id}","starred_url":"https://api.github.com/users/peturingi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peturingi/subscriptions","organizations_url":"https://api.github.com/users/peturingi/orgs","repos_url":"https://api.github.com/users/peturingi/repos","events_url":"https://api.github.com/users/peturingi/events{/privacy}","received_events_url":"https://api.github.com/users/peturingi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-08T10:13:24Z","updated_at":"2018-05-08T10:13:24Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"From the now-current version of PROTOCOL.md:\r\n\r\n> FIXME: In a new tab? Or reuse a tab we already opened? Make this configurable by adding args to a dictionary?\r\n\r\n### Reusing Tabs ###\r\n\r\nThe current version of show_url contains a single attribute, namely the string `url`.\r\n\r\nWe need at least args to specify both\r\n\r\n- that a tab **may** be reused when opening `url`, and\r\n- some constraints on the tab which is to be reused.\r\n\r\nThe latter aids in the selection of the tab to be reused.\r\n\r\nOne 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.\r\n\r\n####Example####\r\nAssume a web application which is running on https://localhost/foo/ and that a `show_url` is issued with:\r\n\r\n* `url=\"https://localhost/foo/bar/42\"`,\r\n* `reuse=true` and\r\n* `reuse_prefix=\"https://localhost/foo/\"`.\r\n\r\nIn the user's default browser, there are three open tabs:\r\n\r\n1. https://example.com\r\n* https://localhost/foo/bar\r\n* https://localhost/bar/foo\r\n* https://localhost/foo\r\n\r\nThe gui-o-matic implementation may reuse either of tabs 2 and 4.\r\n\r\n### Limitations ###\r\nTaking 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.\r\nThis 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."}}
{"actor":{"display_login":"peturingi"}}