From 7d5fe227c44435255a8bbc89cbf6a72b89729502 Mon Sep 17 00:00:00 2001 From: Bissbert <43237892+Bissbert@users.noreply.github.com> Date: Tue, 5 May 2026 18:14:51 +0700 Subject: [PATCH 1/2] =?UTF-8?q?feat(ux):=20wave=203=20batch=201=20?= =?UTF-8?q?=E2=80=94=20copy=20+=20a11y=20polish?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hero, gallery, tools, quiz, 404, and footer rewrites driven by the 2026-05-05 UX review. Copy: - Hero headline now describes the actual product ("Crystal morphology, rendered precisely"); subhead trimmed to two sentences with concrete numbers. - Feature-grid heading rewritten for the FGA + developer audience. - Quiz page H1 + subhead promoted from "Quiz" to "Practice and Exam Mode" with question count. - Gallery subhead drives off live family + expression counts (was "90+"). - Tools subhead enumerates the actual calculators on the bench. - 404 body copy rewritten ("This page doesn't crystallise…"); CDL Playground swapped for Quiz in the popular-pages grid; "Go Home" → "Return to homepage". - Synthetics section subhead strips the "(Octahedron)" expression suffix. - "Start practicing now" → "Start practising now" (BrE consistency). Accessibility: - Wrap every trailing → in user-facing link text in
- Built for the FGA community + Built for the FGA community
diff --git a/src/components/minerals/CounterpartsSection.astro b/src/components/minerals/CounterpartsSection.astro index a4cec4b..e945674 100644 --- a/src/components/minerals/CounterpartsSection.astro +++ b/src/components/minerals/CounterpartsSection.astro @@ -5,6 +5,7 @@ */ import type { Mineral } from '../../lib/db-server'; import { cleanCrystalSvg, isValidSvg } from '../../lib/svg-utils'; +import { formatLabel } from '../../lib/format-label'; interface Props { /** The current mineral being viewed */ @@ -21,6 +22,10 @@ const isNatural = !mineral.origin || mineral.origin === 'natural'; const hasCounterparts = counterparts.length > 0; const hasNaturalCounterpart = !!naturalCounterpart; +// Strip the parenthetical expression label (e.g. "Diamond (Octahedron)" → "Diamond") +// — synthetics list is family-scoped, so the expression name is misleading. +const familyName = mineral.name.replace(/\s*\([^)]*\)\s*$/, '').trim(); + // Don't render if nothing to show if (!hasCounterparts && !hasNaturalCounterpart) return; @@ -39,7 +44,7 @@ const originStyles: Record{isNatural - ? `Known synthetic and simulant versions of ${mineral.name}` + ? `Known synthetic and simulant versions of ${familyName}` : `The natural gem this ${mineral.origin} imitates` }
@@ -79,7 +84,7 @@ const originStyles: Record