File tree 2 files changed +13
-2
lines changed
2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -1802,6 +1802,13 @@ export class ProjectView
1802
1802
this . shouldTryDecompile = true ;
1803
1803
}
1804
1804
1805
+ // Onboard accessible blocks if accessible blocks has just been enabled
1806
+ const onboardAccessibleBlocks = pxt . storage . getLocal ( "onboardAccessibleBlocks" ) === "1"
1807
+ const sideDocsLoadUrl = onboardAccessibleBlocks ? `${ container . builtInPrefix } keyboardNav` : ""
1808
+ if ( onboardAccessibleBlocks ) {
1809
+ pxt . storage . setLocal ( "onboardAccessibleBlocks" , "0" )
1810
+ }
1811
+
1805
1812
this . setState ( {
1806
1813
home : false ,
1807
1814
showFiles : h . githubId ? true : false ,
@@ -1810,7 +1817,7 @@ export class ProjectView
1810
1817
header : h ,
1811
1818
projectName : h . name ,
1812
1819
currFile : file ,
1813
- sideDocsLoadUrl : '' ,
1820
+ sideDocsLoadUrl : sideDocsLoadUrl ,
1814
1821
debugging : false ,
1815
1822
isMultiplayerGame : false
1816
1823
} ) ;
@@ -5179,6 +5186,10 @@ export class ProjectView
5179
5186
}
5180
5187
5181
5188
async toggleAccessibleBlocks ( ) {
5189
+ const nextEnabled = ! this . getData < boolean > ( auth . ACCESSIBLE_BLOCKS ) ;
5190
+ if ( nextEnabled ) {
5191
+ pxt . storage . setLocal ( "onboardAccessibleBlocks" , "1" )
5192
+ }
5182
5193
await core . toggleAccessibleBlocks ( )
5183
5194
this . reloadEditor ( ) ;
5184
5195
}
Original file line number Diff line number Diff line change @@ -590,7 +590,7 @@ export interface SideDocsState {
590
590
sideDocsCollapsed ?: boolean ;
591
591
}
592
592
593
- const builtInPrefix = "/builtin/" ;
593
+ export const builtInPrefix = "/builtin/" ;
594
594
595
595
export class SideDocs extends data . Component < SideDocsProps , SideDocsState > {
596
596
private openingSideDoc = false ;
You can’t perform that action at this time.
0 commit comments