From f8d51e3c11f2e04fe8de8d305cca6772619fa222 Mon Sep 17 00:00:00 2001 From: Robert Knight Date: Fri, 16 Sep 2022 09:53:59 +0100 Subject: [PATCH 1/3] Update links to python-editor-next repo --- CONTRIBUTING.md | 2 +- README.md | 2 +- src/App.css | 2 +- src/device/webusb.ts | 4 ++-- src/e2e/app.ts | 2 +- src/editor/codemirror/CodeMirrorView.tsx | 2 +- src/editor/codemirror/language-server/docstrings.ts | 2 +- src/editor/codemirror/language-server/view.ts | 2 +- src/fs/storage.ts | 2 +- src/project/project-actions.tsx | 4 ++-- src/workbench/AboutDialog/AboutDialog.tsx | 4 ++-- 11 files changed, 14 insertions(+), 14 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6f01a6eb0..86d36139e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,7 +4,7 @@ possible through contributions of companies and individuals around the world. This project is managed on GitHub, and the best way to contribute is to jump in and fix/file issues. -https://github.com/microbit-foundation/python-editor-next +https://github.com/microbit-foundation/python-editor-v3 Significant features are best discussed first to make sure everyone is agreed on the best direction. diff --git a/README.md b/README.md index adf4addfd..78262e84c 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ If you use Visual Studio Code you might find the devcontainer included in this r ## Deployments -The editor is deployed by [CircleCI](https://circleci.com/gh/microbit-foundation/python-editor-next). +The editor is deployed by [CircleCI](https://circleci.com/gh/microbit-foundation/python-editor-v3). The `main` branch is deployed to https://stage-python-editor-next.microbit.org/ on each commit. diff --git a/src/App.css b/src/App.css index c90dd3742..61825ae61 100644 --- a/src/App.css +++ b/src/App.css @@ -24,7 +24,7 @@ } :root { - /* Seems to fix a Safari glitch: https://github.com/microbit-foundation/python-editor-next/issues/369 */ + /* Seems to fix a Safari glitch: https://github.com/microbit-foundation/python-editor-v3/issues/369 */ font-size: 16px; } diff --git a/src/device/webusb.ts b/src/device/webusb.ts index 0f4d2d442..3b084f2d8 100644 --- a/src/device/webusb.ts +++ b/src/device/webusb.ts @@ -94,7 +94,7 @@ export class MicrobitWebUSBConnection // If serial is in progress when the page unloads with V1 DAPLink 0254 or V2 0255 // then it'll fail to reconnect with mismatched command/response errors. // Try hard to disconnect as a workaround. - // https://github.com/microbit-foundation/python-editor-next/issues/89 + // https://github.com/microbit-foundation/python-editor-v3/issues/89 this.unloading = true; this.stopSerialInternal(); // The user might stay on the page if they have unsaved changes and there's another beforeunload listener. @@ -343,7 +343,7 @@ export class MicrobitWebUSBConnection return this.withEnrichedErrors(async () => { if (this.connection) { // Using WebUSB/DAPJs we're limited to 64 byte packet size with a two byte header. - // https://github.com/microbit-foundation/python-editor-next/issues/215 + // https://github.com/microbit-foundation/python-editor-v3/issues/215 const maxSerialWrite = 62; let start = 0; while (start < data.length) { diff --git a/src/e2e/app.ts b/src/e2e/app.ts index 7fcf5974e..c47dfeff1 100644 --- a/src/e2e/app.ts +++ b/src/e2e/app.ts @@ -493,7 +493,7 @@ export class App { const content = await this.focusEditorContent(); // The short delay seems to improve reliability triggering autocomplete. // Previously finding autocomplete options failed approx 1 in 30 times. - // https://github.com/microbit-foundation/python-editor-next/issues/419 + // https://github.com/microbit-foundation/python-editor-v3/issues/419 return content.type(text, { delay: 10 }); } diff --git a/src/editor/codemirror/CodeMirrorView.tsx b/src/editor/codemirror/CodeMirrorView.tsx index 3cd7fe0d4..dc2c5e201 100644 --- a/src/editor/codemirror/CodeMirrorView.tsx +++ b/src/editor/codemirror/CodeMirrorView.tsx @@ -38,7 +38,7 @@ const CodeMirrorView = ({ value, ...props }: CodeMirrorViewProps) => { ".cm-scroller": { // Reduced from 1.4 to a value that gets integral line height on Safari with the 16px // font size used in Reference to sidestep https://bugs.webkit.org/show_bug.cgi?id=225695 - // See https://github.com/microbit-foundation/python-editor-next/issues/369 + // See https://github.com/microbit-foundation/python-editor-v3/issues/369 lineHeight: 1.375, }, }), diff --git a/src/editor/codemirror/language-server/docstrings.ts b/src/editor/codemirror/language-server/docstrings.ts index e7fb9db67..532faac97 100644 --- a/src/editor/codemirror/language-server/docstrings.ts +++ b/src/editor/codemirror/language-server/docstrings.ts @@ -9,7 +9,7 @@ export interface DocSectionsSplit { } export const splitDocString = (markup: string): DocSectionsSplit => { - // Workaround for https://github.com/microbit-foundation/python-editor-next/issues/501 + // Workaround for https://github.com/microbit-foundation/python-editor-v3/issues/501 if (markup.startsWith("\\\n")) { markup = markup.substring(2); } diff --git a/src/editor/codemirror/language-server/view.ts b/src/editor/codemirror/language-server/view.ts index 3d7b0a1a5..7816e23da 100644 --- a/src/editor/codemirror/language-server/view.ts +++ b/src/editor/codemirror/language-server/view.ts @@ -50,7 +50,7 @@ class LanguageServerView extends BaseLanguageServerView implements PluginValue { update({ docChanged }: ViewUpdate) { if (docChanged) { // We should do incremental updates here - // See https://github.com/microbit-foundation/python-editor-next/issues/256 + // See https://github.com/microbit-foundation/python-editor-v3/issues/256 this.client.didChangeTextDocument(this.uri, [ { text: this.view.state.doc.toString() }, ]); diff --git a/src/fs/storage.ts b/src/fs/storage.ts index c7742c4f2..91d106466 100644 --- a/src/fs/storage.ts +++ b/src/fs/storage.ts @@ -113,7 +113,7 @@ export class SessionStorageFSStorage implements FSStorage { return window.sessionStorage; } catch (e) { // We see SecurityError here in some scenarios - // https://github.com/microbit-foundation/python-editor-next/issues/736 + // https://github.com/microbit-foundation/python-editor-v3/issues/736 return undefined; } }; diff --git a/src/project/project-actions.tsx b/src/project/project-actions.tsx index 5dec6063a..38d7f0897 100644 --- a/src/project/project-actions.tsx +++ b/src/project/project-actions.tsx @@ -527,7 +527,7 @@ export class ProjectActions { if (e instanceof HexGenerationError) { this.actionFeedback.expectedError({ title: this.intl.formatMessage({ id: "failed-to-build-hex" }), - // Not translated, see https://github.com/microbit-foundation/python-editor-next/issues/159 + // Not translated, see https://github.com/microbit-foundation/python-editor-v3/issues/159 description: e.message, }); } else { @@ -555,7 +555,7 @@ export class ProjectActions { } catch (e: any) { this.actionFeedback.expectedError({ title: this.intl.formatMessage({ id: "failed-to-build-hex" }), - // Not translated, see https://github.com/microbit-foundation/python-editor-next/issues/159 + // Not translated, see https://github.com/microbit-foundation/python-editor-v3/issues/159 description: e.message, }); return; diff --git a/src/workbench/AboutDialog/AboutDialog.tsx b/src/workbench/AboutDialog/AboutDialog.tsx index 5a1ef901b..12b1e3aac 100644 --- a/src/workbench/AboutDialog/AboutDialog.tsx +++ b/src/workbench/AboutDialog/AboutDialog.tsx @@ -51,7 +51,7 @@ const versionInfo = [ { name: "Editor", value: process.env.REACT_APP_VERSION, - href: "https://github.com/microbit-foundation/python-editor-next", + href: "https://github.com/microbit-foundation/python-editor-v3", }, ...microPythonConfig.versions.map((mpy) => ({ name: mpy.name, @@ -118,7 +118,7 @@ const AboutDialog = ({ isOpen, onClose }: AboutDialogProps) => { rel="noopener noreferrer" target="blank" color="brand.500" - href="https://github.com/microbit-foundation/python-editor-next/graphs/contributors" + href="https://github.com/microbit-foundation/python-editor-v3/graphs/contributors" > {chunks} From 21c9b7f6334cd319eec3cafac8ce501e9b482151 Mon Sep 17 00:00:00 2001 From: Robert Knight Date: Fri, 16 Sep 2022 09:56:22 +0100 Subject: [PATCH 2/3] Remove unused dev container and update readme --- .devcontainer/Dockerfile | 3 --- .devcontainer/devcontainer.json | 19 ------------------- README.md | 4 ---- 3 files changed, 26 deletions(-) delete mode 100644 .devcontainer/Dockerfile delete mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile deleted file mode 100644 index cd92128da..000000000 --- a/.devcontainer/Dockerfile +++ /dev/null @@ -1,3 +0,0 @@ -ARG VARIANT="14-buster" -FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT} -RUN apt-get update && apt-get install -y vim diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json deleted file mode 100644 index 9072d6f1c..000000000 --- a/.devcontainer/devcontainer.json +++ /dev/null @@ -1,19 +0,0 @@ -// For format details, see https://aka.ms/devcontainer.json. -// For image args, see the README at https://github.com/microsoft/vscode-dev-containers/tree/v0.163.1/containers/javascript-node -{ - "name": "python-editor-next", - "build": { - "dockerfile": "Dockerfile", - "args": { "VARIANT": "14" } - }, - "extensions": ["esbenp.prettier-vscode"], - "portsAttributes": { - "3000": { - "label": "dev server", - "onAutoForward": "openBrowser" - } - }, - "remoteUser": "node", - "postCreateCommand": "npm install", - "postStartCommand": "git config --global core.editor 'code --wait'" -} diff --git a/README.md b/README.md index 78262e84c..d421190dc 100644 --- a/README.md +++ b/README.md @@ -27,8 +27,6 @@ CodeMirror 6 has [great documentation](https://codemirror.net/6/docs/). The [sys The project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). -If you use Visual Studio Code you might find the devcontainer included in this repository a useful option to get an automatically configured development environment. [Find out more about containers and Visual Studio Code](https://code.visualstudio.com/docs/remote/containers). - ## Deployments The editor is deployed by [CircleCI](https://circleci.com/gh/microbit-foundation/python-editor-v3). @@ -46,8 +44,6 @@ For custom deployments, note that the educational content in the sidebar is curr 3. Install the dependencies via `npm install`. 4. Choose from the NPM scripts documented below. -If you're using the devcontainer with Visual Studio Code then the "Clone a repository from GitHub in a Container Volume" action will address steps 1 through 3. - ### `npm start` Runs the app in the development mode.\ From a9d4b3d04342e52763add3cc7210cfe22a9ea512 Mon Sep 17 00:00:00 2001 From: Robert Knight Date: Fri, 16 Sep 2022 10:05:00 +0100 Subject: [PATCH 3/3] Update theme package --- .circleci/config.yml | 2 +- craco.config.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 48b95591c..f1a065de7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -34,7 +34,7 @@ _steps: install_dependencies: &install_dependencies run: npm ci --cache .npm-cache && sudo npm config set @microbit-foundation:registry https://npm.pkg.github.com/microbit-foundation && sudo npm i -g @microbit-foundation/website-deploy-aws@0.3.0 @microbit-foundation/website-deploy-aws-config@0.4.2 @microbit-foundation/circleci-npm-package-versioner@1 install_theme: &install_theme - run: npm config set @microbit-foundation:registry https://npm.pkg.github.com/microbit-foundation && npm install --no-save @microbit-foundation/python-editor-next-microbit@0.1.0-dev.180 + run: npm config set @microbit-foundation:registry https://npm.pkg.github.com/microbit-foundation && npm install --no-save @microbit-foundation/python-editor-v3-microbit@0.1.0-dev.183 update_version: &update_version run: npm run ci:update-version build: &build diff --git a/craco.config.js b/craco.config.js index 34cf6611e..dfec99f7c 100644 --- a/craco.config.js +++ b/craco.config.js @@ -7,7 +7,7 @@ const path = require("path"); const fs = require("fs"); // Support optionally pulling in external branding if the module is installed. -const theme = "@microbit-foundation/python-editor-next-microbit"; +const theme = "@microbit-foundation/python-editor-v3-microbit"; const external = `node_modules/${theme}`; const internal = "src/deployment/default";