-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move from activity bar to secondary bar hint (#24)
This PR adds a way to control the panel position. As a part of this PR we add a new position option "secondary side panel". We believe it may be useful to use secondary side panel for the IDE, but it isn't a popular feature of vscode and users are not familiar with it. On top of that, it cannot be fully controlled programatically. Specifically, there is no API to move panel from primary to secondary side panel. To workaround this issue, when user select "secondary side panel" option we ask them to move to secondary panel by hand using drag and drop. This PR also updates the logic for command palette commands and makes it so that "Open IDE" is always visible unless the panel is opened. We also do some renamings: Tabpanel -> TabPanel and Sidepanel -> SidePanel --------- Co-authored-by: Filip Andrzej Kaminski <[email protected]> Co-authored-by: Krzysztof Magiera <[email protected]>
- Loading branch information
1 parent
94e8c4e
commit 11d8b39
Showing
13 changed files
with
330 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
export type PanelLocation = "tab" | "side-panel" | "secondary-side-panel"; | ||
|
||
export type WorkspaceConfigProps = { | ||
panelLocation: PanelLocation; | ||
relativeAppLocation: string; | ||
}; | ||
|
||
export interface WorkspaceConfigEventMap { | ||
configChange: WorkspaceConfigProps; | ||
} | ||
|
||
export interface WorkspaceConfigEventListener<T> { | ||
(event: T): void; | ||
} | ||
|
||
export interface WorkspaceConfig { | ||
getConfig(): Promise<WorkspaceConfigProps>; | ||
// update method can take any of the keys from WorkspaceConfigProps and appropriate value: | ||
update<K extends keyof WorkspaceConfigProps>( | ||
key: K, | ||
value: WorkspaceConfigProps[K] | ||
): Promise<void>; | ||
addListener<K extends keyof WorkspaceConfigEventMap>( | ||
eventType: K, | ||
listener: WorkspaceConfigEventListener<WorkspaceConfigEventMap[K]> | ||
): Promise<void>; | ||
removeListener<K extends keyof WorkspaceConfigEventMap>( | ||
eventType: K, | ||
listener: WorkspaceConfigEventListener<WorkspaceConfigEventMap[K]> | ||
): Promise<void>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.