release notes: the 5.1.0 popup, and dataforest cloud in Settings > About

The release popup now shows 5.1.0: place search, shared place details
and faster routing as three cards side by side, each with its own
drawing. The support band is set as a card like the promise above it
(optional supportLabelKey; a release without it keeps the plain line),
and the two support buttons get the same glass look in their colours.

Settings > About gets a full-width panel for dataforest cloud, who
sponsor the servers behind place search, address search and routing.
Both logos ship in client/public/brands, so opening Settings reaches no
third party. Wherever a line names dataforest cloud it links to
https://cloud.dataforest.net/?mtm_campaign=trek, the link dataforest
gave us; the README moves to it too.

All 28 locales carry the new copy, and the old 5.0 card keys are gone.
This commit is contained in:
Maurice
2026-10-31 11:04:19 +01:00
parent f4e524f3c3
commit def8b8a24d
71 changed files with 1636 additions and 692 deletions
@@ -60,7 +60,8 @@ describe('AboutTab', () => {
it('FE-COMP-ABOUT-009: all external links have rel="noopener noreferrer"', () => {
render(<AboutTab appVersion="2.9.10" />);
const links = document.querySelectorAll('a');
expect(links).toHaveLength(6);
// Six tiles, and the sponsor panel: its logo, its button and the name in its title and body.
expect(links).toHaveLength(10);
links.forEach((link) => {
expect(link).toHaveAttribute('rel', 'noopener noreferrer');
});
@@ -130,4 +131,24 @@ describe('AboutTab', () => {
expect(link.style.borderColor).toBe('');
expect(link.style.boxShadow).toBe('');
});
it('FE-COMP-ABOUT-018: the sponsor panel links dataforest cloud wherever it is named, with both logos bundled', () => {
render(<AboutTab appVersion="1.0.0" />);
const links = document.querySelectorAll('a[href="https://cloud.dataforest.net/?mtm_campaign=trek"]');
// The logo tile, the call to action, and the brand name in the title and in the body.
expect(links).toHaveLength(4);
for (const link of links) {
expect(link).toHaveAttribute('target', '_blank');
expect(link).toHaveAttribute('rel', 'noopener noreferrer');
}
const logos = [...document.querySelectorAll('img')].map((img) => img.getAttribute('src'));
expect(logos).toEqual(
expect.arrayContaining(['/brands/dataforest-cloud.svg', '/brands/dataforest-cloud-dark.svg'])
);
// Served by TREK itself: opening Settings must not reach a third party.
expect(logos.every((src) => src?.startsWith('/'))).toBe(true);
expect(screen.getByText('Place search')).toBeInTheDocument();
expect(screen.getByText('Address search')).toBeInTheDocument();
expect(screen.getByText('Routing')).toBeInTheDocument();
});
});
+150 -11
View File
@@ -1,16 +1,30 @@
import { BookOpen, Bug, Coffee, ExternalLink, Github, Heart, Info, Lightbulb } from 'lucide-react';
import {
ArrowUpRight,
BookOpen,
Bug,
Coffee,
ExternalLink,
Github,
Heart,
Info,
Lightbulb,
MapPin,
Route,
Search,
} from 'lucide-react';
import React, { type CSSProperties, type ReactNode } from 'react';
import { useTranslation } from '../../i18n';
import { useAuthStore } from '../../store/authStore';
import { fs } from '../shared/DialogShell';
import Section from './Section';
import { StatusPill } from './settingsKit';
import { fs } from '../shared/DialogShell';
import { useAuthStore } from '../../store/authStore';
interface Props {
appVersion: string;
}
const DISCORD_PATH = 'M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.095 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.095 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z';
const DISCORD_PATH =
'M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.095 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.095 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z';
// The services' own colours: each tile takes its brand on hover and in its icon square.
const BRAND = {
@@ -27,7 +41,8 @@ const SIGNAL = {
} as const;
/** Tile chrome that reads the tile's colour from `--tile`: the border and a faint ring on hover. */
const TILE_HOVER = 'hover:border-[color:var(--tile)] hover:shadow-[0_0_0_1px_color-mix(in_srgb,var(--tile)_14%,transparent)]';
const TILE_HOVER =
'hover:border-[color:var(--tile)] hover:shadow-[0_0_0_1px_color-mix(in_srgb,var(--tile)_14%,transparent)]';
/** The icon square in the tile's colour. */
const TILE_ICON = 'bg-[color-mix(in_srgb,var(--tile)_12%,transparent)] text-[color:var(--tile)]';
@@ -36,7 +51,13 @@ const TILE_ICON = 'bg-[color-mix(in_srgb,var(--tile)_12%,transparent)] text-[col
* external-link mark on the right. The border picks up the tile's colour while
* the pointer is on it.
*/
function LinkTile({ href, color, icon, title, hint }: {
function LinkTile({
href,
color,
icon,
title,
hint,
}: {
href: string;
/** A brand colour or a theme token, handed to the classes as `--tile`. */
color?: string;
@@ -53,19 +74,133 @@ function LinkTile({ href, color, icon, title, hint }: {
style={color ? ({ '--tile': color } as CSSProperties) : undefined}
>
{icon && (
<span className={`grid h-10 w-10 flex-none place-items-center rounded-[12px] ${color ? TILE_ICON : 'bg-surface-tertiary text-content-secondary'}`}>
<span
className={`grid h-10 w-10 flex-none place-items-center rounded-[12px] ${color ? TILE_ICON : 'bg-surface-tertiary text-content-secondary'}`}
>
{icon}
</span>
)}
<div className="min-w-0 flex-1">
<div className="truncate font-semibold text-content" style={fs(13, 'body')}>{title}</div>
<div className="truncate text-content-faint" style={fs(11.5)}>{hint}</div>
<div className="truncate font-semibold text-content" style={fs(13, 'body')}>
{title}
</div>
<div className="truncate text-content-faint" style={fs(11.5)}>
{hint}
</div>
</div>
<ExternalLink size={14} className="flex-none text-content-faint" />
</a>
);
}
const DATAFOREST_HREF = 'https://cloud.dataforest.net/?mtm_campaign=trek';
const DATAFOREST_NAME = 'dataforest cloud';
const DATAFOREST = '#02C382'; // theme-lint-disable: brand colour (dataforest cloud)
/** The sponsor's name, linked wherever a line names it: it is a brand and reads the same in every language. */
function withDataforestLink(text: string): ReactNode {
const parts = text.split(DATAFOREST_NAME);
if (parts.length === 1) return text;
return parts.flatMap((part, i) =>
i === 0
? [part]
: [
<a
key={i}
href={DATAFOREST_HREF}
target="_blank"
rel="noopener noreferrer"
className="text-[color:var(--df)] no-underline hover:underline"
>
{DATAFOREST_NAME}
</a>,
part,
]
);
}
/**
* The sponsor of TREK's own servers, across the whole section: what runs there
* and a way to visit them. The logo ships with TREK, so opening Settings sends
* nothing to a third party.
*/
function DataforestBanner() {
const { t } = useTranslation();
const services = [
{ icon: <MapPin size={12} />, label: t('settings.about.sponsor.search') },
{ icon: <Search size={12} />, label: t('settings.about.sponsor.address') },
{ icon: <Route size={12} />, label: t('settings.about.sponsor.routing') },
];
return (
<div
className="relative overflow-hidden rounded-[18px] border border-[color:color-mix(in_srgb,var(--df)_28%,var(--border-primary))] bg-surface-card shadow-sm"
style={{ '--df': DATAFOREST } as CSSProperties}
>
{/* The glow and the faint grid: a server room seen from far away, in the sponsor's green. */}
<div
aria-hidden="true"
className="pointer-events-none absolute inset-0 bg-[radial-gradient(70%_120%_at_0%_0%,color-mix(in_srgb,var(--df)_16%,transparent)_0%,transparent_60%),radial-gradient(50%_90%_at_100%_100%,color-mix(in_srgb,var(--df)_10%,transparent)_0%,transparent_70%)]"
/>
<div
aria-hidden="true"
className="pointer-events-none absolute inset-0 opacity-[0.35] [background-image:radial-gradient(color-mix(in_srgb,var(--df)_35%,transparent)_1px,transparent_1px)] [background-size:16px_16px] [mask-image:linear-gradient(90deg,transparent_0%,#000_55%,#000_100%)]"
/>
<div className="relative flex flex-col gap-5 p-5 md:flex-row md:items-center">
{/* The sponsor's own logo, one for each theme, served from TREK itself. */}
<a
href={DATAFOREST_HREF}
target="_blank"
rel="noopener noreferrer"
aria-label={DATAFOREST_NAME}
className="flex h-[76px] w-full flex-none items-center justify-center rounded-[16px] bg-[color-mix(in_srgb,var(--df)_7%,var(--bg-card))] px-5 shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--df)_26%,transparent)] transition-shadow duration-200 hover:shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--df)_55%,transparent)] md:w-[220px]"
>
<img src="/brands/dataforest-cloud.svg" alt="" className="h-7 w-auto dark:hidden" />
<img src="/brands/dataforest-cloud-dark.svg" alt="" className="hidden h-7 w-auto dark:block" />
</a>
<div className="min-w-0 flex-1">
<div className="font-bold uppercase tracking-[.12em] text-[color:var(--df)]" style={fs(10.5)}>
{t('settings.about.sponsor.eyebrow')}
</div>
<div className="mt-1 font-semibold text-content" style={fs(16, 'subtitle')}>
{withDataforestLink(t('settings.about.sponsor.title'))}
</div>
<p className="m-0 mt-1 leading-relaxed text-content-secondary" style={fs(12.5, 'body')}>
{withDataforestLink(t('settings.about.sponsor.body'))}
</p>
<div className="mt-3 flex flex-wrap gap-2">
{services.map((s) => (
<span
key={s.label}
className="inline-flex items-center gap-1.5 rounded-full border border-edge bg-surface-secondary px-2.5 py-1 font-medium text-content-secondary"
style={fs(11.5)}
>
<span className="text-[color:var(--df)]">{s.icon}</span>
{s.label}
</span>
))}
</div>
</div>
<a
href={DATAFOREST_HREF}
target="_blank"
rel="noopener noreferrer"
className="group inline-flex flex-none items-center gap-2 self-start rounded-full bg-[color:var(--df)] px-4 py-2.5 font-semibold text-[#04150e] no-underline shadow-[0_8px_20px_-10px_var(--df)] transition-[filter,transform] duration-200 hover:-translate-y-px hover:brightness-105 md:self-center" // theme-lint-disable: ink on the sponsor's green
style={fs(13, 'body')}
>
{t('settings.about.sponsor.cta')}
<ArrowUpRight
size={15}
className="transition-transform duration-200 group-hover:-translate-y-px group-hover:translate-x-px"
/>
</a>
</div>
</div>
);
}
export default function AboutTab({ appVersion }: Props): React.ReactElement {
const { t } = useTranslation();
const managed = useAuthStore((s) => s.managed);
@@ -124,11 +259,11 @@ export default function AboutTab({ appVersion }: Props): React.ReactElement {
<LinkTile
href="https://discord.gg/NhZBDSd4qW"
color={BRAND.discord}
icon={(
icon={
<svg width="19" height="19" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
<path d={DISCORD_PATH} />
</svg>
)}
}
title="Discord"
hint="Join the community"
/>
@@ -156,6 +291,10 @@ export default function AboutTab({ appVersion }: Props): React.ReactElement {
</div>
)}
{/* TREK's own servers, and who sponsors them. It asks nothing of the reader, so
a hosted instance shows it too. */}
<DataforestBanner />
{/* What replaces the grids above. AGPL §13 asks for the source to be
offered prominently to whoever uses the software over a network, and a
customer of a hosted instance is exactly that reader. The support and