Skip to content
This repository has been archived by the owner on Dec 23, 2021. It is now read-only.

Creating preview mode #219

Merged
merged 5 commits into from
Feb 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions locales/en/out/constants.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"info.deploySimulator": "\n[INFO] Deploying code to the simulator...\n",
"info.deploySuccess": "\n[INFO] Code successfully deployed\n",
"info.extensionActivated": "Congratulations, your extension Adafruit_Simulator is now active!",
"info.firstTimeWebview": "To reopen the simulator click on the \"Open Simulator\" button on the upper right corner of the text editor, or select the command \"Open Simulator\" from command palette.",
"info.firstTimeWebview": "To reopen the simulator select the command \"Open Simulator\" from command palette.",
"info.installPythonDependencies": "Do you want us to try and install this extensions dependencies for you?",
"error.invalidFileExtensionDebug": "The file you tried to run isn\\'t a Python file.",
"info.newFile": "New to Python or the Circuit Playground Express? We are here to help!",
Expand All @@ -36,7 +36,7 @@
"info.privacyStatement": "Privacy Statement",
"info.successfulInstall": "Successfully installed Python dependencies.",
"info.thirdPartyWebsite": "By clicking \"Agree and Proceed\" you will be redirected to adafruit.com, a third party website not managed by Microsoft. Please note that your activity on adafruit.com is subject to Adafruit's privacy policy",
"info.welcomeOutputTab": "Welcome to the Adafruit Simulator output tab!\n\n",
"info.welcomeOutputTab": "Welcome to the Device Simulator Express output tab!\n\n",
"label.webviewPanel": "Device Simulator Express",
"name": "Device Simulator Express",

Expand Down
3 changes: 2 additions & 1 deletion locales/en/package.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@
"deviceSimulatorExpressExtension.commands.microbit.openSimulator": "[micro:bit] Open Simulator",
"deviceSimulatorExpressExtension.commands.microbit.newFile": "[micro:bit] New File",
"deviceSimulatorExpressExtension.configuration.title": "Device Simulator Express configuration",
"deviceSimulatorExpressExtension.configuration.properties.debuggerPort": "The port the Server will listen on for communication with the debugger."
"deviceSimulatorExpressExtension.configuration.properties.debuggerPort": "The port the Server will listen on for communication with the debugger.",
"deviceSimulatorExpressExtension.configuration.properties.previewMode": "Enable this to test out and play with the new micro:bit simulator!"
}
22 changes: 22 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,22 @@
"category": "%deviceSimulatorExpressExtension.commands.common.label%"
}
],
"menus": {
"commandPalette": [
{
"command": "deviceSimulatorExpress.microbit.openSimulator",
"title": "%deviceSimulatorExpressExtension.commands.microbit.openSimulator%",
"category": "%deviceSimulatorExpressExtension.commands.common.label%",
"when": "config.deviceSimulatorExpress.previewMode"
},
{
"command": "deviceSimulatorExpress.microbit.newFile",
"title": "%deviceSimulatorExpressExtension.commands.microbit.newFile%",
"category": "%deviceSimulatorExpressExtension.commands.common.label%",
"when": "config.deviceSimulatorExpress.previewMode"
}
]
},
"colors": [
{
"id": "highContrastButtonBorderOverride.color",
Expand Down Expand Up @@ -143,6 +159,12 @@
"default": 5577,
"description": "%deviceSimulatorExpressExtension.configuration.properties.debuggerPort%",
"scope": "resource"
},
"deviceSimulatorExpress.previewMode": {
"type": "boolean",
"default": false,
"description": "%deviceSimulatorExpressExtension.configuration.properties.previewMode%",
"scope": "resource"
}
}
},
Expand Down
3 changes: 2 additions & 1 deletion package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@
"deviceSimulatorExpressExtension.commands.microbit.openSimulator": "[micro:bit] Open Simulator",
"deviceSimulatorExpressExtension.commands.microbit.newFile": "[micro:bit] New File",
"deviceSimulatorExpressExtension.configuration.title": "Device Simulator Express configuration",
"deviceSimulatorExpressExtension.configuration.properties.debuggerPort": "The port the Server will listen on for communication with the debugger."
"deviceSimulatorExpressExtension.configuration.properties.debuggerPort": "The port the Server will listen on for communication with the debugger.",
"deviceSimulatorExpressExtension.configuration.properties.previewMode": "Enable this to test out and play with the new micro:bit simulator!"
}
5 changes: 3 additions & 2 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const localize: nls.LocalizeFunc = nls.config({
})();

export const CONFIG = {
ENABLE_PREVIEW_MODE: "deviceSimulatorExpress.previewMode",
SHOW_DEPENDENCY_INSTALL: "deviceSimulatorExpress.showDependencyInstall",
SHOW_NEW_FILE_POPUP: "deviceSimulatorExpress.showNewFilePopup",
};
Expand Down Expand Up @@ -155,7 +156,7 @@ export const CONSTANTS = {
},
FIRST_TIME_WEBVIEW: localize(
"info.firstTimeWebview",
'To reopen the simulator click on the "Open Simulator" button on the upper right corner of the text editor, or select the command "Open Simulator" from command palette.'
'To reopen the simulator select the command "Open Simulator" from command palette.'
),
INCORRECT_FILE_NAME_FOR_SIMULATOR_POPUP: localize(
"info.incorrectFileNameForSimulatorPopup",
Expand Down Expand Up @@ -205,7 +206,7 @@ export const CONSTANTS = {
),
WELCOME_OUTPUT_TAB: localize(
"info.welcomeOutputTab",
"Welcome to the Adafruit Simulator output tab!\n\n"
"Welcome to the Device Simulator Express output tab!\n\n"
),
},
LABEL: {
Expand Down