Skip to content

Commit ce72b5a

Browse files
committed
Added What's New! banner
1 parent 8d9afb8 commit ce72b5a

File tree

15 files changed

+317
-66
lines changed

15 files changed

+317
-66
lines changed

CHANGELOG.md

Lines changed: 87 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,96 @@
1-
New Major Coding With Chrome Update
2-
====================================
1+
<!-- markdownlint-disable -->
2+
2019-1-21 16:44:06 -v5.10.16
33

4-
1/9/2019, 1:34:51 PM -v5.10.16
4+
Welcome to Coding with Chrome 5.16.10
5+
=====================================
6+
7+
In this version we have a lot for you to try.
8+
9+
* [AIY](https://aiyprojects.withgoogle.com/) Support
10+
11+
AIY is a cardboard machine learning kit that Coding with Chrome can now
12+
control for you. Want to try some object recognition (have the computer
13+
look at a picture and tell you what's in it)? Or just make it go 'beep'?
14+
Try the AIY mode now!
15+
16+
* Tutorial Engine
17+
18+
Coding with Chrome now has built-in interactive tutorials. We'll walk you
19+
through getting started with the user interface, Blockly, JavaScript and
20+
[SVG](https://en.wikipedia.org/wiki/Scalable_Vector_Graphics). Look for the
21+
*Tutorials* header in the Blockly, AIY and Programming/JavaScript sections.
22+
23+
* [Google Classroom](https://edu.google.com/intl/en/products/classroom/?modal_active=none)
24+
Improvements
25+
26+
Does tour teacher have new assignments for you in
27+
[Google Classroom](https://edu.google.com/intl/en/products/classroom/?modal_active=none)?
28+
You can now open them directly from the Coding with Chrome menu. Make sure
29+
you log in using the person icon in the upper right of Coding with Chrome to
30+
see the *Open Google Classroom* menu option.
31+
32+
* [Bluetooth BLE](https://en.wikipedia.org/wiki/Bluetooth_Low_Energy) support
33+
34+
We now support Bluetooth 4 (BLE) robots too, including the SPRK+. Try it out!
35+
36+
You can learn about lots of other minor changes in the change log below, pulled
37+
directly from our [Open Source code repository on
38+
Github](https://github.com/google/coding-with-chrome). Check there to see how
39+
Coding with Chrome is built.
40+
41+
Please send comments and suggestions to
42+
43+
44+
Thanks!
545

646
Recent Changelog
747
----------------
848

9-
commit da956d3db9b9d8fa633436248d6523b77714b4a9
10-
Author: Ashley Gau <[email protected]>
11-
Date: Wed Dec 12 11:57:44 2018 -0800
49+
commit 42de1848bc5af4a43518f78e9e8216560e18895e (HEAD, whats-new)
50+
Author: Adam Carheden <[email protected]>
51+
Date: Mon Jan 21 12:18:07 2019 -0700
52+
53+
Added What's New! banner
54+
55+
commit 8d9afb801fafb41280986bec86a39b10748af794 (upstream/master, origin/master, origin/HEAD, master)
56+
Author: Markus Bordihn <[email protected]>
57+
Date: Mon Jan 21 18:41:27 2019 +0100
58+
59+
Fixed Google Drive integration issues.
60+
There are still some remaining issues.
61+
62+
commit 833b2a93ae748fa6d83243c9cccf912104e31a65
63+
Author: Markus Bordihn <[email protected]>
64+
Date: Fri Jan 18 17:19:15 2019 +0100
65+
66+
Fixed Google Classroom and Google Cloud integration.
67+
Note: Seems Google Drive integration get's broken and needs to be fixed.
68+
69+
commit 35e468f4d62d3395179345076c385e90d7956d93
70+
Author: Markus Bordihn <[email protected]>
71+
Date: Thu Jan 17 17:34:34 2019 +0100
72+
73+
Update main-debug.js
74+
75+
commit 32d76c07042302167a49b6c29eec57712a900f1e
76+
Author: Markus Bordihn <[email protected]>
77+
Date: Thu Jan 17 17:31:01 2019 +0100
78+
79+
Fixed smaller issues and compiler warnings.
80+
81+
commit 3de1ee8feeced5f047dfce02994d774eaa0d63d5
82+
Author: Adam Carheden <[email protected]>
83+
Date: Thu Jan 17 09:13:29 2019 -0700
84+
85+
Moved AIY and Tutorial cards out of experimental (#209)
86+
87+
- Fixed bug displaying feedback for SVG tutorial
1288

13-
add changelog as built file
89+
commit b5d7f3683ae386a3284b652d1616a63b9e0c59e2
90+
Author: Ashley Gau <[email protected]>
91+
Date: Thu Jan 10 15:27:51 2019 -0800
92+
93+
Add changelog as built file (#203)
1494

1595
commit 8d0697d7462d2599bc82b61ed0f16eb0b4ebb476
1696
Author: Markus Bordihn <[email protected]>
@@ -39,55 +119,4 @@ Date: Wed Dec 12 16:14:59 2018 +0000
39119
* Add warning about Joy Demo
40120
* Disable Joy Demo when connecting
41121
* add default timeout
42-
43-
commit 59ce036b0bbee82acf1352dbd45c63ac330b262a
44-
Author: Adam Carheden <[email protected]>
45-
Date: Thu Nov 29 15:12:39 2018 -0700
46-
47-
Added tour functionality to tutorial (#204)
48-
49-
commit ad2830838b0871a2891a58dbaa54fe28fb7c9209
50-
Author: Markus Bordihn <[email protected]>
51-
Date: Tue Nov 27 15:21:32 2018 +0100
52-
53-
Update DEVELOPMENT.md
54-
55-
commit 8d20d847efb2a22de858a7dae0c0728d916f8527
56-
Author: Markus Bordihn <[email protected]>
57-
Date: Fri Nov 23 16:20:34 2018 +0100
58-
59-
Updated dependencies for blockly, brython, codemirror and phaser-ce.
60-
61-
commit e80bae217c744943c0f93cbbd43dfc43ca284d3e
62-
Author: Chan <[email protected]>
63-
Date: Sun Nov 11 20:56:08 2018 +0800
64-
65-
Added Chinese Translation (#202)
66-
67-
* Create _zho.js
68-
* Added Chinese Translation
69-
* Update blockly.js
70-
* Update connect_screen.js
71-
* Update console.js
72-
* Update general.js
73-
* Update library.js
74-
* Update welcome_screen.js
75-
* Update status.js
76-
* Update sidebar.js
77-
* Update setting_screen.js
78-
* Update select_screen.js
79-
* Update navigation.js
80-
81-
commit b7012489ae96cd64513521fffea7bab520ded812
82-
Author: Chan <[email protected]>
83-
Date: Sun Nov 11 20:54:57 2018 +0800
84-
85-
Added Chinese Blockly files (#201)
86-
87-
commit 5d49534ef4c9efa156a68f45e9250d01e6d34a38
88-
Author: Chan <[email protected]>
89-
Date: Sun Nov 11 20:53:21 2018 +0800
90-
91-
Added Chinese Translation build rules (#200)
92-
93122
[Show all](https://github.com/google/coding-with-chrome/commits/master)

build/cwc/changelog.js

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,40 @@
1818
* @author [email protected] (Ashley Gau)
1919
*/
2020
const fs = require('fs');
21+
const path = require('path');
2122

2223
const date = new Date(Date.now()).toLocaleString();
2324
const version = '5.10.16';
24-
const commits = require('child_process').execSync('git --no-pager log -10');
25+
const commits = require('child_process').execSync('git --no-pager log -10')
26+
.toString('utf8').trim().replace(/[ \t]+$/gm, '');
2527

26-
fs.writeFile('CHANGELOG.md',
27-
`New Major Coding With Chrome Update
28-
====================================
28+
const whats_new_path = path.join(__dirname, '../../static_files/whats_new',
29+
`${version}.md`);
2930

31+
let whats_new_md = false;
32+
try {
33+
fs.accessSync(whats_new_path, fs.constants.F_OK | fs.constants.R_OK);
34+
} catch (err) {
35+
console.warn(`
36+
37+
'${whats_new_path}' doesn't exist or isn't readable.
38+
39+
Consider writing release notes before releasing.
40+
41+
`);
42+
whats_new_md = '';
43+
}
44+
if (whats_new_md === false) {
45+
whats_new_md = fs.readFileSync(whats_new_path, 'utf8').trim();
46+
}
47+
48+
const changelog_md = 'CHANGELOG.md';
49+
fs.writeFile(changelog_md,
50+
`<!-- markdownlint-disable -->
3051
${date} -v${version}
3152
53+
${whats_new_md}
54+
3255
Recent Changelog
3356
----------------
3457
@@ -40,5 +63,5 @@ ${commits}
4063
return console.log(err);
4164
}
4265

43-
console.log('The file was saved!');
66+
console.log(`Wrote '${changelog_md}'`);
4467
});

locales/eng/select_screen.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Locales['eng']['SELECT_SCREEN'] = {
2424
'BLUETOOTH_WEB_NOT_AVAILABLE': 'Required Web Bluetooth support is not available.',
2525
'LOAD_FILE': 'Load {$title}',
2626
'USE': 'Use',
27+
'ENABLE_WHATS_NEW': 'Show notification when a new version is installed.',
2728
};
2829

2930

locales/eng/translation.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ Object.assign(Locales['eng'], {
223223
'Rectangle example': 'Rectangle example',
224224
'Redo last change': 'Redo last change',
225225
'Refresh preview': 'Refresh preview',
226+
'released, check out the new features!': 'released, check out the new features!',
226227
'Reload preview': 'Reload preview',
227228
'Rename variable...': 'Rename variable...',
228229
'Render': 'Render',

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
"launch:win-experimental": "echo && \"C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe\" --profile-directory=Default --load-and-launch-app=%CD%\\dist\\chrome_os --enable-logging --v=1 --no-first-run --enable-experimental-web-platform-features",
9292
"lint": "npm run lint-javascript && npm run lint-markdown",
9393
"lint-javascript": "eslint .",
94-
"lint-markdown": "markdownlint doc/ training/ *.md src/**/*.md",
94+
"lint-markdown": "markdownlint doc/ training/ *.md src/**/*.md static_files/whats_new/**/*.md",
9595
"nw-app": "npm run build:core && npm run build:nw_app && npm run launch:nw",
9696
"nw-app-debug": "npm run build:core && npm run build:nw_app_debug && npm run launch:nw",
9797
"postpublish:nw_app-linux": "node build/binary/linux.js",

src/config/user_config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,14 @@ cwc.userConfigName = {
4949
HTML5: 'html5',
5050
JAVASCRIPT: 'javascript',
5151
LANGUAGE: 'language',
52+
LAST_WHATS_NEW_VERSION: 'last_whats_new_version',
5253
LEGO: 'lego',
5354
MAKEBLOCK: 'makeblock',
5455
PENCIL_CODE: 'pencil_code',
5556
PREVIOUS_VERSION: 'previous_version',
5657
PYTHON: 'python',
5758
SKIP_WELCOME: 'skip_welcome',
59+
SKIP_WHATS_NEW: 'skip_whats_new',
5860
SPHERO: 'sphero',
5961
WORKBENCH_FETCH: 'workbench_fetch',
6062
ZOOM: 'zoom',

src/ui/select_screen/advanced/advanced.soy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
*/
2626
{template .template}
2727
{@param prefix: string}
28+
{@param version: string}
2829

2930
<div class="{$prefix}overview mdl-layout mdl-js-layout">
3031

@@ -89,6 +90,7 @@
8990
{param active: true /}
9091
{param id: 'overview' /}
9192
{param content kind="html"}
93+
{call cwc.soy.SelectScreen.whatsNew data="all" /}
9294
{call .overview data="all" /}
9395
{/param}
9496
{/call}

src/ui/select_screen/normal/normal.soy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
*/
2626
{template .template}
2727
{@param prefix: string}
28+
{@param version: string}
2829

2930
<div class="{$prefix}overview mdl-layout mdl-js-layout">
3031

@@ -65,6 +66,7 @@
6566
{param active: true /}
6667
{param id: 'overview' /}
6768
{param content kind="html"}
69+
{call cwc.soy.SelectScreen.whatsNew data="all" /}
6870
{call .overview data="all" /}
6971
{/param}
7072
{/call}

src/ui/select_screen/select_screen.gss

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,3 +295,28 @@
295295
left: 15%;
296296
background-color: rgb(255,64,129);
297297
}
298+
299+
#{$prefix}select-screen-whats_new .mdl-button {
300+
width: 95%;
301+
}
302+
303+
#{$prefix}select-screen-whats_new-close {
304+
float: right;
305+
max-width: fit-content;
306+
}
307+
308+
#{$prefix}select-screen-whats_new .mdl-grid {
309+
max-width: fit-content;
310+
padding: 0;
311+
}
312+
313+
#{$prefix}select-screen-whats_new label {
314+
max-width: fit-content;
315+
margin: auto;
316+
}
317+
318+
#{$prefix}select-screen-whats_new .mdl-checkbox__label {
319+
font-size: 1rem;
320+
color: rgba(0,0,0,.54);
321+
}
322+

0 commit comments

Comments
 (0)