glorious-demo icon indicating copy to clipboard operation
glorious-demo copied to clipboard

Allow Multiple Terminals

Open nahtnam opened this issue 7 years ago • 10 comments

I am trying to create a demo where I start a server and then curl the API. It would be nice if I could open a new terminal session (it would look pretty cool if it shows up as a tab at the top) and switch back and forth while adding responses to each one independently

nahtnam avatar Nov 06 '18 03:11 nahtnam

@rafaelcamargo Hi again. What's your idea to handle tab?

mostafaebrahimi avatar Nov 13 '18 10:11 mostafaebrahimi

@rafaelcamargo I think you must add a tab component that need to handled by application. Because of backward compatibility you need to have default write() command() response() but you can
consider that every things happened in a tab.
So by calling write() or command() response() considered that client want to write to default tab and here you can add new function in application that call openTab(name) or openTab(id) that creates new tab and writing was happened in that tab.(you can handle switch tab by openTab(name) like openApplication()

mostafaebrahimi avatar Nov 13 '18 11:11 mostafaebrahimi

I agree with @mostafaebrahimi. I think that API would be most consistent and convenient

nahtnam avatar Nov 13 '18 18:11 nahtnam

@mostafaebrahimi The way is fine. Tab must certainly be a new component to be orchestrated by an application.

Regarding the API, I think tab could be a new option for the method openApp:

gdemo.openApp('editor', { tab: 'tabName' }).end();

If no tab is specified, the default one is used.

However, how would you handle window title in the application? After creating the tab component, I could have more than just one open file in the editor for example. 🤔

What's your thoughts?

rafaelcamargo avatar Nov 13 '18 20:11 rafaelcamargo

@rafaelcamargo I have an opinion about editor but not about terminal yet.We can impact editor like usual editors.if we have tabs so we add tabs row to desktop and we implement every tabs like that we have single editor-application in that tab. What's your idea?

mostafaebrahimi avatar Nov 13 '18 20:11 mostafaebrahimi

@rafaelcamargo I think some changes we need here:

  1. create new method openTab that creates new tab(editor-applicaiton) or find application and open it
  2. create new Animation for handle tabs(like animtaion in openApplication that scale - here switch -)

mostafaebrahimi avatar Nov 13 '18 21:11 mostafaebrahimi

@rafaelcamargo What's your thought?

mostafaebrahimi avatar Nov 15 '18 08:11 mostafaebrahimi

@mostafaebrahimi So, I am still figuring out how to solve that, but the approach discussed above seems to be really fair. Since this feature is a little complex, I'll focus on getting that done on this weekend and will resume my thoughts on this issue on the next week 👍

rafaelcamargo avatar Nov 15 '18 16:11 rafaelcamargo

I am interested in this feature too! It would be great to have tabs in the editor for different files. Has progress been made on this?

quinton-ashley avatar Jul 10 '19 00:07 quinton-ashley

Hi @quinton-ashley!

No, this feature is not in development yet. Since I'll be working the next weeks on another glorious project to release it, I'd be very happy If you consider you're be able to offer this contribution ✌️

rafaelcamargo avatar Jul 10 '19 13:07 rafaelcamargo