Skip to content

Commit b2803d8

Browse files
Open shared makecode project (#614)
Once live, this will work at URLs like: https://createai.microbit.org/open-shared-makecode-project/_fDpWJaY67cgR Example error page for invalid ID (e.g. when truncated/typo'd): https://createai.microbit.org/open-shared-makecode-project/_fdpWJaY67cgR The intention for now is to use this to support folks developing resources who want to link to pre-prepared projects, rather than a more general purpose user-facing sharing feature. This is currently set up to open a shared project if the URL path - Does not match a predefined app path - And starts with an underscore
1 parent 7c5dfeb commit b2803d8

31 files changed

+1832
-40
lines changed

lang/ui.ca.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@
7171
"defaultMessage": "Edita mostres de dades",
7272
"description": "Back button text"
7373
},
74+
"blocks-preview-title": {
75+
"defaultMessage": "Blocks preview",
76+
"description": "Blocks preview heading text"
77+
},
7478
"bluetooth-unsupported-advice": {
7579
"defaultMessage": "Et recomanem Google Chrome o Microsoft Edge perquè puguis connectar-te directament a la micro:bit.",
7680
"description": "Note on supported browsers"
@@ -427,6 +431,10 @@
427431
"defaultMessage": "Mostra les funcions de dades",
428432
"description": "Show data features button text"
429433
},
434+
"data-preview-title": {
435+
"defaultMessage": "Data preview",
436+
"description": "Data preview heading text"
437+
},
430438
"data-samples-actions-region": {
431439
"defaultMessage": "Barra d'eines de mostres de dades",
432440
"description": "Region label for data samples actions"
@@ -1216,6 +1224,34 @@
12161224
"defaultMessage": "Obre el fitxer quan es deixa anar",
12171225
"description": "Aria label for file drop target"
12181226
},
1227+
"open-project-action": {
1228+
"defaultMessage": "Open project",
1229+
"description": "Open project button text"
1230+
},
1231+
"open-project-setup-description": {
1232+
"defaultMessage": "Opening this project will overwrite any existing session. You may want to <link>save your existing session</link> first.",
1233+
"description": "Open project setup description"
1234+
},
1235+
"open-shared-project-blocks-preview-description": {
1236+
"defaultMessage": "Preview of the MakeCode code contained within this project.",
1237+
"description": "Blocks preview description text"
1238+
},
1239+
"open-shared-project-data-preview-description": {
1240+
"defaultMessage": "Preview of the actions and data contained within this project.",
1241+
"description": "Data preview description text"
1242+
},
1243+
"open-shared-project-description": {
1244+
"defaultMessage": "This is a Microsoft MakeCode shared project compatible with CreateAI.",
1245+
"description": "Import shared CreateAI project description"
1246+
},
1247+
"open-shared-project-error-description": {
1248+
"defaultMessage": "Check the link you followed is correct, and make sure you are connected to the internet before trying again.",
1249+
"description": "Import shared CreateAI error description"
1250+
},
1251+
"open-shared-project-title": {
1252+
"defaultMessage": "Open shared CreateAI project",
1253+
"description": "Import shared CreateAI project title"
1254+
},
12191255
"other-tabs-body1": {
12201256
"defaultMessage": "Un altre procés està connectat a aquest dispositiu.",
12211257
"description": "Connection error dialog"
@@ -1496,6 +1532,10 @@
14961532
"defaultMessage": "Prova el model",
14971533
"description": "Testing model page title"
14981534
},
1535+
"third-party-content-description": {
1536+
"defaultMessage": "The content above is provided by a third party, and is not endorsed by the Micro:bit Educational Foundation.",
1537+
"description": "Notify user of third party content"
1538+
},
14991539
"tour-action": {
15001540
"defaultMessage": "Tour",
15011541
"description": "Button label that starts a tour of the app's features"

lang/ui.en.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@
7171
"defaultMessage": "Edit data samples",
7272
"description": "Back button text"
7373
},
74+
"blocks-preview-title": {
75+
"defaultMessage": "Blocks preview",
76+
"description": "Blocks preview heading text"
77+
},
7478
"bluetooth-unsupported-advice": {
7579
"defaultMessage": "We recommend Google Chrome or Microsoft Edge so you can connect directly to your micro:bit.",
7680
"description": "Note on supported browsers"
@@ -427,6 +431,10 @@
427431
"defaultMessage": "Show data features",
428432
"description": "Show data features button text"
429433
},
434+
"data-preview-title": {
435+
"defaultMessage": "Data preview",
436+
"description": "Data preview heading text"
437+
},
430438
"data-samples-actions-region": {
431439
"defaultMessage": "Data samples toolbar",
432440
"description": "Region label for data samples actions"
@@ -1216,6 +1224,34 @@
12161224
"defaultMessage": "Open file when dropped",
12171225
"description": "Aria label for file drop target"
12181226
},
1227+
"open-project-action": {
1228+
"defaultMessage": "Open project",
1229+
"description": "Open project button text"
1230+
},
1231+
"open-project-setup-description": {
1232+
"defaultMessage": "Opening this project will overwrite any existing session. You may want to <link>save your existing session</link> first.",
1233+
"description": "Open project setup description"
1234+
},
1235+
"open-shared-project-blocks-preview-description": {
1236+
"defaultMessage": "Preview of the MakeCode code contained within this project.",
1237+
"description": "Blocks preview description text"
1238+
},
1239+
"open-shared-project-data-preview-description": {
1240+
"defaultMessage": "Preview of the actions and data contained within this project.",
1241+
"description": "Data preview description text"
1242+
},
1243+
"open-shared-project-description": {
1244+
"defaultMessage": "This is a Microsoft MakeCode shared project compatible with CreateAI.",
1245+
"description": "Import shared CreateAI project description"
1246+
},
1247+
"open-shared-project-error-description": {
1248+
"defaultMessage": "Check the link you followed is correct, and make sure you are connected to the internet before trying again.",
1249+
"description": "Import shared CreateAI error description"
1250+
},
1251+
"open-shared-project-title": {
1252+
"defaultMessage": "Open shared CreateAI project",
1253+
"description": "Import shared CreateAI project title"
1254+
},
12191255
"other-tabs-body1": {
12201256
"defaultMessage": "Another process is connected to this device.",
12211257
"description": "Connection error dialog"
@@ -1496,6 +1532,10 @@
14961532
"defaultMessage": "Testing model",
14971533
"description": "Testing model page title"
14981534
},
1535+
"third-party-content-description": {
1536+
"defaultMessage": "This project is provided by a user, and not endorsed by Microsoft or the Micro:bit Educational Foundation. Visit the <link>MakeCode shared project</link> to report abuse to Microsoft MakeCode if you think it's not appropriate.",
1537+
"description": "Notify user of third party content"
1538+
},
14991539
"tour-action": {
15001540
"defaultMessage": "Tour",
15011541
"description": "Button label that starts a tour of the app's features"

lang/ui.es-es.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@
7171
"defaultMessage": "Editar muestras de datos",
7272
"description": "Back button text"
7373
},
74+
"blocks-preview-title": {
75+
"defaultMessage": "Blocks preview",
76+
"description": "Blocks preview heading text"
77+
},
7478
"bluetooth-unsupported-advice": {
7579
"defaultMessage": "Te recomendamos Google Chrome o Microsoft Edge para que puedas conectarte directamente a tu micro:bit.",
7680
"description": "Note on supported browsers"
@@ -427,6 +431,10 @@
427431
"defaultMessage": "Mostrar características de los datos",
428432
"description": "Show data features button text"
429433
},
434+
"data-preview-title": {
435+
"defaultMessage": "Data preview",
436+
"description": "Data preview heading text"
437+
},
430438
"data-samples-actions-region": {
431439
"defaultMessage": "Barra de herramientas de muestras de datos",
432440
"description": "Region label for data samples actions"
@@ -1216,6 +1224,34 @@
12161224
"defaultMessage": "Abrir archivo al soltarlo",
12171225
"description": "Aria label for file drop target"
12181226
},
1227+
"open-project-action": {
1228+
"defaultMessage": "Open project",
1229+
"description": "Open project button text"
1230+
},
1231+
"open-project-setup-description": {
1232+
"defaultMessage": "Opening this project will overwrite any existing session. You may want to <link>save your existing session</link> first.",
1233+
"description": "Open project setup description"
1234+
},
1235+
"open-shared-project-blocks-preview-description": {
1236+
"defaultMessage": "Preview of the MakeCode code contained within this project.",
1237+
"description": "Blocks preview description text"
1238+
},
1239+
"open-shared-project-data-preview-description": {
1240+
"defaultMessage": "Preview of the actions and data contained within this project.",
1241+
"description": "Data preview description text"
1242+
},
1243+
"open-shared-project-description": {
1244+
"defaultMessage": "This is a Microsoft MakeCode shared project compatible with CreateAI.",
1245+
"description": "Import shared CreateAI project description"
1246+
},
1247+
"open-shared-project-error-description": {
1248+
"defaultMessage": "Check the link you followed is correct, and make sure you are connected to the internet before trying again.",
1249+
"description": "Import shared CreateAI error description"
1250+
},
1251+
"open-shared-project-title": {
1252+
"defaultMessage": "Open shared CreateAI project",
1253+
"description": "Import shared CreateAI project title"
1254+
},
12191255
"other-tabs-body1": {
12201256
"defaultMessage": "Otro proceso está conectado a este dispositivo.",
12211257
"description": "Connection error dialog"
@@ -1496,6 +1532,10 @@
14961532
"defaultMessage": "Modelo de pruebas",
14971533
"description": "Testing model page title"
14981534
},
1535+
"third-party-content-description": {
1536+
"defaultMessage": "The content above is provided by a third party, and is not endorsed by the Micro:bit Educational Foundation.",
1537+
"description": "Notify user of third party content"
1538+
},
14991539
"tour-action": {
15001540
"defaultMessage": "Recorrido",
15011541
"description": "Button label that starts a tour of the app's features"

lang/ui.ja.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@
7171
"defaultMessage": "データサンプルを編集",
7272
"description": "Back button text"
7373
},
74+
"blocks-preview-title": {
75+
"defaultMessage": "Blocks preview",
76+
"description": "Blocks preview heading text"
77+
},
7478
"bluetooth-unsupported-advice": {
7579
"defaultMessage": "micro:bitに直接接続できるように、Google ChromeまたはMicrosoft Edgeをお勧めします。",
7680
"description": "Note on supported browsers"
@@ -427,6 +431,10 @@
427431
"defaultMessage": "データ機能を表示",
428432
"description": "Show data features button text"
429433
},
434+
"data-preview-title": {
435+
"defaultMessage": "Data preview",
436+
"description": "Data preview heading text"
437+
},
430438
"data-samples-actions-region": {
431439
"defaultMessage": "データサンプルツールバー",
432440
"description": "Region label for data samples actions"
@@ -1216,6 +1224,34 @@
12161224
"defaultMessage": "ドロップ時にファイルを開く",
12171225
"description": "Aria label for file drop target"
12181226
},
1227+
"open-project-action": {
1228+
"defaultMessage": "Open project",
1229+
"description": "Open project button text"
1230+
},
1231+
"open-project-setup-description": {
1232+
"defaultMessage": "Opening this project will overwrite any existing session. You may want to <link>save your existing session</link> first.",
1233+
"description": "Open project setup description"
1234+
},
1235+
"open-shared-project-blocks-preview-description": {
1236+
"defaultMessage": "Preview of the MakeCode code contained within this project.",
1237+
"description": "Blocks preview description text"
1238+
},
1239+
"open-shared-project-data-preview-description": {
1240+
"defaultMessage": "Preview of the actions and data contained within this project.",
1241+
"description": "Data preview description text"
1242+
},
1243+
"open-shared-project-description": {
1244+
"defaultMessage": "This is a Microsoft MakeCode shared project compatible with CreateAI.",
1245+
"description": "Import shared CreateAI project description"
1246+
},
1247+
"open-shared-project-error-description": {
1248+
"defaultMessage": "Check the link you followed is correct, and make sure you are connected to the internet before trying again.",
1249+
"description": "Import shared CreateAI error description"
1250+
},
1251+
"open-shared-project-title": {
1252+
"defaultMessage": "Open shared CreateAI project",
1253+
"description": "Import shared CreateAI project title"
1254+
},
12191255
"other-tabs-body1": {
12201256
"defaultMessage": "別のプロセスがこのデバイスに接続されています。",
12211257
"description": "Connection error dialog"
@@ -1496,6 +1532,10 @@
14961532
"defaultMessage": "モデルのテスト",
14971533
"description": "Testing model page title"
14981534
},
1535+
"third-party-content-description": {
1536+
"defaultMessage": "The content above is provided by a third party, and is not endorsed by the Micro:bit Educational Foundation.",
1537+
"description": "Notify user of third party content"
1538+
},
14991539
"tour-action": {
15001540
"defaultMessage": "ツアー",
15011541
"description": "Button label that starts a tour of the app's features"

lang/ui.ko.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@
7171
"defaultMessage": "데이터 샘플 편집",
7272
"description": "Back button text"
7373
},
74+
"blocks-preview-title": {
75+
"defaultMessage": "Blocks preview",
76+
"description": "Blocks preview heading text"
77+
},
7478
"bluetooth-unsupported-advice": {
7579
"defaultMessage": "micro:bit에 바로 연결하려면 Google Chrome 또는 Microsoft Edge를 사용하는 것이 좋습니다.",
7680
"description": "Note on supported browsers"
@@ -427,6 +431,10 @@
427431
"defaultMessage": "데이터 기능 표시",
428432
"description": "Show data features button text"
429433
},
434+
"data-preview-title": {
435+
"defaultMessage": "Data preview",
436+
"description": "Data preview heading text"
437+
},
430438
"data-samples-actions-region": {
431439
"defaultMessage": "데이터 샘플 도구 모음",
432440
"description": "Region label for data samples actions"
@@ -1216,6 +1224,34 @@
12161224
"defaultMessage": "드롭될 때 파일 열기",
12171225
"description": "Aria label for file drop target"
12181226
},
1227+
"open-project-action": {
1228+
"defaultMessage": "Open project",
1229+
"description": "Open project button text"
1230+
},
1231+
"open-project-setup-description": {
1232+
"defaultMessage": "Opening this project will overwrite any existing session. You may want to <link>save your existing session</link> first.",
1233+
"description": "Open project setup description"
1234+
},
1235+
"open-shared-project-blocks-preview-description": {
1236+
"defaultMessage": "Preview of the MakeCode code contained within this project.",
1237+
"description": "Blocks preview description text"
1238+
},
1239+
"open-shared-project-data-preview-description": {
1240+
"defaultMessage": "Preview of the actions and data contained within this project.",
1241+
"description": "Data preview description text"
1242+
},
1243+
"open-shared-project-description": {
1244+
"defaultMessage": "This is a Microsoft MakeCode shared project compatible with CreateAI.",
1245+
"description": "Import shared CreateAI project description"
1246+
},
1247+
"open-shared-project-error-description": {
1248+
"defaultMessage": "Check the link you followed is correct, and make sure you are connected to the internet before trying again.",
1249+
"description": "Import shared CreateAI error description"
1250+
},
1251+
"open-shared-project-title": {
1252+
"defaultMessage": "Open shared CreateAI project",
1253+
"description": "Import shared CreateAI project title"
1254+
},
12191255
"other-tabs-body1": {
12201256
"defaultMessage": "다른 프로세스가 이 장치에 연결되어 있습니다.",
12211257
"description": "Connection error dialog"
@@ -1496,6 +1532,10 @@
14961532
"defaultMessage": "모델 테스트 중",
14971533
"description": "Testing model page title"
14981534
},
1535+
"third-party-content-description": {
1536+
"defaultMessage": "The content above is provided by a third party, and is not endorsed by the Micro:bit Educational Foundation.",
1537+
"description": "Notify user of third party content"
1538+
},
14991539
"tour-action": {
15001540
"defaultMessage": "투어",
15011541
"description": "Button label that starts a tour of the app's features"

0 commit comments

Comments
 (0)