Skip to content

Commit 858c92d

Browse files
authored
Merge branch 'develop' into fix/form-errors
2 parents e0754db + 7907672 commit 858c92d

File tree

8 files changed

+34
-32
lines changed

8 files changed

+34
-32
lines changed

client/images/p5js-logo-small.svg

Lines changed: 2 additions & 17 deletions
Loading

client/modules/IDE/actions/project.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -270,9 +270,7 @@ export function resetProject() {
270270
}
271271

272272
export function newProject() {
273-
setTimeout(() => {
274-
browserHistory.push('/');
275-
}, 0);
273+
browserHistory.push('/', { confirmed: true });
276274
return resetProject();
277275
}
278276

client/modules/IDE/pages/IDEView.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ function WarnIfUnsavedChanges() {
5656
isAuth(nextLocation.pathname) ||
5757
isAuth(currentLocation.pathname) ||
5858
isOverlay(nextLocation.pathname) ||
59-
isOverlay(currentLocation.pathname)
59+
isOverlay(currentLocation.pathname) ||
60+
nextLocation.state?.confirmed
6061
) {
6162
return true; // allow navigation
6263
}

client/modules/Legal/components/PolicyContainer.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { remSize, prop } from '../../../theme';
77

88
const PolicyContainerMain = styled.main`
99
max-width: ${remSize(700)};
10+
min-height: 100vh;
1011
margin: 0 auto;
1112
padding: ${remSize(10)};
1213
line-height: 1.5em;

client/styles/components/_editor.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ pre.CodeMirror-line {
9898
margin-left: 0;
9999
}
100100

101-
// z-index: 20;
101+
z-index: 1;
102102

103103
width: 580px;
104104
font-family: Montserrat, sans-serif;

client/styles/components/_nav.scss

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -162,21 +162,26 @@
162162
position: absolute;
163163
}
164164
}
165-
.svg__logo g > path {
165+
166+
.svg__logo {
167+
166168
@include themify() {
167-
fill: getThemifyVariable('logo-color');
169+
// Set background color of the logo
170+
background-color: getThemifyVariable('logo-color');
168171
}
169-
}
170-
.svg__logo g g:first-of-type path {
171-
fill: none;
172+
172173
}
173174

174-
.svg__logo g g:first-of-type use {
175+
.svg__logo g path{
176+
175177
@include themify() {
178+
// Set internal color of the logo;
176179
fill: getThemifyVariable('logo-background-color');
177180
}
181+
178182
}
179183

184+
180185
.nav__keyboard-shortcut {
181186
font-size: #{12 / $base-font-size}rem;
182187
font-family: Inconsololata, monospace;

client/styles/components/_toolbar.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,12 @@
125125
}
126126

127127
.toolbar__autorefresh-label {
128+
cursor: pointer;
128129
@include themify() {
129130
color: getThemifyVariable('secondary-text-color');
131+
&:hover {
132+
color: getThemifyVariable('logo-color');
133+
}
130134
}
131135
margin-left: #{5 / $base-font-size}rem;
132136
font-size: #{12 / $base-font-size}rem;

client/utils/codemirror-search.js

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,16 +98,24 @@ function persistentDialog(cm, text, deflt, onEnter, replaceOpened, onKeyDown) {
9898

9999
var upArrow = dialog.getElementsByClassName("up-arrow")[0];
100100
CodeMirror.on(upArrow, "click", function () {
101-
cm.focus();
102-
CodeMirror.commands.findPrev(cm);
103-
searchField.blur();
101+
if (searchField.value.trim() === "") {
102+
searchField.focus();
103+
} else {
104+
cm.focus();
105+
CodeMirror.commands.findPrev(cm);
106+
searchField.blur();
107+
}
104108
});
105109

106110
var downArrow = dialog.getElementsByClassName("down-arrow")[0];
107111
CodeMirror.on(downArrow, "click", function () {
112+
if (searchField.value.trim() === "") {
113+
searchField.focus();
114+
}else{
108115
cm.focus();
109116
CodeMirror.commands.findNext(cm);
110117
searchField.blur();
118+
}
111119
});
112120

113121
var regexpButton = dialog.getElementsByClassName("CodeMirror-regexp-button")[0];
@@ -371,7 +379,7 @@ function doSearch(cm, rev, persistent, immediate, ignoreQuery) {
371379
startSearch(cm, state, q);
372380
findNext(cm, rev);
373381
}
374-
} else {
382+
} else {
375383
dialog(cm, queryDialog, 'Search for:', q, function (query) {
376384
if (query && !state.query)
377385
cm.operation(function () {

0 commit comments

Comments
 (0)