-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
Add an API for specifying terminal location #45407
Comments
They both look pretty good to me. Maybe I'm leaning a bit toward the latter, especially if split direction and shell/args/env inheriting were to be implemented in the future, I think this: export interface TerminalSplitOptions {
direction: string,
inherit: boolean
};
export interface Terminal {
split(options: TerminalOptions, splitOptions?: TerminalSplitOptions): Terminal;
} Looks a little nicer than this: export interface TerminalOptions {
splitFrom?: Terminal
splitDirection?: string,
splitInherit?: boolean
} |
Has there been any movement on this? |
Bump, looks like there hasn't been anything for quite a while. Is this still being worked? Thanks! |
Bump again |
Note to self: we should probably align to how editor splitting works in the API, also if terminal tabs could be pulled into the editor area how does that affect things? |
Adding to October to discuss, it won't happen in October though. |
Discussed this in the API meeting today. Creation vs placement One big thing that has blocked this has been wanting to wait to see how the API ends up looking once positioning is more dynamic within the editor area and when terminal tabs (#10546) has arrived. I don't think we are actually blocked on this for the following reasons:
Split direction Terminals only split in a single direction, this was initially done for simplicity reasons and because the panel is typically quite narrow. We should probably stick to this philosophy when we allow terminals within tabs, for an elaborate layout it might be better to go with single terminal instances using the editor group's grid system. Complexity around default split direction within the editor and the ability to toggle the split direction could be provided by commands exposed in the command palette. Approach We discussed the following two high-level approaches. Specifying how to split via options: export interface TerminalOptions {
splitFrom?: Terminal
} Or via a method on export interface Terminal {
split(options: TerminalOptions): Terminal;
} We preferred the former, the wording needs some refinement but using "beside" to align with export interface TerminalOptions {
splitBeside?: Terminal
} This ties into a parallel discussion we're having in #63052 (comment) which would see this terminal exposed on Restoring terminal layout If an extension were to restore terminal layout exactly as it was between reloads then it could iterate over export interface Terminal {
// splitBeside as well?
adjacentTerminal: Terminal | undefined;
} This is because while |
Can we add horizontal splitting support into this as well? It would be nice to split code and terminals panes horizontally.. |
Main feedback was remove
|
Will need the test plan and then move this to Sept for finalization. We might want to wait a bit longer for this to make sure extensions pick it up but we can figure that out next month. |
Those interested in this we'd love to hear feedback on the proposal: vscode/src/vs/vscode.proposed.d.ts Lines 929 to 967 in 12e0539
It'll probably be best to wait for real feedback as this is a pretty impactful API we don't want to get wrong. |
Still waiting for feedback 🙂 @fabiospampinato? |
@Tyriar Sorry I haven't thought about this in a while. The API proposal seems good to me, the only thing I sort of don't like is that the interface is a bit different depending on where the terminal instance is located, for example I can split a particular terminal if I'm in the panel, but it seems that I can only split the current terminal/editor if I'm in the editor area. Also it might be interesting to allow to set a split direction too, in order to be able to make complex 2d layouts, but it's unclear to me if there's an actual need for that, better not to overcomplicated the API for now until the situation is clearer IMO. Overall it seems good to me 👍 |
Here are two options:
or
/cc @fabiospampinato
The text was updated successfully, but these errors were encountered: