@@ -645,7 +645,12 @@ export class GettingStartedPage extends EditorPane {
645
645
646
646
this . stepDisposables . add ( this . webview . onDidClickLink ( link => {
647
647
if ( matchesScheme ( link , Schemas . https ) || matchesScheme ( link , Schemas . http ) || ( matchesScheme ( link , Schemas . command ) ) ) {
648
- this . openerService . open ( link , { allowCommands : true } ) ;
648
+ const toSide = link . startsWith ( 'command:toSide:' ) ;
649
+ if ( toSide ) {
650
+ link = link . replace ( 'command:toSide:' , 'command:' ) ;
651
+ this . focusSideEditorGroup ( ) ;
652
+ }
653
+ this . openerService . open ( link , { allowCommands : true , openToSide : toSide } ) ;
649
654
}
650
655
} ) ) ;
651
656
@@ -1164,6 +1169,25 @@ export class GettingStartedPage extends EditorPane {
1164
1169
return widget ;
1165
1170
}
1166
1171
1172
+ private focusSideEditorGroup ( ) {
1173
+ const fullSize = this . group ? this . groupsService . getPart ( this . group ) . contentDimension : undefined ;
1174
+ if ( ! fullSize || fullSize . width <= 700 ) { return ; }
1175
+ if ( this . groupsService . count === 1 ) {
1176
+ const sideGroup = this . groupsService . addGroup ( this . groupsService . groups [ 0 ] , GroupDirection . RIGHT ) ;
1177
+ this . groupsService . activateGroup ( sideGroup ) ;
1178
+
1179
+ const gettingStartedSize = Math . floor ( fullSize . width / 2 ) ;
1180
+
1181
+ const gettingStartedGroup = this . groupsService . getGroups ( GroupsOrder . MOST_RECENTLY_ACTIVE ) . find ( group => ( group . activeEditor instanceof GettingStartedInput ) ) ;
1182
+ this . groupsService . setSize ( assertIsDefined ( gettingStartedGroup ) , { width : gettingStartedSize , height : fullSize . height } ) ;
1183
+ }
1184
+
1185
+ const nonGettingStartedGroup = this . groupsService . getGroups ( GroupsOrder . MOST_RECENTLY_ACTIVE ) . find ( group => ! ( group . activeEditor instanceof GettingStartedInput ) ) ;
1186
+ if ( nonGettingStartedGroup ) {
1187
+ this . groupsService . activateGroup ( nonGettingStartedGroup ) ;
1188
+ nonGettingStartedGroup . focus ( ) ;
1189
+ }
1190
+ }
1167
1191
private runStepCommand ( href : string ) {
1168
1192
1169
1193
const isCommand = href . startsWith ( 'command:' ) ;
@@ -1172,24 +1196,8 @@ export class GettingStartedPage extends EditorPane {
1172
1196
1173
1197
this . telemetryService . publicLog2 < GettingStartedActionEvent , GettingStartedActionClassification > ( 'gettingStarted.ActionExecuted' , { command : 'runStepAction' , argument : href , walkthroughId : this . currentWalkthrough ?. id } ) ;
1174
1198
1175
- const fullSize = this . group ? this . groupsService . getPart ( this . group ) . contentDimension : undefined ;
1176
-
1177
- if ( toSide && fullSize && fullSize . width > 700 ) {
1178
- if ( this . groupsService . count === 1 ) {
1179
- const sideGroup = this . groupsService . addGroup ( this . groupsService . groups [ 0 ] , GroupDirection . RIGHT ) ;
1180
- this . groupsService . activateGroup ( sideGroup ) ;
1181
-
1182
- const gettingStartedSize = Math . floor ( fullSize . width / 2 ) ;
1183
-
1184
- const gettingStartedGroup = this . groupsService . getGroups ( GroupsOrder . MOST_RECENTLY_ACTIVE ) . find ( group => ( group . activeEditor instanceof GettingStartedInput ) ) ;
1185
- this . groupsService . setSize ( assertIsDefined ( gettingStartedGroup ) , { width : gettingStartedSize , height : fullSize . height } ) ;
1186
- }
1187
-
1188
- const nonGettingStartedGroup = this . groupsService . getGroups ( GroupsOrder . MOST_RECENTLY_ACTIVE ) . find ( group => ! ( group . activeEditor instanceof GettingStartedInput ) ) ;
1189
- if ( nonGettingStartedGroup ) {
1190
- this . groupsService . activateGroup ( nonGettingStartedGroup ) ;
1191
- nonGettingStartedGroup . focus ( ) ;
1192
- }
1199
+ if ( toSide ) {
1200
+ this . focusSideEditorGroup ( ) ;
1193
1201
}
1194
1202
if ( isCommand ) {
1195
1203
const commandURI = URI . parse ( command ) ;
0 commit comments