Skip to content

Commit 371a6e8

Browse files
authored
Merge branch 'develop' into nityam/fix-aria-live-login-error-#3874
2 parents a51f9c1 + 5d60266 commit 371a6e8

File tree

6 files changed

+18992
-25396
lines changed

6 files changed

+18992
-25396
lines changed

client/modules/IDE/pages/IDEView.jsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import IDEOverlays from '../components/IDEOverlays';
2828
import useIsMobile from '../hooks/useIsMobile';
2929
import Banner from '../components/Banner';
3030
import { P5VersionProvider } from '../hooks/useP5Version';
31+
import { stopSketch } from '../actions/ide';
3132

3233
const BANNER_DISMISS_KEY = 'bannerLastDismissedAt';
3334
const BANNER_COOLDOWN_MINUTES = 30;
@@ -158,6 +159,17 @@ const IDEView = () => {
158159
}
159160
};
160161
}, [shouldAutosave, dispatch]);
162+
const prevIsMobile = useRef(isMobile);
163+
164+
useEffect(() => {
165+
if (prevIsMobile.current !== isMobile) {
166+
prevIsMobile.current = isMobile;
167+
168+
if (ide.isPlaying) {
169+
dispatch(stopSketch());
170+
}
171+
}
172+
}, [isMobile, ide.isPlaying, dispatch]);
161173

162174
useEffect(() => {
163175
const updateInnerWidth = (e) => {

client/styles/abstracts/_placeholders.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@
3434

3535
%icon-toast{
3636
@include themify() {
37-
color: $toast-text-color
37+
color: getThemifyVariable('toast-text-color');
3838
& g, & path {
39-
fill: $toast-text-color
39+
fill: getThemifyVariable('toast-text-color');
4040
}
4141
&:hover {
42-
color: getThemifyVariable('icon-toast-hover-color');
42+
color: getThemifyVariable('toast-text-color');
4343
& g, & path {
4444
opacity: 1;
45-
fill: getThemifyVariable('icon-toast-hover-color');
45+
fill: getThemifyVariable('toast-text-color');
4646
}
4747
}
4848
}

client/styles/abstracts/_variables.scss

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ $themes: (
5555
modal-border-color: $middle-light,
5656
icon-color: $middle-gray,
5757
icon-hover-color: $darker,
58-
icon-toast-hover-color: $lightest,
5958
shadow-color: rgba(0, 0, 0, 0.16),
6059
console-background-color: $light,
6160
console-input-background-color: $lightest,
@@ -130,6 +129,9 @@ $themes: (
130129
admonition-border: #22C8ED,
131130
admonition-background: #E4F8FF,
132131
admonition-text: #075769,
132+
133+
toast-background-color: $medium-dark,
134+
toast-text-color: $lightest,
133135
),
134136
dark: (
135137
logo-color: $p5js-pink,
@@ -156,7 +158,6 @@ $themes: (
156158
modal-border-color: $middle-dark,
157159
icon-color: $middle-light,
158160
icon-hover-color: $lightest,
159-
icon-toast-hover-color: $lightest,
160161
shadow-color: rgba(0, 0, 0, 0.16),
161162
console-background-color: $dark,
162163
console-input-background-color: $darker,
@@ -229,6 +230,9 @@ $themes: (
229230
admonition-border: #22C8ED,
230231
admonition-background: #105A7F,
231232
admonition-text: #FFFFFF,
233+
234+
toast-background-color: $medium-light,
235+
toast-text-color: $dark,
232236
),
233237
contrast: (
234238
logo-color: $yellow,
@@ -255,7 +259,6 @@ $themes: (
255259
modal-border-color: $middle-dark,
256260
icon-color: $medium-light,
257261
icon-hover-color: $yellow,
258-
icon-toast-hover-color: $yellow,
259262
shadow-color: rgba(0, 0, 0, 0.16),
260263
console-background-color: $dark,
261264
console-input-background-color: $darker,
@@ -328,9 +331,9 @@ $themes: (
328331
admonition-border: #22C8ED,
329332
admonition-background: #000000,
330333
admonition-text: #ffffff,
331-
)
332-
);
333334

334-
$toast-background-color: $medium-dark;
335-
$toast-text-color: $lightest;
335+
toast-background-color: $medium-light,
336+
toast-text-color: $darker,
336337

338+
)
339+
);

client/styles/components/_toast.scss

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
@use "sass:math";
22

33
.toast {
4-
background-color: $toast-background-color;
5-
color: $toast-text-color;
4+
@include themify() {
5+
color: getThemifyVariable('toast-text-color');
6+
background-color: getThemifyVariable('toast-background-color');
7+
}
68
padding: #{math.div(10, $base-font-size)}rem;
79
position: fixed;
810
top: 0;

0 commit comments

Comments
 (0)