typeintandem / tandem

Typing in Tandem. Decentralized, cross-editor, collaborative text-editing!
Apache License 2.0
698 stars 20 forks source link

Allow Spawning/Stopping of Tandem from Command Palette and Menu Bar #80

Closed rageandqq closed 6 years ago

rageandqq commented 6 years ago

Added the following options to both the command palette (the main workflow in sublime, cmd+shift+p) and as a menu bar at the top of the screen:

We can decide on a consistent naming (e.g. Session instead of host) later, I just wanted to have a non console way of setting up Tandem, since most Sublime plugins can and do take advantage of the GUI available.

How the menu bar looks:

screen shot 2018-02-01 at 4 58 56 pm

How the command palette looks:

screen shot 2018-02-01 at 4 59 04 pm

Start as Host and Stop connection work as expected with no user input - outputs are sent through message dialogs.

Connecting to a host looks like this:

screen shot 2018-02-01 at 4 59 17 pm

And the string argument is parsed, e.g. localhost 12345 becomes host: localhost, ip: 12345

This still allows the commands to be used and invoked from the console - and in this case, we won't have GUI outputs but rather print messages to the console, hence the use of the show_gui flags to allow for the two different flows.

rageandqq commented 6 years ago

Link: https://github.com/geoffxy/tandem/issues/81

rageandqq commented 6 years ago

Fine with the proposed copy, except maybe the first one should be "Create session" to keep the keyword of session consistent.

Regarding Disabling - I'm sure there's a way. Will look into it.

rageandqq commented 6 years ago

Also it's worth noting that some people may not want the Tandem options in the menu bar. If every plugin they have does something like this, it could get quite messy. I will also look into a way of setting this via a setting. Not sure if it will be dynamically possible though (based on a preference value), since the files are statically there and loaded on editor load. But we can see.

geoffxy commented 6 years ago

Sounds good 👍 Yeah, I wasn't sure what we should call a "tandem session". I think with teletype they're referred to as portals.