From c2c55d39c90e196023814a1709fb57adb3750350 Mon Sep 17 00:00:00 2001 From: Magnus Andreas Igesund Nerland Date: Thu, 19 Nov 2026 18:45:16 +0100 Subject: [PATCH 01/11] chore: stop tracking Playwright's test-results (#73) --- test-results/.last-run.json | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 test-results/.last-run.json diff --git a/test-results/.last-run.json b/test-results/.last-run.json deleted file mode 100644 index 5fca3f8..0000000 --- a/test-results/.last-run.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "status": "failed", - "failedTests": [] -} \ No newline at end of file From 834e216cb213c59dc5b2e84eb2fc5de035683375 Mon Sep 17 00:00:00 2001 From: Magnus Andreas Igesund Nerland Date: Thu, 19 Nov 2026 19:12:51 +0100 Subject: [PATCH 02/11] chore: one .gitignore at the root, and stop tracking test-results (#73) --- .gitignore | 6 ++++++ frontend/.gitignore | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) delete mode 100644 frontend/.gitignore diff --git a/.gitignore b/.gitignore index 5a05918..57f7df2 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,9 @@ dist-ssr # Local Claude Code settings .claude/ + +# Playwright and coverage +test-results/ +playwright-report/ +blob-report/ +coverage/ diff --git a/frontend/.gitignore b/frontend/.gitignore deleted file mode 100644 index a29f5d6..0000000 --- a/frontend/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ - -# Playwright and coverage -test-results/ -playwright-report/ -blob-report/ -coverage/ From fb3b48a1b2ee5be2b515e5c4d560d5ac17ce929f Mon Sep 17 00:00:00 2001 From: Magnus Andreas Igesund Nerland Date: Thu, 19 Nov 2026 19:18:48 +0100 Subject: [PATCH 03/11] fix(frontend): one list change at a time per wine across buttons, and notes from the review of #72 (#73) --- backend/src/lists/wine-lists.ts | 3 +- docs/api.md | 5 ++- .../src/features/lists/useWineList.test.tsx | 40 ++++++++++++++++++- frontend/src/features/lists/useWineList.ts | 36 +++++++++++++---- frontend/src/lib/wineLists.ts | 1 + 5 files changed, 72 insertions(+), 13 deletions(-) diff --git a/backend/src/lists/wine-lists.ts b/backend/src/lists/wine-lists.ts index c86d243..99a7776 100644 --- a/backend/src/lists/wine-lists.ts +++ b/backend/src/lists/wine-lists.ts @@ -1,6 +1,7 @@ // The wine lists and their rules, and the SQL that changes and reads them. // The database checks what it can (see the user_wine migration); the rules that span two -// lists are here, and run in one transaction. +// lists are here, and run in one transaction. The frontend repeats them in +// frontend/src/lib/wineLists.ts, so a button can change before the answer: change both together. import type { PoolClient } from 'pg'; import { decodeIdCursor } from '../connection'; import { pool } from '../db'; diff --git a/docs/api.md b/docs/api.md index 902791d..a3f489f 100644 --- a/docs/api.md +++ b/docs/api.md @@ -288,13 +288,14 @@ The code is in `frontend/src/features/lists/`. | Part | What it does | |---|---| +| `lib/wineLists.ts` | The list rules, so a button can change before the API answers. The same rules as `backend/src/lists/wine-lists.ts`: change both together. Both are tested | | `myLists` in the wine queries | The search, the landing page, the wine page and «Mine anmeldelser» ask for `myLists` with each wine, so a page needs no extra request for the buttons | -| `useWineList(wineId, list)` | Returns `{ isSaved, toggle, error }`. Reads `myLists` from the cache with `useFragment`, so every button for the same wine agrees. The button changes at once (`optimisticResponse`, with the same rules as the API in `lib/wineLists.ts`), and goes back with a Norwegian message if the request fails. A visitor is sent to `/konto` and back | +| `useWineList(wineId, list)` | Returns `{ isSaved, toggle, error }`. One change at a time per wine and list, also across buttons (a heart on a card and «Favoritt» on the wine page), so two requests never arrive in the wrong order. Reads `myLists` from the cache with `useFragment`, so every button for the same wine agrees. The button changes at once (`optimisticResponse`, with the same rules as the API in `lib/wineLists.ts`), and goes back with a Norwegian message if the request fails. A visitor is sent to `/konto` and back | | `WineListButtons` | «Favoritt», «Vil prøve» and «Har prøvd» on the wine page: toggle buttons (`aria-pressed`) with visible text, in a named group | | `WineCardListButtons` | The heart and the bookmark on each wine card. Icons only, with the wine's name in the accessible name | | `useMyWineList(list)` | One of the user's lists, 24 wines per page, for «Mine anmeldelser» (behind login) and later the profile | | `updateListPages` | Keeps the cached list pages in step with a change: a wine that left a list is taken out at once, and a list the wine joined is fetched again the next time it is shown, with the new wine first | -| `useLegacyWishlistImport` | Moves a «Vil prøve» list stored in the browser before login (`kk:wishlist`) to the user once, oldest first. A wine that no longer exists is skipped. The old list is only removed when every wine has been handled | +| `useLegacyWishlistImport` | Moves a «Vil prøve» list stored in the browser before login (`kk:wishlist`) to the user once, oldest first. A wine that no longer exists is skipped. The old list is only removed when every wine has been handled. The browser cannot know whose list it was, so on a shared computer it goes to the first user who logs in. It only covers lists from before login came, so we accept that | Frontend tests: `lib/wineLists.test.ts`, `features/lists/**/*.test.ts(x)`, `components/ui/WineCard.test.tsx`, `features/my/MyPage.test.tsx`, and `e2e/lists.spec.ts`, which runs the whole flow against a small fake diff --git a/frontend/src/features/lists/useWineList.test.tsx b/frontend/src/features/lists/useWineList.test.tsx index 7be5e38..5343970 100644 --- a/frontend/src/features/lists/useWineList.test.tsx +++ b/frontend/src/features/lists/useWineList.test.tsx @@ -1,4 +1,4 @@ -import { describe, expect, it } from 'vitest'; +import { describe, expect, it, vi } from 'vitest'; import { render, screen, waitFor } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { gql } from '@apollo/client'; @@ -68,7 +68,7 @@ const wineWith = (myLists: WineListName[]) => ({ /** The wine is in the cache with `myLists`, as after a search or the wine page. */ function renderButtons( mocks: MockLink.MockedResponse[], - { loggedIn = true, lists = [] as WineListName[] } = {}, + { loggedIn = true, lists = [] as WineListName[], extraTried = false } = {}, ) { const cache = createApolloCache(); cache.writeFragment({ @@ -88,6 +88,8 @@ function renderButtons( + {/* A second button for the same list, like a card and the wine page. */} + {extraTried && } } @@ -126,6 +128,40 @@ describe('useWineList', () => { expect(button('WANT_TO_TRY')).toHaveAttribute('aria-pressed', 'true'); }); + it('sends one change at a time, also from two buttons for the same wine and list', async () => { + const answered = vi.fn(); + const { user } = renderButtons( + [ + { + request: { + query: SET_WINE_IN_LIST_MUTATION, + variables: { wineId: WINE_ID, list: 'TRIED', inList: true }, + }, + result: () => { + answered(); + return wineWith(['TRIED']); + }, + delay: 50, + // A second request would be answered too, so it would be seen. + maxUsageCount: 2, + }, + ], + { extraTried: true }, + ); + await ready(); + + const [first, second] = screen.getAllByRole('button', { name: 'TRIED' }); + await user.click(first); + await user.click(second); + + await waitFor(() => expect(answered).toHaveBeenCalled()); + // The second click would have taken the wine off again. It was ignored, not sent and refused. + expect(answered).toHaveBeenCalledOnce(); + expect(screen.queryByRole('alert')).not.toBeInTheDocument(); + expect(first).toHaveAttribute('aria-pressed', 'true'); + expect(second).toHaveAttribute('aria-pressed', 'true'); + }); + it('takes the wine off «Vil prøve» at once when it is marked as tried', async () => { const { user } = renderButtons( [setWineInList('TRIED', true, wineWith(['FAVOURITE', 'TRIED']))], diff --git a/frontend/src/features/lists/useWineList.ts b/frontend/src/features/lists/useWineList.ts index 665209b..56dbff5 100644 --- a/frontend/src/features/lists/useWineList.ts +++ b/frontend/src/features/lists/useWineList.ts @@ -1,5 +1,6 @@ -import { useRef, useState } from 'react'; -import { useFragment, useMutation } from '@apollo/client/react'; +import { useState } from 'react'; +import type { ApolloClient } from '@apollo/client'; +import { useApolloClient, useFragment, useMutation } from '@apollo/client/react'; import { useLocation, useNavigate } from 'react-router'; import { classifyError, ERROR_DETAILS } from '../../lib/errors'; import { listsAfterChange, type WineListName } from '../../lib/wineLists'; @@ -22,6 +23,24 @@ export interface WineListState { error: string | null; } +/** + * The changes on their way, as `${wineId}:${list}`, per Apollo client (the app has one; each test + * has its own). One change at a time per wine and list: a second click while the first is on its + * way is ignored, also when it comes from another button for the same wine (a heart on a card and + * «Favoritt» on the wine page). So two requests can never arrive in the wrong order and leave the + * list the wrong way round. + */ +const pendingByClient = new WeakMap>(); + +function pendingFor(client: ApolloClient): Set { + let pending = pendingByClient.get(client); + if (!pending) { + pending = new Set(); + pendingByClient.set(client, pending); + } + return pending; +} + /** * Whether a wine is on one of the user's lists, and a function to change it. * @@ -32,12 +51,10 @@ export interface WineListState { */ export function useWineList(wineId: string, list: WineListName): WineListState { const { user, loading: checkingLogin } = useAuth(); + const client = useApolloClient(); const navigate = useNavigate(); const location = useLocation(); const [error, setError] = useState(null); - // One change at a time: a second click while the first is on its way is ignored, so two - // requests can never arrive in the wrong order and leave the list the wrong way round. - const pending = useRef(false); const [setWineInList] = useMutation( SET_WINE_IN_LIST_MUTATION, ); @@ -52,14 +69,17 @@ export function useWineList(wineId: string, list: WineListName): WineListState { async function change() { // Until we know who is logged in, a click could go either way. - if (checkingLogin || pending.current) return; + if (checkingLogin) return; if (!user) { await navigate('/konto', { state: { from: location.pathname + location.search } }); return; } + const pending = pendingFor(client); + const key = `${wineId}:${list}`; + if (pending.has(key)) return; const inList = !isSaved; - pending.current = true; + pending.add(key); setError(null); try { await setWineInList({ @@ -80,7 +100,7 @@ export function useWineList(wineId: string, list: WineListName): WineListState { } catch (failure) { setError(`Vi fikk ikke lagret endringen. ${ERROR_DETAILS[classifyError(failure)]}`); } finally { - pending.current = false; + pending.delete(key); } } diff --git a/frontend/src/lib/wineLists.ts b/frontend/src/lib/wineLists.ts index 5f99ff4..9e5c2ef 100644 --- a/frontend/src/lib/wineLists.ts +++ b/frontend/src/lib/wineLists.ts @@ -6,6 +6,7 @@ export type WineListName = (typeof WINE_LISTS)[number]; * The lists a wine is on after putting it on `list` (inList: true) or taking it off. The same * rules as the API, so the buttons can change at once, before the answer comes: * «Har prøvd» takes the wine off «Vil prøve», and the order is fixed, as in the API. + * The API's version is in backend/src/lists/wine-lists.ts: change both together. */ export function listsAfterChange( current: readonly WineListName[], From 7d57380adb87c323c43a4b91cde6b1878cd8fa41 Mon Sep 17 00:00:00 2001 From: Magnus Andreas Igesund Nerland Date: Thu, 19 Nov 2026 20:17:14 +0100 Subject: [PATCH 04/11] =?UTF-8?q?feat(frontend):=20=C2=ABMin=20side=C2=BB?= =?UTF-8?q?=20with=20the=20top=204=20and=20each=20list,=20and=20a=20page?= =?UTF-8?q?=20for=20each=20list=20(#73)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/e2e/lists.spec.ts | 48 +++- frontend/src/app/App.test.tsx | 1 + frontend/src/app/App.tsx | 11 +- frontend/src/components/layout/Header.tsx | 2 +- .../src/components/ui/WineCard.module.css | 12 + .../src/components/ui/WineList.module.css | 17 ++ frontend/src/components/ui/WineList.tsx | 38 ++- .../src/features/auth/AccountPage.test.tsx | 8 +- frontend/src/features/auth/AccountPage.tsx | 4 +- frontend/src/features/lists/api/listCache.ts | 2 +- .../src/features/lists/api/myWineListQuery.ts | 13 +- .../src/features/lists/api/useMyWineList.ts | 11 +- .../src/features/lists/api/wineCardFields.ts | 20 ++ .../components/WineCardListButtons.module.css | 15 +- frontend/src/features/my/MyListPage.test.tsx | 211 ++++++++++++++++ frontend/src/features/my/MyListPage.tsx | 33 +++ .../src/features/my/MyListView.module.css | 35 +++ frontend/src/features/my/MyListView.tsx | 101 ++++++++ frontend/src/features/my/MyPage.test.tsx | 227 +++++++++++------- frontend/src/features/my/MyPage.tsx | 9 +- frontend/src/features/my/MyView.module.css | 39 +-- frontend/src/features/my/MyView.tsx | 184 ++++++-------- .../src/features/my/api/myProfileQuery.ts | 67 ++++++ frontend/src/features/my/api/useMyProfile.ts | 67 ++++++ .../my/components/TopFavourites.module.css | 143 +++++++++++ .../features/my/components/TopFavourites.tsx | 85 +++++++ frontend/src/features/my/myLists.ts | 49 ++++ frontend/src/features/my/useRemovalMessage.ts | 37 +++ frontend/src/lib/format.test.ts | 11 + frontend/src/lib/format.ts | 11 + 30 files changed, 1237 insertions(+), 274 deletions(-) create mode 100644 frontend/src/features/lists/api/wineCardFields.ts create mode 100644 frontend/src/features/my/MyListPage.test.tsx create mode 100644 frontend/src/features/my/MyListPage.tsx create mode 100644 frontend/src/features/my/MyListView.module.css create mode 100644 frontend/src/features/my/MyListView.tsx create mode 100644 frontend/src/features/my/api/myProfileQuery.ts create mode 100644 frontend/src/features/my/api/useMyProfile.ts create mode 100644 frontend/src/features/my/components/TopFavourites.module.css create mode 100644 frontend/src/features/my/components/TopFavourites.tsx create mode 100644 frontend/src/features/my/myLists.ts create mode 100644 frontend/src/features/my/useRemovalMessage.ts diff --git a/frontend/e2e/lists.spec.ts b/frontend/e2e/lists.spec.ts index 0acb95f..8dd26ab 100644 --- a/frontend/e2e/lists.spec.ts +++ b/frontend/e2e/lists.spec.ts @@ -3,7 +3,7 @@ import { expect, test, type Page } from '@playwright/test'; import { stubGraphQL } from './support/graphql'; /* - * E2E for the wine lists: the buttons on the wine cards and the wine page, «Mine anmeldelser», + * E2E for the wine lists: the buttons on the wine cards and the wine page, the list pages, * login on the way, and the move of an old «Vil prøve» list from the browser. * Runs against `vite preview` with a small fake API that remembers the lists like the real one. */ @@ -45,7 +45,7 @@ const connection = (nodes: object[]) => ({ /** * A fake API with three wines. It keeps each wine's lists, and when it was added to each list, - * so «Mine anmeldelser» shows the newest first. `loggedIn: false` starts as a visitor, and + * so the lists show the newest first. `loggedIn: false` starts as a visitor, and * `Login` logs Kari in, as the real API does with the session cookie. */ async function fakeApi(page: Page, { loggedIn = true } = {}) { @@ -57,6 +57,10 @@ async function fakeApi(page: Page, { loggedIn = true } = {}) { const listsOf = (wineId: string): ListName[] => me ? ORDER.filter((list) => added.has(`${wineId}:${list}`)) : []; const wine = (wineId: string) => ({ ...wineFields(wineId), myLists: listsOf(wineId) }); + const newestOn = (list: ListName) => + ids + .filter((id) => added.has(`${id}:${list}`)) + .sort((a, b) => (added.get(`${b}:${list}`) ?? 0) - (added.get(`${a}:${list}`) ?? 0)); await stubGraphQL(page, { Me: () => ({ data: { me } }), @@ -97,11 +101,25 @@ async function fakeApi(page: Page, { loggedIn = true } = {}) { data: { setWineInList: { __typename: 'Wine', id: wineId, myLists: listsOf(wineId) } }, }; }, - MyWineList: ({ list }: { list: ListName }) => { - const onList = ids - .filter((id) => added.has(`${id}:${list}`)) - .sort((a, b) => (added.get(`${b}:${list}`) ?? 0) - (added.get(`${a}:${list}`) ?? 0)); - return { data: { me: me && { ...me, wines: connection(onList.map(wine)) } } }; + MyWineList: ({ list }: { list: ListName }) => ({ + data: { me: me && { ...me, wines: connection(newestOn(list).map(wine)) } }, + }), + MyProfile: ({ preview }: { preview: number }) => { + const page = (list: ListName) => { + const all = newestOn(list); + return { ...connection(all.slice(0, preview).map(wine)), totalCount: all.length }; + }; + return { + data: { + me: me && { + ...me, + topFavourites: [], + favourites: page('FAVOURITE'), + wantToTry: page('WANT_TO_TRY'), + tried: page('TRIED'), + }, + }, + }; }, }); } @@ -118,7 +136,7 @@ async function expectNoAxeViolations(page: Page) { } test.describe('Listene', () => { - test('bokmerket på et kort legger vinen på «Mine anmeldelser», og tar den av igjen', async ({ + test('bokmerket på et kort legger vinen på «Vil prøve», og tar den av igjen', async ({ page, }) => { await fakeApi(page); @@ -132,7 +150,7 @@ test.describe('Listene', () => { await expect(bookmark).toHaveAttribute('aria-pressed', 'true'); // A new page load: the list comes from the API, not from this browser. - await page.goto('./mine'); + await page.goto('./mine/vil-prove'); await expect(myList(page).getByRole('link')).toHaveText(['Rødvin 2']); await expectNoAxeViolations(page); @@ -141,7 +159,7 @@ test.describe('Listene', () => { await page.keyboard.press('Enter'); await expect(page.getByText('Fjernet fra listen. Listen er tom.')).toBeAttached(); - await expect(page.getByRole('heading', { level: 2, name: 'Vil prøve' })).toBeFocused(); + await expect(page.getByRole('heading', { level: 1, name: 'Vil prøve' })).toBeFocused(); await expect(page.getByText(/Du har ikke lagret noen viner ennå/)).toBeVisible(); }); @@ -159,7 +177,7 @@ test.describe('Listene', () => { await expect(tried).toHaveAttribute('aria-pressed', 'true'); await expect(wantToTry).toHaveAttribute('aria-pressed', 'false'); - await page.goto('./mine'); + await page.goto('./mine/vil-prove'); await expect(page.getByText(/Du har ikke lagret noen viner ennå/)).toBeVisible(); }); @@ -188,7 +206,7 @@ test.describe('Listene', () => { localStorage.setItem('kk:wishlist', JSON.stringify(['2', '1'])); }); await fakeApi(page); - await page.goto('./mine'); + await page.goto('./mine/vil-prove'); await expect(myList(page).getByRole('link')).toHaveText(['Rødvin 1', 'Rødvin 2']); await expect.poll(() => page.evaluate(() => localStorage.getItem('kk:wishlist'))).toBeNull(); @@ -198,10 +216,14 @@ test.describe('Listene', () => { await expect(myList(page).getByRole('link')).toHaveText(['Rødvin 1', 'Rødvin 2']); }); - test('har ingen axe-brudd på en tom «Mine anmeldelser»', async ({ page }) => { + test('har ingen axe-brudd på en tom «Min side» og en tom liste', async ({ page }) => { await fakeApi(page); await page.goto('./mine'); await expect(page.getByText(/Du har ikke lagret noen viner ennå/)).toBeVisible(); await expectNoAxeViolations(page); + + await page.goto('./mine/har-provd'); + await expect(page.getByText(/Du har ikke merket noen viner som prøvd ennå/)).toBeVisible(); + await expectNoAxeViolations(page); }); }); diff --git a/frontend/src/app/App.test.tsx b/frontend/src/app/App.test.tsx index dbb4510..7d6b144 100644 --- a/frontend/src/app/App.test.tsx +++ b/frontend/src/app/App.test.tsx @@ -36,6 +36,7 @@ describe('AppRoutes', () => { ['/vin/abc', 'Fant ikke vinen'], // Behind login: a visitor is sent to /konto. ['/mine', 'Logg inn'], + ['/mine/favoritter', 'Logg inn'], ])('shows the right page for %s', async (route, heading) => { renderRoute(route); expect(await findHeading(heading)).toBeInTheDocument(); diff --git a/frontend/src/app/App.tsx b/frontend/src/app/App.tsx index ea5ca11..76a48da 100644 --- a/frontend/src/app/App.tsx +++ b/frontend/src/app/App.tsx @@ -9,6 +9,7 @@ const LandingPage = lazy(() => import('../features/landing/LandingPage')); const SearchPage = lazy(() => import('../features/search/SearchPage')); const WinePage = lazy(() => import('../features/wine/WinePage')); const MyPage = lazy(() => import('../features/my/MyPage')); +const MyListPage = lazy(() => import('../features/my/MyListPage')); const AccountPage = lazy(() => import('../features/auth/AccountPage')); /** BASE_URL kommer fra `base` i vite.config.ts (f.eks. «/project2/»). */ @@ -21,7 +22,7 @@ export function AppRoutes() { } /> } /> } /> - {/* The lists belong to a user, so the page asks visitors to log in and sends them back. */} + {/* The lists belong to a user, so the pages ask visitors to log in and send them back. */} } /> + + + + } + /> } /> } /> diff --git a/frontend/src/components/layout/Header.tsx b/frontend/src/components/layout/Header.tsx index b721b04..d8b0759 100644 --- a/frontend/src/components/layout/Header.tsx +++ b/frontend/src/components/layout/Header.tsx @@ -35,7 +35,7 @@ export function Header({ showSearch = true }: HeaderProps) {
  • - Mine anmeldelser + Min side
  • {/* Nothing until we know who is logged in, so the menu does not flicker. */} diff --git a/frontend/src/components/ui/WineCard.module.css b/frontend/src/components/ui/WineCard.module.css index cf22807..9bbbdc5 100644 --- a/frontend/src/components/ui/WineCard.module.css +++ b/frontend/src/components/ui/WineCard.module.css @@ -111,6 +111,18 @@ color: var(--color-text); } +/* Narrow cards, such as four in a row: the bottle above the text, like a poster. */ +@container (max-width: 17rem) { + .visual, + .body { + grid-column: 1 / -1; + } + + .visual { + width: auto; + } +} + /* Smale kort: stable vurderingene. */ @container (max-width: 20rem) { .ratingRow dt { diff --git a/frontend/src/components/ui/WineList.module.css b/frontend/src/components/ui/WineList.module.css index 5b6e4aa..695cc7b 100644 --- a/frontend/src/components/ui/WineList.module.css +++ b/frontend/src/components/ui/WineList.module.css @@ -11,3 +11,20 @@ .grid > li { display: grid; } + +/* Four wines: one, two or four columns, so the last line is never a single wine. */ +.row { + grid-template-columns: minmax(0, 1fr); +} + +@media (min-width: 36rem) { + .row { + grid-template-columns: repeat(2, minmax(0, 1fr)); + } +} + +@media (min-width: 64rem) { + .row { + grid-template-columns: repeat(4, minmax(0, 1fr)); + } +} diff --git a/frontend/src/components/ui/WineList.tsx b/frontend/src/components/ui/WineList.tsx index 27b92f2..63480c4 100644 --- a/frontend/src/components/ui/WineList.tsx +++ b/frontend/src/components/ui/WineList.tsx @@ -7,6 +7,14 @@ interface WineListProps { wines: WineSummary[]; headingLevel?: 'h2' | 'h3' | 'h4'; label?: string; + /** A numbered list (an ol element), for lists where the order means something, such as a top 4. */ + ordered?: boolean; + /** + * `grid` (default): as many columns as there is room for, for long lists. + * `row`: four, two or one columns, for a short list of four wines, so it never ends with one + * wine alone on a line. + */ + layout?: 'grid' | 'row'; ref?: Ref; } @@ -17,14 +25,28 @@ interface WineListProps { * (list-style: none) as a list, so «list, 24 items» is never read. The same goes for the * other lists without bullets in the app. Lists inside