diff --git a/client/scripts/eslint-baseline.json b/client/scripts/eslint-baseline.json index 75287f41a..817dfe275 100644 --- a/client/scripts/eslint-baseline.json +++ b/client/scripts/eslint-baseline.json @@ -8,7 +8,7 @@ "trek/no-swallowed-catch": 130, "max-params": 32, "trek/store-without-selector": 67, - "react-hooks/refs": 556, + "react-hooks/refs": 555, "react-hooks/set-state-in-effect": 194, "@typescript-eslint/no-floating-promises": 165, "react-hooks/exhaustive-deps": 116, diff --git a/client/src/components/Studio/StudioAssistantPanel.tsx b/client/src/components/Studio/StudioAssistantPanel.tsx index df1fd0770..134199504 100644 --- a/client/src/components/Studio/StudioAssistantPanel.tsx +++ b/client/src/components/Studio/StudioAssistantPanel.tsx @@ -215,13 +215,13 @@ export function StudioAssistantToggle({ assistant }: { assistant: StudioAssistan return ( ); } diff --git a/client/src/components/Studio/StudioHeader.test.tsx b/client/src/components/Studio/StudioHeader.test.tsx index eb2f79239..003d5a9c4 100644 --- a/client/src/components/Studio/StudioHeader.test.tsx +++ b/client/src/components/Studio/StudioHeader.test.tsx @@ -53,7 +53,7 @@ describe('StudioHeader', () => { it("FE-STUDIO-HEAD-001: names the journey under the Studio's mark, with its cover as the tile", () => { head(); expect(screen.getByRole('heading', { name: 'Japan 2026' })).toBeInTheDocument(); - expect(screen.getByText('journey.studio.beta')).toBeInTheDocument(); + expect(screen.getByRole('img', { name: 'TREK Studio' })).toBeInTheDocument(); expect(document.querySelector('.st-head-tile img')?.getAttribute('src')).toBe('/uploads/cover.jpg'); }); diff --git a/client/src/components/Studio/StudioHeader.tsx b/client/src/components/Studio/StudioHeader.tsx index a3e34b0bc..390d17a6a 100644 --- a/client/src/components/Studio/StudioHeader.tsx +++ b/client/src/components/Studio/StudioHeader.tsx @@ -15,14 +15,15 @@ import type { StudioAssistant } from './useStudioAssistant'; /** * The Studio's head band, in the shape every TREK dialog has: a raised tile on - * the left, a small line above the title, the title, a line under it, and the - * round close button at the far end. + * the left, the Studio's mark above the title, the title, a line under it, and + * the close button at the far end. * * The tile is the journey's cover and the title its name, so it is always clear - * whose book this is. What the book is printed as and whether it is saved sit - * under the title, because they describe it. The tools on the right are grouped - * by what they do: who else is here, editing (undo, redo, paste), making - * (auto layout, the assistant), and getting the book out (help, export). How + * whose book this is. Whether it is saved sits under the title, because it + * describes it. The tools on the right are grouped by what they do: who else + * is here, what the book is printed as, editing (undo, redo, paste), auto + * layout, the assistant, help, and getting the book out. Every piece of + * the row is one raised tile of one height, export alone in the accent. How * the page is looked at, the book view, lives with the zoom under the page. */ export function StudioHeader({ @@ -41,11 +42,9 @@ export function StudioHeader({
- {s.t('journey.studio.beta')}

{s.journey?.title || s.t('journey.title')}

- +
+ +
+
@@ -73,15 +76,15 @@ export function StudioHeader({
- {/* The book's assistant; only where it can run for this user. */} -
+ {/* The book's assistant, a tile of its own like help; only where it can run for this user. */} + {/* Studio has no navbar, so the help center's button rides on its own bar. */} - + {open && ( -
+
{PAGE_PRESET_ORDER.map((id) => { const p = PAGE_PRESETS[id]; const on = id === s.preset; diff --git a/client/src/components/Studio/StudioSavedLayouts.tsx b/client/src/components/Studio/StudioSavedLayouts.tsx index d9c621ba7..b1eab3553 100644 --- a/client/src/components/Studio/StudioSavedLayouts.tsx +++ b/client/src/components/Studio/StudioSavedLayouts.tsx @@ -35,10 +35,10 @@ export function StudioSavedLayouts({ const scale = width / (wMm * pxPerMm) return ( -
+
{t('journey.studio.myLayouts')}
{fitting.length === 0 &&

{t('journey.studio.myLayoutsEmpty')}

} -
+
{fitting.map(layout => (
-
{t('journey.studio.builtInLayouts')}
) } diff --git a/client/src/components/Studio/templates/StudioTemplatesPanel.tsx b/client/src/components/Studio/templates/StudioTemplatesPanel.tsx index 181b7f2a1..0bc8efe71 100644 --- a/client/src/components/Studio/templates/StudioTemplatesPanel.tsx +++ b/client/src/components/Studio/templates/StudioTemplatesPanel.tsx @@ -117,7 +117,7 @@ function BuiltInLayouts({ const scale = width / (page.pageWidth * (single ? 1 : 2) * pxPerMm); const templates = single ? COVER_TEMPLATES : TEMPLATES; return ( -
+
{templates.map((tpl) => (

{t('studio.templates.hint')}

- - + +
+
{t('journey.studio.builtInLayouts')}
+ +
); diff --git a/client/src/components/Studio/theme/StudioThemePanel.tsx b/client/src/components/Studio/theme/StudioThemePanel.tsx index cb7ab5ca5..d997a023f 100644 --- a/client/src/components/Studio/theme/StudioThemePanel.tsx +++ b/client/src/components/Studio/theme/StudioThemePanel.tsx @@ -67,7 +67,11 @@ function ThemeCard({ ); } -/** One palette entry: its colour, which is the picker, and its name. */ +/** + * One palette entry: its colour, which is the picker, and its name. The three + * accents share one name under them, so each shows its colour alone and says + * its own name to a screen reader and on hover. + */ function PaletteEntry({ name, hex, @@ -79,13 +83,14 @@ function PaletteEntry({ onPick: (hex: string) => void; t: StudioT; }) { + const accent = name.startsWith('accent'); const label = t(`studio.theme.token.${name}`); return ( -