Skip to content

Commit fb62d66

Browse files
committed
temp banner
1 parent 93b5cb0 commit fb62d66

File tree

2 files changed

+20
-9
lines changed

2 files changed

+20
-9
lines changed

client/modules/IDE/components/Banner.jsx

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import React from 'react';
22
import PropTypes from 'prop-types';
3-
import { Trans } from 'react-i18next';
3+
// import { Trans } from 'react-i18next';
44
import { CrossIcon } from '../../../common/icons';
55

66
/**
77
* Banner displays a dismissible announcement bar with a link and a close icon.
88
* It's typically used to highlight opportunities, but use and design can be flexible.
99
*
10-
* This component is **presentational only** — visibility logic (open/close state) should be
10+
* This component is presentational only — visibility logic (open/close state) should be
1111
* controlled by the parent via the `onClose` handler.
1212
*
1313
* @param {Object} props
@@ -24,17 +24,28 @@ import { CrossIcon } from '../../../common/icons';
2424

2525
const Banner = ({ onClose }) => {
2626
// URL can be updated depending on the opportunity or announcement.
27-
const bannerURL = 'https://processingfoundation.org/donate';
27+
// const bannerURL = 'https://processingfoundation.org/donate';
2828

29-
const bannerCopy = (
29+
// currently holds donation copy, will switch back when temp maintenance is done
30+
// const bannerCopy = (
31+
// <>
32+
// <Trans i18nKey="Banner.Copy" components={{ bold: <strong /> }} />
33+
// </>
34+
// );
35+
36+
// temp copy for maintenance, will remove on 3/22/2026
37+
const bannerTempCopy = (
3038
<>
31-
<Trans i18nKey="Banner.Copy" components={{ bold: <strong /> }} />
39+
p5js.org will be undergoing scheduled maintenance on{' '}
40+
<strong>Sunday March 22, 2026 2026 8:00am CET</strong>. The editor and the
41+
website may be down for up to 24 hours.
3242
</>
3343
);
3444

3545
return (
3646
<div className="banner">
37-
<a href={bannerURL}>{bannerCopy}</a>
47+
{/* <a href={bannerURL}>{bannerCopy}</a> */}
48+
<a href="https://p5js.org">{bannerTempCopy}</a>
3849
<button className="banner-close-button" onClick={onClose}>
3950
<CrossIcon icon={{ default: '#000', hover: '#333' }} />
4051
</button>

client/modules/IDE/pages/IDEView.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ const IDEView = () => {
114114
const [sidebarSize, setSidebarSize] = useState(160);
115115
const [isOverlayVisible, setIsOverlayVisible] = useState(false);
116116
const [MaxSize, setMaxSize] = useState(window.innerWidth);
117-
const [displayBanner, setDisplayBanner] = useState(false); // set to true if in use
117+
const [displayBanner, setDisplayBanner] = useState(true); // set to true if in use
118118

119119
const cmRef = useRef({});
120120

@@ -189,12 +189,12 @@ const IDEView = () => {
189189
const lastClosedAt = stored ? Number(stored) : null;
190190

191191
if (!lastClosedAt) {
192-
setDisplayBanner(false); // set to true if in use
192+
setDisplayBanner(true); // set to true if in use
193193
return;
194194
}
195195

196196
if (minutesSince(lastClosedAt) >= BANNER_COOLDOWN_MINUTES) {
197-
setDisplayBanner(false); // set to true if in use
197+
setDisplayBanner(true); // set to true if in use
198198
} else {
199199
setDisplayBanner(false);
200200
}

0 commit comments

Comments
 (0)