From 0f9dde0c4efc2a00acc06aebeb08d9b5dae425be Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Thu, 15 Sep 2016 23:49:14 -0700 Subject: [PATCH 01/17] convert event source/value into TD_ID shims --- libs/microbit/control.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libs/microbit/control.ts b/libs/microbit/control.ts index 7334212a..d6d14894 100644 --- a/libs/microbit/control.ts +++ b/libs/microbit/control.ts @@ -8,6 +8,7 @@ namespace control { * Returns the value of a C++ runtime constant */ //% weight=2 weight=19 blockId="control_event_source_id" block="%id" blockGap=8 + //% shim=TD_ID export function eventSourceId(id: EventBusSource): number { return id; } @@ -15,6 +16,7 @@ namespace control { * Returns the value of a C++ runtime constant */ //% weight=1 weight=19 blockId="control_event_value_id" block="%id" + //% shim=TD_ID export function eventValueId(id: EventBusValue): number { return id; } From 02cd0e1da389534cec5482dfdbc43c680c2170b6 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Thu, 15 Sep 2016 23:49:50 -0700 Subject: [PATCH 02/17] remove "receivednumberat" from blocks --- libs/microbit-radio/radio.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/libs/microbit-radio/radio.cpp b/libs/microbit-radio/radio.cpp index 83ff0eb9..7b4dac5a 100644 --- a/libs/microbit-radio/radio.cpp +++ b/libs/microbit-radio/radio.cpp @@ -141,7 +141,6 @@ namespace radio { */ //% help=radio/received-number-at //% weight=45 debug=true - //% blockId=radio_datagram_received_number_at block="radio receive number|at %VALUE" blockGap=8 int receivedNumberAt(int index) { if (radioEnable() != MICROBIT_OK) return 0; if (0 <= index && index < packet.length() / 4) { From c90dfaa6e750e970109a080cbd4ab452ad343cfe Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Thu, 15 Sep 2016 23:50:52 -0700 Subject: [PATCH 03/17] added headphone part --- libs/microbit-radio/shims.d.ts | 3 +-- libs/microbit/music.ts | 11 +++-------- libs/microbit/parts/headphone.svg | 1 + libs/microbit/pxt.json | 1 + libs/microbit/pxtparts.json | 24 +++++++++++++++++++++++- 5 files changed, 29 insertions(+), 11 deletions(-) create mode 100644 libs/microbit/parts/headphone.svg diff --git a/libs/microbit-radio/shims.d.ts b/libs/microbit-radio/shims.d.ts index 1d27d7b7..5a85fbff 100644 --- a/libs/microbit-radio/shims.d.ts +++ b/libs/microbit-radio/shims.d.ts @@ -46,8 +46,7 @@ declare namespace radio { * @param index index of the number to read from 0 to 3. 1 eg */ //% help=radio/received-number-at - //% weight=45 debug=true - //% blockId=radio_datagram_received_number_at block="radio receive number|at %VALUE" blockGap=8 shim=radio::receivedNumberAt + //% weight=45 debug=true shim=radio::receivedNumberAt function receivedNumberAt(index: number): number; /** diff --git a/libs/microbit/music.ts b/libs/microbit/music.ts index 75709fa5..2a87e741 100644 --- a/libs/microbit/music.ts +++ b/libs/microbit/music.ts @@ -135,7 +135,7 @@ namespace music { */ //% help=music/play-tone weight=90 //% blockId=device_play_note block="play|tone %note=device_note|for %duration=device_beat" icon="\uf025" blockGap=8 - //% parts="speaker" + //% parts="headphone" export function playTone(frequency: number, ms: number): void { pins.analogSetPitchPin(AnalogPin.P0); pins.analogPitch(frequency, ms); @@ -147,7 +147,7 @@ namespace music { */ //% help=music/ring-tone weight=80 //% blockId=device_ring block="ring tone (Hz)|%note=device_note" icon="\uf025" blockGap=8 - //% parts="speaker" + //% parts="headphone" export function ringTone(frequency: number): void { pins.analogSetPitchPin(AnalogPin.P0); pins.analogPitch(frequency, 0); @@ -159,7 +159,7 @@ namespace music { */ //% help=music/rest weight=79 //% blockId=device_rest block="rest(ms)|%duration=device_beat" - //% parts="speaker" + //% parts="headphone" export function rest(ms: number): void { playTone(0, ms); } @@ -171,7 +171,6 @@ namespace music { */ //% weight=50 help=music/note-frequency //% blockId=device_note block="%note" - //% parts="speaker" //% shim=TD_ID export function noteFrequency(name: Note): number { return name; @@ -186,7 +185,6 @@ namespace music { */ //% help=music/beat weight=49 //% blockId=device_beat block="%fraction|beat" - //% parts="speaker" export function beat(fraction?: BeatFraction): number { init(); if (fraction == null) fraction = BeatFraction.Whole; @@ -203,7 +201,6 @@ namespace music { */ //% help=music/tempo weight=40 //% blockId=device_tempo block="tempo (bpm)" blockGap=8 - //% parts="speaker" export function tempo(): number { init(); return beatsPerMinute; @@ -215,7 +212,6 @@ namespace music { */ //% help=music/change-tempo weight=39 //% blockId=device_change_tempo block="change tempo by (bpm)|%value" blockGap=8 - //% parts="speaker" export function changeTempoBy(bpm: number): void { init(); setTempo(beatsPerMinute + bpm); @@ -227,7 +223,6 @@ namespace music { */ //% help=music/set-tempo weight=38 //% blockId=device_set_tempo block="set tempo to (bpm)|%value" - //% parts="speaker" export function setTempo(bpm: number): void { init(); if (bpm > 0) { diff --git a/libs/microbit/parts/headphone.svg b/libs/microbit/parts/headphone.svg new file mode 100644 index 00000000..fa4fc1e0 --- /dev/null +++ b/libs/microbit/parts/headphone.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/libs/microbit/pxt.json b/libs/microbit/pxt.json index d7b15adb..be53b812 100644 --- a/libs/microbit/pxt.json +++ b/libs/microbit/pxt.json @@ -29,6 +29,7 @@ "buffer.cpp", "pxtparts.json", "parts/speaker.svg", + "parts/headphone.svg", "_locales/fr/microbit-jsdoc-strings.json" ], "public": true, diff --git a/libs/microbit/pxtparts.json b/libs/microbit/pxtparts.json index 63cf9a5e..4afc3f78 100644 --- a/libs/microbit/pxtparts.json +++ b/libs/microbit/pxtparts.json @@ -101,10 +101,32 @@ {"pinIndices": [5, 6, 7, 8, 9]} ] }, + "headphone": { + "numberOfPins": 2, + "visual": { + "image": "parts/headphone.svg", + "width": 142, + "height": 180, + "pinDistance": 20, + "pinLocations": [ + {"x": 17, "y": 11}, + {"x": 55, "y": 50} + ] + }, + "pinDefinitions": [ + {"target": "P0", "style": "croc", "orientation": "Y"}, + {"target": "ground", "style": "croc", "orientation": "Y"} + ], + "instantiation": {"kind": "singleton"}, + "assembly": [ + {"part": true, "pinIndices": [0]}, + {"pinIndices": [1]} + ] + }, "speaker": { "numberOfPins": 2, "visual": { - "image": "/parts/speaker.svg", + "image": "parts/speaker.svg", "width": 500, "height": 500, "pinDistance": 70, From a3a1c8a4801a7c5a590c59672698e0fe82fc945a Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Fri, 16 Sep 2016 00:05:51 -0700 Subject: [PATCH 04/17] Bump pxt-core to 0.4.15 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4837821f..6086baea 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,6 @@ "typescript": "^1.8.7" }, "dependencies": { - "pxt-core": "0.4.13" + "pxt-core": "0.4.15" } } From 6569231ba69151785b62c709a81ed5c2f633fe01 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Fri, 16 Sep 2016 00:05:53 -0700 Subject: [PATCH 05/17] 0.4.12 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6086baea..04640a89 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pxt-microbit", - "version": "0.4.11", + "version": "0.4.12", "description": "micro:bit target for PXT", "keywords": [ "JavaScript", From 6bb35c1a72d92c94a403c88a662eb4ddccf87dde Mon Sep 17 00:00:00 2001 From: Thomas Denney Date: Mon, 19 Sep 2016 09:31:03 +0100 Subject: [PATCH 06/17] More detailed information about which browser versions are supported --- docs/browsers.md | 3 +++ docs/browsers/linux.md | 18 ++++++++++++++---- docs/browsers/mac.md | 18 ++++++++++++++---- docs/browsers/technical.md | 36 ++++++++++++++++++++++++++++++++++++ docs/browsers/windows.md | 22 ++++++++++++++++------ 5 files changed, 83 insertions(+), 14 deletions(-) create mode 100644 docs/browsers/technical.md diff --git a/docs/browsers.md b/docs/browsers.md index 3aeece82..e3ae501a 100644 --- a/docs/browsers.md +++ b/docs/browsers.md @@ -99,3 +99,6 @@ latest version of OS X then you'll be using the latest version of Safari. * Click 'About Safari' ![](/static/configurations/safari-version.png) + +IT administrators should check which browser versions are supported +[here](/browsers/technical). diff --git a/docs/browsers/linux.md b/docs/browsers/linux.md index 4f5d8bd3..87218dda 100644 --- a/docs/browsers/linux.md +++ b/docs/browsers/linux.md @@ -1,6 +1,16 @@ -# Unsupported configuration +# Recommended browser for Linux -As you are using Linux, it is recommended that you use Mozilla Firefox or Google -Chrome. +As you are using Linux, it is recommended that you use [Mozilla +Firefox][firefox] or [Google Chrome][chrome]. -Please see [here](/browsers) for more information. +Please see [here][technical] for technical information on which browsers are +supported, or [here][versions] to check which version you are using. + +[edge]: https://www.microsoft.com/en-us/windows/microsoft-edge +[ie]: https://www.microsoft.com/en-us/download/internet-explorer.aspx +[firefox]: https://www.mozilla.org/en-US/firefox/new/ +[chrome]: https://www.google.com/chrome/ +[opera]: https://www.opera.com +[safari]: http://www.apple.com/safari/ +[technical]: /browsers/technical +[versions]: /browsers diff --git a/docs/browsers/mac.md b/docs/browsers/mac.md index 61932f28..c1cb98fc 100644 --- a/docs/browsers/mac.md +++ b/docs/browsers/mac.md @@ -1,6 +1,16 @@ -# Unsupported configuration +# Recommended browser for Mac -As you are using OS X, it is recommended that you use Safari. Alternatively, -Google Chrome and Mozilla Firefox are also supported. +As you are using a Mac, it is recommended that you use [Safari][]. Alternatively, +[Google Chrome][chrome] and [Mozilla Firefox][firefox] are also supported. -Please see [here](/browsers) for more information. +Please see [here][technical] for technical information on which browsers are +supported, or [here][versions] to check which version you are using. + +[edge]: https://www.microsoft.com/en-us/windows/microsoft-edge +[ie]: https://www.microsoft.com/en-us/download/internet-explorer.aspx +[firefox]: https://www.mozilla.org/en-US/firefox/new/ +[chrome]: https://www.google.com/chrome/ +[opera]: https://www.opera.com +[safari]: http://www.apple.com/safari/ +[technical]: /browsers/technical +[versions]: /browsers diff --git a/docs/browsers/technical.md b/docs/browsers/technical.md new file mode 100644 index 00000000..5dac2f0f --- /dev/null +++ b/docs/browsers/technical.md @@ -0,0 +1,36 @@ +# Technical information about browser support + +[codethemicrobit.com][] requires that you use a recent version of a modern +browser, such as Microsoft Edge, Google Chrome, Mozilla Firefox, Safari, Opera, +or IE11. This is because the editor uses modern web technologies such as [web +workers][] to enable compiling [TypeScript][] in the browser, or the using the +same [Monaco][] editor that powers [Visual Studio Code][]. + +[codethemicrobit.com]: https://codethemicrobit.com +[web workers]: http://www.w3.org/TR/workers/ +[typescript]: http://www.typescriptlang.org +[monaco]: https://microsoft.github.io/monaco-editor/ +[visual studio code]: http://code.visualstudio.com + +Most modern browsers automatically update themselves, but in some environments +such as schools these automatic updates are disabled for security. **We +strongly recommend that you use the most recent version of any of these +browsers**, but if you can't then you must use at least: + +| Browser | Minimum version | Release date | Windows | Mac | +| ----------------- | --------------- | -------------- | ----------- | ---------- | +| Edge | 12 | March 2015 | Windows 10+ | N/A | +| Internet Explorer | 11 | October 2013 | Windows 7+ | N/A | +| Mozilla Firefox | 31 ESR | July 2014 | Windows XP+ | OS X 10.6+ | +| Google Chrome | 38 | October 2014 | Windows XP+ | OS X 10.6+ | +| Safari | 9 | September 2015 | N/A | OS X 10.9+ | +| Opera | 21 | May 2014 | Windows 7+ | OS X 10.9+ | + + +Please see our information for which browsers are recommended for [Windows][], +[Mac][], [Linux][], or [Raspberry Pi][]. + +[Windows]: /browsers/windows +[Mac]: /browsers/mac +[Linux]: /browsers/linux +[Raspberry Pi]: /raspberry-pi diff --git a/docs/browsers/windows.md b/docs/browsers/windows.md index 386b65c7..6996a04a 100644 --- a/docs/browsers/windows.md +++ b/docs/browsers/windows.md @@ -1,8 +1,18 @@ -# Unsupported configuration +# Recommended browser for Windows -As you are using Windows, it is recommended that you use Microsoft Edge. If you -are running a version of Windows prior to Windows 10, you can use Internet -Explorer 11. Alternatively, Google Chrome and Mozilla Firefox are also -supported. +We recommend [Microsoft Edge][edge] if you are running Windows 10, but users on +Windows 7 or higher can use [Internet Explorer 11][ie] or recent versions of +[Mozilla Firefox][firefox], [Google Chrome][chrome], or [Opera][opera]. -Please see [here](/browsers) for more information. + +Please see [here][technical] for technical information on which browsers are +supported, or [here][versions] to check which version you are using. + +[edge]: https://www.microsoft.com/en-us/windows/microsoft-edge +[ie]: https://www.microsoft.com/en-us/download/internet-explorer.aspx +[firefox]: https://www.mozilla.org/en-US/firefox/new/ +[chrome]: https://www.google.com/chrome/ +[opera]: https://www.opera.com +[safari]: http://www.apple.com/safari/ +[technical]: /browsers/technical +[versions]: /browsers From 850fb54f5248e3e4a6f8ade1ca006ae46558866d Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Mon, 19 Sep 2016 09:49:58 -0700 Subject: [PATCH 07/17] missing shims for devices namespace --- sim/state/misc.ts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/sim/state/misc.ts b/sim/state/misc.ts index 5a271efe..96f3700a 100644 --- a/sim/state/misc.ts +++ b/sim/state/misc.ts @@ -116,6 +116,28 @@ namespace pxsim.pins { } } +namespace pxsim.devices { + export function tellCameraTo(action: number) { + // TODO + } + export function tellRemoteControlTo(action: number) { + // TODO + } + export function raiseAlertTo(action: number) { + // TODO + } + export function onSignalStrengthChanged(action: number) { + // TODO + } + export function signalStrength() : number { + // TODO + return 0; + } + export function onGamepadButton(button: number, body: RefAction) { + // TODO + } +} + namespace pxsim.bluetooth { export function startIOPinService(): void { // TODO From 527d323ea70d9ee91ec92da1a720e8714902d373 Mon Sep 17 00:00:00 2001 From: Thomas Denney Date: Wed, 21 Sep 2016 06:02:18 +0100 Subject: [PATCH 08/17] New electron client (#256) --- clients/electron/.gitignore | 2 + clients/electron/README.md | 5 +++ clients/electron/index.html | 15 +++++++ clients/electron/main.js | 74 +++++++++++------------------------ clients/electron/package.json | 25 +++++------- 5 files changed, 55 insertions(+), 66 deletions(-) create mode 100644 clients/electron/.gitignore create mode 100644 clients/electron/README.md create mode 100644 clients/electron/index.html diff --git a/clients/electron/.gitignore b/clients/electron/.gitignore new file mode 100644 index 00000000..ccedfdac --- /dev/null +++ b/clients/electron/.gitignore @@ -0,0 +1,2 @@ +node_modules +projects \ No newline at end of file diff --git a/clients/electron/README.md b/clients/electron/README.md new file mode 100644 index 00000000..f0aae8bb --- /dev/null +++ b/clients/electron/README.md @@ -0,0 +1,5 @@ +# PXT micro:bit Electron app + +A very basic wrapper around the web app. To install, copy the contents of this +directory to somewhere outside the main `pxt-microbit` repository. Then run `npm +install && npm start`. diff --git a/clients/electron/index.html b/clients/electron/index.html new file mode 100644 index 00000000..260b1839 --- /dev/null +++ b/clients/electron/index.html @@ -0,0 +1,15 @@ + + + + + code the micro:bit + + + + + + diff --git a/clients/electron/main.js b/clients/electron/main.js index e93a653b..58bba12e 100644 --- a/clients/electron/main.js +++ b/clients/electron/main.js @@ -1,67 +1,39 @@ -const electron = require('electron') -// Module to control application life. -const app = electron.app -// Module to create native browser window. -const BrowserWindow = electron.BrowserWindow -// pxt toolchain +const {app, BrowserWindow, Menu} = require('electron') const pxt = require('pxt-core') +const path = require('path') -// Keep a global reference of the window object, if you don't, the window will -// be closed automatically when the JavaScript object is garbage collected. -let mainWindow +let win -function createWindow() { - console.log('starting app...') - // Create the browser window. - mainWindow = new BrowserWindow({ - width: 800, height: 600, - webPreferences: { - nodeIntegration: false, - } +const cliPath = path.join(process.cwd(), "node_modules/pxt-microbit") + +function startServerAndCreateWindow() { + pxt.mainCli(cliPath, ["serve", "-no-browser"]) + createWindow() +} + +function createWindow () { + win = new BrowserWindow({ + width: 800, + height: 600, + title: "code the micro:bit" }) - - ts.pxt.Util.debug = true; - pxt.mainCli("C:/gh/pxt-microbit/clients/electron/node_modules/pxt-microbit", ["serve", "-just"]); - - // no menu - mainWindow.setMenu(null); - - // and load the index.html of the app. - mainWindow.loadURL(`http://localhost:3232/#local_token=08ba9b8f-6ccb-4202-296d-28fac7a553d9`) - - // Open the DevTools. - mainWindow.webContents.openDevTools() - - // Emitted when the window is closed. - mainWindow.on('closed', function () { - // Dereference the window object, usually you would store windows - // in an array if your app supports multi windows, this is the time - // when you should delete the corresponding element. - mainWindow = null + Menu.setApplicationMenu(null) + win.loadURL(`file://${__dirname}/index.html#local_token=${pxt.globalConfig.localToken}`) + win.on('closed', () => { + win = null }) } -// This method will be called when Electron has finished -// initialization and is ready to create browser windows. -// Some APIs can only be used after this event occurs. -app.on('ready', createWindow) +app.on('ready', startServerAndCreateWindow) -// Quit when all windows are closed. -app.on('window-all-closed', function () { - // On OS X it is common for applications and their menu bar - // to stay active until the user quits explicitly with Cmd + Q +app.on('window-all-closed', () => { if (process.platform !== 'darwin') { app.quit() } }) -app.on('activate', function () { - // On OS X it's common to re-create a window in the app when the - // dock icon is clicked and there are no other windows open. - if (mainWindow === null) { +app.on('activate', () => { + if (win === null) { createWindow() } }) - -// In this file you can include the rest of your app's specific main process -// code. You can also put them in separate files and require them here. \ No newline at end of file diff --git a/clients/electron/package.json b/clients/electron/package.json index c5e949fe..f9633774 100644 --- a/clients/electron/package.json +++ b/clients/electron/package.json @@ -1,19 +1,14 @@ { - "name": "codethemicrobit", - "version": "0.1.0", - "description": "A Blocks / JavaScript editor for the micro:bit", - "main": "main.js", - "scripts": { - "start": "electron ." - }, + "name" : "code-the-microbit", + "version" : "1.0.0", + "description": "Blocks / Javascript editor", "author": "Microsoft", - "license": "MIT", - "devDependencies": { - "electron-prebuilt": "^1.2.0" + "main" : "main.js", + "scripts": { + "start": "node_modules/.bin/electron ." }, - "dependencies": { - "typescript": "1.8.7", - "pxt-core": "*", - "pxt-microbit": "*" + "devDependencies": { + "electron": "*", + "pxt-microbit": "*" } -} \ No newline at end of file +} From 2655843b747506caa3120e0b616ed0b93f70f577 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Tue, 20 Sep 2016 22:13:08 -0700 Subject: [PATCH 09/17] Bump pxt-core to 0.4.17 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 04640a89..b2f7eb52 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,6 @@ "typescript": "^1.8.7" }, "dependencies": { - "pxt-core": "0.4.15" + "pxt-core": "0.4.17" } } From e31279938b0b86e400e5200edcd920356ffa46eb Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Tue, 20 Sep 2016 22:13:15 -0700 Subject: [PATCH 10/17] 0.4.13 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b2f7eb52..02b7325a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pxt-microbit", - "version": "0.4.12", + "version": "0.4.13", "description": "micro:bit target for PXT", "keywords": [ "JavaScript", From 0919eff0c5f324a73c3f65f4c8d4e83cbb49b049 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Tue, 20 Sep 2016 22:56:12 -0700 Subject: [PATCH 11/17] Bump pxt-core to 0.4.18 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 02b7325a..607e94e1 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,6 @@ "typescript": "^1.8.7" }, "dependencies": { - "pxt-core": "0.4.17" + "pxt-core": "0.4.18" } } From 2bb6c6ae2706f35e21b42cb8ab52fa56269d5981 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Tue, 20 Sep 2016 22:56:14 -0700 Subject: [PATCH 12/17] 0.4.14 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 607e94e1..8abf5e8c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pxt-microbit", - "version": "0.4.13", + "version": "0.4.14", "description": "micro:bit target for PXT", "keywords": [ "JavaScript", From adf97d9b5cbd8e2e20670dbe31f967df20f1124c Mon Sep 17 00:00:00 2001 From: Thomas Denney Date: Wed, 21 Sep 2016 11:23:43 +0100 Subject: [PATCH 13/17] Add information about Safari being unsupported in private browsing mode --- docs/browsers/mac.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/browsers/mac.md b/docs/browsers/mac.md index c1cb98fc..e0ed04b5 100644 --- a/docs/browsers/mac.md +++ b/docs/browsers/mac.md @@ -3,6 +3,8 @@ As you are using a Mac, it is recommended that you use [Safari][]. Alternatively, [Google Chrome][chrome] and [Mozilla Firefox][firefox] are also supported. +You cannot use Safari in private browsing mode when using the editor. + Please see [here][technical] for technical information on which browsers are supported, or [here][versions] to check which version you are using. From e62d15ba85d72c935a6e2b443de418acdcaa0791 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Wed, 21 Sep 2016 10:15:59 -0700 Subject: [PATCH 14/17] Embed docs (#257) * embed docs * adding embed docs --- docs/docs.md | 1 + docs/embed.md | 27 +++++++++++++++++++++++++++ docs/faq.md | 3 ++- 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 docs/embed.md diff --git a/docs/docs.md b/docs/docs.md index 5c3c848c..6e676808 100644 --- a/docs/docs.md +++ b/docs/docs.md @@ -21,6 +21,7 @@ ### More questions? * [Frequently Asked Question](/faq) +* [Embedding project](/embed) * [Help Translate](/translate) * [Release notes](/release-notes) diff --git a/docs/embed.md b/docs/embed.md new file mode 100644 index 00000000..5aafad05 --- /dev/null +++ b/docs/embed.md @@ -0,0 +1,27 @@ +# Embed your project + +Once you have a cool project, it is possible to save it in the cloud and share it or embed it to your web site. + +### Instructions + +* Click on **More..**, **Embed Project...** +* Click on the **Publish** button + +The embed dialog will provide you with various options to embed your project in your web site. + +### Project URL + +This URL will point to a web page that contains that project. + +* see the "happy" project: https://codethemicrobit.com/pyirlbpsei + +### ~hint + +**Developers:** This page supports OEmbed as well + +### ~ + +### Embedding into a blog or web site + +* Copy the HTML and paste it into your HTML source. + diff --git a/docs/faq.md b/docs/faq.md index 758bf860..a0cd14ea 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -18,7 +18,8 @@ to reopen your latest project. You can also open previous project stored locally The project source is also stored in each compiled ``.hex`` file. Drag and drop the ``.hex`` file into the web editor to load the project. -To share your project with others, you can use the **Embed** feature. It stores your project in the cloud and creates a URL that you can share with others. +To share your project with others, you can use the [Embed Project...](/embed). +It stores your project in the cloud and creates a URL that you can share with others. If you are using [Visual Studio Code](/code), all your programs are stored as files on your computer and you can use your favorite source control system as needed. From 9aef584966b67f3ab069dc668762b9d22300feeb Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Wed, 21 Sep 2016 10:55:52 -0700 Subject: [PATCH 15/17] Bump pxt-core to 0.4.21 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8abf5e8c..e1a07dd1 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,6 @@ "typescript": "^1.8.7" }, "dependencies": { - "pxt-core": "0.4.18" + "pxt-core": "0.4.21" } } From 4c3f9910f723ab20cbfe94e7b880546d25a5c5f3 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Wed, 21 Sep 2016 10:55:54 -0700 Subject: [PATCH 16/17] 0.4.15 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e1a07dd1..283f124f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pxt-microbit", - "version": "0.4.14", + "version": "0.4.15", "description": "micro:bit target for PXT", "keywords": [ "JavaScript", From 979b2b892a60f1fd4a47fe6fe552985d01742534 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Wed, 21 Sep 2016 15:01:43 -0700 Subject: [PATCH 17/17] avoid name collision (embed.md => share.md) --- docs/docs.md | 2 +- docs/faq.md | 2 +- docs/{embed.md => share.md} | 14 +++++++------- 3 files changed, 9 insertions(+), 9 deletions(-) rename docs/{embed.md => share.md} (88%) diff --git a/docs/docs.md b/docs/docs.md index 6e676808..b2527bb7 100644 --- a/docs/docs.md +++ b/docs/docs.md @@ -21,7 +21,7 @@ ### More questions? * [Frequently Asked Question](/faq) -* [Embedding project](/embed) +* [Embedding project](/share) * [Help Translate](/translate) * [Release notes](/release-notes) diff --git a/docs/faq.md b/docs/faq.md index a0cd14ea..74bb5828 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -18,7 +18,7 @@ to reopen your latest project. You can also open previous project stored locally The project source is also stored in each compiled ``.hex`` file. Drag and drop the ``.hex`` file into the web editor to load the project. -To share your project with others, you can use the [Embed Project...](/embed). +To share your project with others, you can use the [Embed Project...](/share). It stores your project in the cloud and creates a URL that you can share with others. If you are using [Visual Studio Code](/code), all your programs are stored as files on your computer and you can use your favorite source control system as needed. diff --git a/docs/embed.md b/docs/share.md similarity index 88% rename from docs/embed.md rename to docs/share.md index 5aafad05..599a6eed 100644 --- a/docs/embed.md +++ b/docs/share.md @@ -1,10 +1,10 @@ -# Embed your project +# Sharing your project Once you have a cool project, it is possible to save it in the cloud and share it or embed it to your web site. ### Instructions -* Click on **More..**, **Embed Project...** +* Click on **More...** then click **Embed Project...** * Click on the **Publish** button The embed dialog will provide you with various options to embed your project in your web site. @@ -15,13 +15,13 @@ This URL will point to a web page that contains that project. * see the "happy" project: https://codethemicrobit.com/pyirlbpsei +### Embedding into a blog or web site + +* Copy the HTML and paste it into your HTML source. + + ### ~hint **Developers:** This page supports OEmbed as well ### ~ - -### Embedding into a blog or web site - -* Copy the HTML and paste it into your HTML source. -