Open v-katherine opened 8 months ago
Expected behavior: Open the instruction in a new tab.
This bug also reproduced in Radio Games->Tele-potato->Show Instructions Tools->Analog Pin Tester->Show Instructions Tools->Servo Calibrator->Show Instructions Turtle->Spiral->Show Instruction Turtle->Scanner->Show Instruction Blocks to JavaScript->Hello JavaScript->Show Instruction Blocks to JavaScript->Starter Blocks->Show Instruction Blocks to JavaScript->Writing Code->Show Instruction Blocks to JavaScript->Complex Conditionals->Show Instruction Blocks to JavaScript->Conditional Loops->Show Instruction Blocks to JavaScript->Command Responder->Show Instruction Blocks to JavaScript->Writing Functions->Show Instruction
@abchatra, @v-katherine - So, this is really a question of whether an activity page is opened as a sidedoc in the editor or as a doc page in a separate window. This is determined by the cardType
field in the gallery entry (side
or link
, the default). In both cases though, the Show Instructions label is on the launch button (default case)...
function codeCardButtonLabel(cardType: string, youTubeId?: string, youTubePlaylistId?: string) {
if (cardType == "tutorial")
return lf("Start Tutorial");
else if (cardType == "codeExample" || cardType == "example")
return lf("Open Example");
else if (cardType == "forumUrl")
return lf("Open in Forum");
else if (cardType == "sharedExample")
return lf("Open in Editor");
else if (cardType == "template")
return lf("New Project");
else if (youTubeId)
return lf("Watch Video");
else if (youTubePlaylistId)
return lf("Watch Playlist");
return lf("Show Instructions");
}
This might make one think that both side
and link
type cards will open in a separate window when the former actually opens in the editor. We could add cardType == "side"
to the Open in Editor case or make a new case that sets the label to Show in Editor or something similar to that?
@ganicke makes sense. Thanks for clarifiying.
Describe the bug Open Instruction in editor Help doc which is a wrong place
Steps to reproduce the behavior 1.Navigate to https://makecode.microbit.org/beta. 2.Radio Games->Mood Radio->Show Instructions. 3.Observe it.
Actual behavior: Open instruction in editor Help doc section.
Expected behavior: Open instruction in a new tab.
Screen Recording:
Additional context: 1.OS: Windows 11 2.makecode.microbit,org version: 7.0.4 3.Microsoft MakeCode version: 10.0.11