Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions ui/frontend/Notifications.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,37 @@ import { Portal } from 'react-portal';

import { Close } from './Icon';
import { useAppDispatch, useAppSelector } from './hooks';
import { seenRust2024IsDefault } from './reducers/notifications';
import { seenRustSurvey2025 } from './reducers/notifications';
import { allowLongRun, wsExecuteKillCurrent } from './reducers/output/execute';
import * as selectors from './selectors';

import * as styles from './Notifications.module.css';

const EDITION_URL = 'https://doc.rust-lang.org/edition-guide/';
const SURVEY_URL = 'https://blog.rust-lang.org/2025/11/17/launching-the-2025-state-of-rust-survey/';

const Notifications: React.FC = () => {
return (
<Portal>
<div className={styles.container}>
<Rust2024IsDefaultNotification />
<RustSurvey2025Notification />
<ExcessiveExecutionNotification />
</div>
</Portal>
);
};

const Rust2024IsDefaultNotification: React.FC = () => {
const showIt = useAppSelector(selectors.showRust2024IsDefaultSelector);
const RustSurvey2025Notification: React.FC = () => {
const showIt = useAppSelector(selectors.showRustSurvey2025Selector);

const dispatch = useAppDispatch();
const seenIt = useCallback(() => dispatch(seenRust2024IsDefault()), [dispatch]);
const seenIt = useCallback(() => dispatch(seenRustSurvey2025()), [dispatch]);

return showIt ? (
<Notification onClose={seenIt}>
As of Rust 1.85, the default edition of Rust is now Rust 2024. Learn more about editions in
the <a href={EDITION_URL}>Edition Guide</a>. To specify which edition to use, use the advanced
compilation options menu.
Please help us take a look at who the Rust community is composed of, how the Rust project is
doing, and how we can improve the Rust programming experience by completing the{' '}
<a href={SURVEY_URL}>2025 State of Rust Survey</a>. Whether or not you use Rust today, we want
to know your opinions.
</Notification>
) : null;
};
Expand Down
6 changes: 3 additions & 3 deletions ui/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
"@babel/core": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"@babel/preset-react": "^7.0.0",
"@eslint/compat": "^1.2.3",
"@eslint/compat": "^2.0.0",
"@eslint/js": "^9.15.0",
"@trivago/prettier-plugin-sort-imports": "^5.2.2",
"@trivago/prettier-plugin-sort-imports": "^6.0.0",
"@types/common-tags": "^1.8.1",
"@types/jest": "^30.0.0",
"@types/lodash-es": "^4.17.6",
Expand All @@ -53,7 +53,7 @@
"eslint": "^9.15.0",
"eslint-plugin-react": "^7.14.3",
"eslint-plugin-react-hooks": "^5.0.0",
"glob": "^11.0.0",
"glob": "^12.0.0",
"html-webpack-plugin": "^5.2.0",
"jest": "^30.0.5",
"json-loader": "^0.5.4",
Expand Down
Loading