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 {cp.growth_method && ( -
{cp.growth_method.replace(/_/g, ' ')}
+
{formatLabel(cp.growth_method)}
)} @@ -140,7 +145,7 @@ const originStyles: Record = { href="/gallery?origin=synthetic" class="text-sm text-sky-600 hover:text-sky-700 font-medium" > - View all synthetic gems → + View all synthetic gems )} diff --git a/src/components/minerals/RelatedMinerals.astro b/src/components/minerals/RelatedMinerals.astro index c5d20ca..f997e96 100644 --- a/src/components/minerals/RelatedMinerals.astro +++ b/src/components/minerals/RelatedMinerals.astro @@ -68,7 +68,7 @@ const { minerals, currentSystem } = Astro.props; href={`/gallery?system=${currentSystem.toLowerCase()}`} class="text-sm text-sky-600 hover:text-sky-700 font-medium" > - View all {currentSystem} minerals → + View all {currentSystem} minerals diff --git a/src/components/optical/DichroscopeResults.tsx b/src/components/optical/DichroscopeResults.tsx index ea39f3b..230c892 100644 --- a/src/components/optical/DichroscopeResults.tsx +++ b/src/components/optical/DichroscopeResults.tsx @@ -221,7 +221,7 @@ export function DichroscopeResults() { href="/learn/equipment/dichroscope" className="text-purple-600 hover:text-purple-700 underline" > - Learn dichroscope technique and see full pleochroism reference → + Learn dichroscope technique and see full pleochroism reference diff --git a/src/components/optical/OpticalTools.tsx b/src/components/optical/OpticalTools.tsx index b0ce3c2..cb79e4f 100644 --- a/src/components/optical/OpticalTools.tsx +++ b/src/components/optical/OpticalTools.tsx @@ -53,17 +53,17 @@ export function OpticalTools() { diff --git a/src/components/quiz/QuizPage.tsx b/src/components/quiz/QuizPage.tsx index 2665df9..03bc5e4 100644 --- a/src/components/quiz/QuizPage.tsx +++ b/src/components/quiz/QuizPage.tsx @@ -46,9 +46,9 @@ export function QuizPage({ learnEntries }: QuizPageProps) {
-

Quiz

+

Practice and Exam Mode

- Test your gemmology knowledge with questions from the learn content. + 756 questions across all FGA subject areas. Practise at your own pace, or sit a timed mock exam.

diff --git a/src/components/tools/ToolsHub.tsx b/src/components/tools/ToolsHub.tsx index 35b9843..760117a 100644 --- a/src/components/tools/ToolsHub.tsx +++ b/src/components/tools/ToolsHub.tsx @@ -67,7 +67,7 @@ export function ToolsHub() {

Tools

- Professional gemmological tools for calculations, conversions, and reference. + Calculators for the bench: SG by hydrostatic weighing, RI lookup, birefringence, critical angle, carat estimation, and unit conversion — alongside dichroscope, polariscope, and Chelsea-filter references.

diff --git a/src/lib/format-label.ts b/src/lib/format-label.ts new file mode 100644 index 0000000..22d4506 --- /dev/null +++ b/src/lib/format-label.ts @@ -0,0 +1,18 @@ +const ACRONYMS = new Set([ + 'CVD', 'HPHT', 'FTIR', 'HPLC', 'GIA', 'FGA', 'AGTA', + 'EDXRF', 'XRF', 'EDS', 'SEM', 'UV', 'IR', 'NIR', + 'YAG', 'GGG', 'CZ', 'IGI', 'AGS', 'SSEF', 'GRS', +]); + +export function formatLabel(value: string | null | undefined): string { + if (!value) return ''; + return value + .replace(/_/g, ' ') + .split(' ') + .map((word) => { + const upper = word.toUpperCase(); + if (ACRONYMS.has(upper)) return upper; + return word.charAt(0).toUpperCase() + word.slice(1); + }) + .join(' '); +} diff --git a/src/pages/404.astro b/src/pages/404.astro index 26010d2..b39d304 100644 --- a/src/pages/404.astro +++ b/src/pages/404.astro @@ -12,7 +12,7 @@ const { familyCount } = await getSiteStats(); const popularPages = [ { title: 'Crystal Gallery', href: '/gallery', description: `Explore ${familyCount} mineral crystal structures` }, { title: 'Learn Gemmology', href: '/learn', description: 'FGA curriculum and educational content' }, - { title: 'CDL Playground', href: '/playground', description: 'Interactive crystal visualization' }, + { title: 'Quiz', href: '/quiz', description: 'Practice and exam-mode questions across the FGA syllabus' }, { title: 'Documentation', href: '/docs', description: 'API reference and guides' }, ]; --- @@ -32,11 +32,11 @@ const popularPages = [

Lost in the lattice

- The page you're looking for doesn't exist or has been moved. Try one of the routes below or head back to the gallery. + This page doesn't crystallise. The URL you followed doesn't correspond to a known structure — it may have been moved or never existed.

- +
diff --git a/src/pages/gallery/index.astro b/src/pages/gallery/index.astro index 46290b1..09e2892 100644 --- a/src/pages/gallery/index.astro +++ b/src/pages/gallery/index.astro @@ -18,7 +18,7 @@ const initialOrigin = url.searchParams.get('origin') || ''; // Always point to base gallery URL as canonical to prevent duplicate content from filters const canonicalURL = 'https://gemmology.dev/gallery'; -const { familyCount } = await getSiteStats(); +const { familyCount, expressionCount } = await getSiteStats(); // SSG-fetch families + filter dropdowns at build time so the gallery first // paint does not block on sql.js + the 8 MB minerals.db. The wasm DB only @@ -33,14 +33,14 @@ const [initialFamilies, initialSystems, initialOrigins, initialGroups] = await P
= {

- Identify gems with - confidence + Crystal morphology, + rendered precisely.

- Study, practise, and reason about coloured gemstones with an open - FGA-aligned toolkit: a {familyCount}-mineral reference gallery, - interactive crystal morphology, gemmological calculators, and a - timed exam mode. + {familyCount} minerals with FGA-accurate crystallographic data, rendered live from open-source code. + Study, practise, and reason about coloured gemstones — gallery, calculators, quiz, and timed exam included.