Skip to content

Commit 6fd50bc

Browse files
authored
Merge branch 'develop' into font_size
2 parents 48f2ef5 + a4af1b5 commit 6fd50bc

File tree

3 files changed

+25
-13
lines changed

3 files changed

+25
-13
lines changed

client/components/Nav.jsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,7 @@ class Nav extends React.PureComponent {
278278
onClick={this.toggleDropdownForFile}
279279
onBlur={this.handleBlur}
280280
onFocus={this.clearHideTimeout}
281+
title="File"
281282
onMouseOver={() => {
282283
if (this.state.dropdownOpen !== 'none') {
283284
this.setDropdown('file');
@@ -396,6 +397,7 @@ class Nav extends React.PureComponent {
396397
onClick={this.toggleDropdownForEdit}
397398
onBlur={this.handleBlur}
398399
onFocus={this.clearHideTimeout}
400+
title="Edit"
399401
onMouseOver={() => {
400402
if (this.state.dropdownOpen !== 'none') {
401403
this.setDropdown('edit');
@@ -454,6 +456,7 @@ class Nav extends React.PureComponent {
454456
onClick={this.toggleDropdownForSketch}
455457
onBlur={this.handleBlur}
456458
onFocus={this.clearHideTimeout}
459+
title="Sketch"
457460
onMouseOver={() => {
458461
if (this.state.dropdownOpen !== 'none') {
459462
this.setDropdown('sketch');
@@ -539,6 +542,7 @@ class Nav extends React.PureComponent {
539542
onClick={this.toggleDropdownForHelp}
540543
onBlur={this.handleBlur}
541544
onFocus={this.clearHideTimeout}
545+
title="Help"
542546
onMouseOver={() => {
543547
if (this.state.dropdownOpen !== 'none') {
544548
this.setDropdown('help');
@@ -600,6 +604,7 @@ class Nav extends React.PureComponent {
600604
onClick={this.toggleDropdownForLang}
601605
onBlur={this.handleBlur}
602606
onFocus={this.clearHideTimeout}
607+
title="Language"
603608
onMouseOver={() => {
604609
if (this.state.dropdownOpen !== 'none') {
605610
this.setDropdown('lang');
@@ -760,15 +765,15 @@ class Nav extends React.PureComponent {
760765
this.renderLanguageMenu(navDropdownState)}
761766
<li className="nav__item">
762767
<Link to="/login" className="nav__auth-button">
763-
<span className="nav__item-header">
768+
<span className="nav__item-header" title="Login">
764769
{this.props.t('Nav.Login')}
765770
</span>
766771
</Link>
767772
</li>
768773
<span className="nav__item-or">{this.props.t('Nav.LoginOr')}</span>
769774
<li className="nav__item">
770775
<Link to="/signup" className="nav__auth-button">
771-
<span className="nav__item-header">
776+
<span className="nav__item-header" title="SignUp">
772777
{this.props.t('Nav.SignUp')}
773778
</span>
774779
</Link>

client/components/__snapshots__/Nav.unit.test.jsx.snap

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ exports[`Nav renders correctly 1`] = `
2222
<li
2323
class="nav__item"
2424
>
25-
<button>
25+
<button
26+
title="File"
27+
>
2628
<span
2729
class="nav__item-header"
2830
/>
@@ -65,7 +67,9 @@ exports[`Nav renders correctly 1`] = `
6567
<li
6668
class="nav__item"
6769
>
68-
<button>
70+
<button
71+
title="Edit"
72+
>
6973
<span
7074
class="nav__item-header"
7175
/>
@@ -116,7 +120,9 @@ exports[`Nav renders correctly 1`] = `
116120
<li
117121
class="nav__item"
118122
>
119-
<button>
123+
<button
124+
title="Sketch"
125+
>
120126
<span
121127
class="nav__item-header"
122128
/>
@@ -166,7 +172,9 @@ exports[`Nav renders correctly 1`] = `
166172
<li
167173
class="nav__item"
168174
>
169-
<button>
175+
<button
176+
title="Help"
177+
>
170178
<span
171179
class="nav__item-header"
172180
/>

client/utils/p5-javascript.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -158,14 +158,12 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
158158
} else if (wordRE.test(ch)) {
159159
stream.eatWhile(wordRE);
160160
var word = stream.current()
161-
if (state.lastType != ".") {
162-
if (keywords.propertyIsEnumerable(word)) {
163-
var kw = keywords[word]
164-
return ret(kw.type, kw.style, word)
165-
}
166-
if (word == "async" && stream.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/, false))
167-
return ret("async", "keyword", word)
161+
if (keywords.propertyIsEnumerable(word)) {
162+
var kw = keywords[word]
163+
return ret(kw.type, kw.style, word)
168164
}
165+
if (state.lastType != "." && word == "async" && stream.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/, false))
166+
return ret("async", "keyword", word)
169167
return ret("variable", "variable", word)
170168
}
171169
}
@@ -285,6 +283,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
285283
if (combinator(type, content)) {
286284
while(cc.length && cc[cc.length - 1].lex)
287285
cc.pop()();
286+
if (style?.slice(0, 2) === "p5") return style;
288287
if (cx.marked) return cx.marked;
289288
if (type == "variable" && inScope(state, content)) return "variable-2";
290289
return style;

0 commit comments

Comments
 (0)