Skip to content

Commit c9e6834

Browse files
committed
refactor(welcome): remove the release notes NEW badge
Assisted-by: Claude Opus 5.5
1 parent 91bc027 commit c9e6834

7 files changed

Lines changed: 4 additions & 113 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
2020

2121
### Changed
2222

23+
- **Welcome page:** the "NEW" badge on the release notes entry has been removed.
2324
- **Histogram range editors:** generic parameter intervals now respect linked numeric constraints and read-only states. Brightness and contrast retains its specialized controls, including exact float64 window editing outside the source image's observed range.
2425
- **Guidata compatibility:** browser runtimes now require guidata 3.15 and use
2526
its native async DataSet backend and JSON Schema exporter. The former

‎src/App.tsx‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5324,10 +5324,7 @@ export default function App() {
53245324
/>
53255325
)}
53265326
{releaseNotesOpen && (
5327-
<ReleaseNotesDialog
5328-
appVersion={(import.meta.env.VITE_APP_VERSION as string) ?? "dev"}
5329-
onClose={() => setReleaseNotesOpen(false)}
5330-
/>
5327+
<ReleaseNotesDialog onClose={() => setReleaseNotesOpen(false)} />
53315328
)}
53325329
{h5BrowserFiles !== null && (
53335330
<Suspense fallback={null}>

‎src/components/releasenotes/ReleaseNotesDialog.tsx‎

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,10 @@
55
* with the application bundle and always matches the running version.
66
* Markdown is rendered with the shared :mod:`MarkdownView` (``marked``
77
* + ``DOMPurify``).
8-
*
9-
* Opening the dialog records the current version as "seen" via
10-
* :func:`markReleaseSeen`, which clears the "NEW" badge surfaced by
11-
* the Welcome page.
128
*/
139

1410
import { useEffect } from "react";
1511
import { MarkdownView } from "../AIAssistant/MarkdownView";
16-
import { markReleaseSeen } from "../../utils/releaseNotes";
1712
import changelogMd from "../../../CHANGELOG.md?raw";
1813

1914
/**
@@ -44,12 +39,10 @@ function stripEmptyUnreleased(md: string): string {
4439
const releaseNotesMd = stripEmptyUnreleased(changelogMd);
4540

4641
interface Props {
47-
/** Current application version (e.g. ``"0.2.0"``). */
48-
appVersion: string;
4942
onClose: () => void;
5043
}
5144

52-
export function ReleaseNotesDialog({ appVersion, onClose }: Props) {
45+
export function ReleaseNotesDialog({ onClose }: Props) {
5346
// Esc closes the dialog (mirrors HelpDialog).
5447
useEffect(() => {
5548
const handler = (event: KeyboardEvent) => {
@@ -59,11 +52,6 @@ export function ReleaseNotesDialog({ appVersion, onClose }: Props) {
5952
return () => window.removeEventListener("keydown", handler);
6053
}, [onClose]);
6154

62-
// Mark this version as seen as soon as the dialog is mounted.
63-
useEffect(() => {
64-
markReleaseSeen(appVersion);
65-
}, [appVersion]);
66-
6755
return (
6856
<div
6957
className="overlay"

‎src/components/welcome/WelcomeView.tsx‎

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import { getRootIconUrl } from "../../assets/rootIcons";
2222
import { getIoIconUrl } from "../../assets/ioIcons";
2323
import { getHelpIconUrl } from "../../assets/helpIcons";
2424
import { getH5IconUrl } from "../../assets/h5Icons";
25-
import { useUnseenRelease } from "../../utils/releaseNotes";
2625
import { t } from "../../i18n/translate";
2726

2827
type Kind = "signal" | "image";
@@ -71,10 +70,6 @@ interface QuickAction {
7170
* choose between Signal and Image. ``onKindSelect`` receives the
7271
* picked kind. */
7372
onKindSelect?: (kind: Kind) => void;
74-
/** Optional short text rendered as a coloured pill at the end of the
75-
* row label (e.g. ``"NEW"`` to highlight the release notes entry on
76-
* the first launch after an upgrade). */
77-
badge?: string;
7873
}
7974

8075
/** Read/write helper for the "show welcome on startup" preference. */
@@ -110,7 +105,6 @@ export function WelcomeView({
110105
onOpenReleaseNotes,
111106
onOpenAIAssistant,
112107
}: WelcomeViewProps) {
113-
const releaseNotesUnseen = useUnseenRelease(appVersion);
114108
const startActions: QuickAction[] = [
115109
{
116110
iconUrl: getRootIconUrl("signal.svg"),
@@ -180,7 +174,6 @@ export function WelcomeView({
180174
"Browse the full release notes and recent changes to DataLab-Web.",
181175
),
182176
onClick: onOpenReleaseNotes,
183-
badge: releaseNotesUnseen ? "NEW" : undefined,
184177
},
185178
];
186179

@@ -310,14 +303,7 @@ function WelcomeActionRow({
310303
/>
311304
)}
312305
<span className="welcome-action-text">
313-
<span className="welcome-action-label">
314-
{action.label}
315-
{action.badge && (
316-
<span className="welcome-action-badge" aria-label={t("New")}>
317-
{action.badge}
318-
</span>
319-
)}
320-
</span>
306+
<span className="welcome-action-label">{action.label}</span>
321307
{action.description && (
322308
<span className="welcome-action-description">
323309
{action.description}

‎src/locales/fr.json‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,6 @@
638638
"n": "n",
639639
"Name": "Nom",
640640
"Nearest": "Plus proche",
641-
"New": "Nouveau",
642641
"New axis": "Nouvel axe",
643642
"New conversation": "Nouvelle conversation",
644643
"New group": "Nouveau groupe",

‎src/styles.css‎

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6296,21 +6296,6 @@ input {
62966296
color: var(--text);
62976297
}
62986298

6299-
.welcome-action-badge {
6300-
display: inline-block;
6301-
margin-left: 8px;
6302-
padding: 1px 6px;
6303-
border-radius: 8px;
6304-
background: var(--accent);
6305-
color: #fff;
6306-
font-size: 10px;
6307-
font-weight: 700;
6308-
letter-spacing: 0.5px;
6309-
line-height: 1.4;
6310-
vertical-align: middle;
6311-
text-transform: uppercase;
6312-
}
6313-
63146299
.welcome-action-description {
63156300
font-size: 12px;
63166301
color: var(--text-dim);

‎src/utils/releaseNotes.ts‎

Lines changed: 0 additions & 65 deletions
This file was deleted.

0 commit comments

Comments
 (0)