Skip to content

feat(quiz): columns lays a poll's or question's options out as a grid of picture cards - #520

Merged
vite-hub[bot] merged 6 commits into
mainfrom
feat/quiz-option-cards
Dec 3, 2026
Merged

vite-hub[bot] merged 6 commits into
mainfrom
feat/quiz-option-cards

Conversation

@onmax

@onmax onmax commented Dec 3, 2026

Copy link
Copy Markdown
Owner

A poll that asks reviewers to pick photos or screenshots had to be a column of text rows. columns lays a ::poll or ::question's options out as a wrapping grid of cards instead:

::poll{#album multiple columns=3}
Which photos go in the album?

- [ ] ![Two people in front of a temple by a river](a.jpg) Wat Arun
- [ ] ![A selfie by a stove](b.jpg) Cooking class {recommended}
  > The only one with both of us.
- [ ] ![A beach at dusk](c.jpg) Railay
::

columns takes 2 to 6, and a bare columns means 3. An option that starts with an image is a picture card: the image on top, every picture cropped to one shape (--cqz-picture-ratio, 4 / 3 by default), the label under it, and the checkbox or radio in the corner. Other options are text cards. The whole card is the label of a real checkbox or radio, so a click anywhere picks it and the keyboard works as in rows. The picked card gets a thicker border and the filled mark, not a color alone. The grid drops columns by the block's own width (a container query, so a card stays at least 8rem wide).

multiple, {recommended}, shuffle, number, closes, note, the results and right-answer states, print and dark mode work in cards. A > line under an option is the reason revealed after Check in a question, and the card's description in a poll (rows don't show one). A picture in a card doesn't zoom.

Reported through meta.issues: a columns outside 2 to 6 or not a number (comark/quiz/invalid-columns, COMARK4018, the nearest valid number is used) and a picture option with no alt text (comark/quiz/picture-alt, COMARK4019). Both have doctor pages.

Without columns the HTML is unchanged: a test renders a fixture of polls, a question and a recall card, with and without pictures, and compares it with the output of main byte for byte.

Also in here: the /info entry, quiz-picture in comark-ui's tag list, the package page (a Cards section with a live example), the README and the comark-ui skill's quiz reference.

Checked: pnpm ready passes, and the quiz e2e files pass, including a new e2e/quiz-cards.e2e.ts (grid, columns dropping when narrow, click on a picture or caption, keyboard, check, poll results, dark mode).

ðŸĪ– Generated with Claude Code

â€Ķ of cards, picture cards for options that start with an image
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-12-03T10:19:08.624149Z
We couldn’t complete this review. Comment @codex review to try again.
738ccd7 PR opened
â„đïļ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@vite-hub

vite-hub Bot commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor
Session Status Started Duration
Pending Completed Not started —

Latest result

Pull request merged.

Final answers

Session

Pull request merged.

Session

Pushed 1a0d770 and resolved the P1 review thread. Unchanged image-only row polls keep their saved votes, while image-only card polls still get distinct IDs. All 67 quiz tests passed, and lint completed with warnings outside the changed files. Waiting for CI on the repair commit.

Session

Pushed 1a0d770 and resolved the P1 review thread. Unchanged image-only row polls keep their saved votes, while image-only card polls still get distinct IDs. All 67 quiz tests passed, and lint completed with warnings outside the changed files. Waiting for CI on the repair commit.

Session

Pushed 1a0d770 and resolved the P1 review thread. Unchanged image-only row polls keep their saved votes, while image-only card polls still get distinct IDs. All 67 quiz tests passed, and lint completed with warnings outside the changed files. Waiting for CI on the repair commit.

Session

Pushed 1a0d770 and resolved the P1 review thread. Unchanged image-only row polls keep their saved votes, while image-only card polls still get distinct IDs. All 67 quiz tests passed, and lint completed with warnings outside the changed files. Waiting for CI on the repair commit.

Session

Pushed 1a0d770 and resolved the P1 review thread. Unchanged image-only row polls keep their saved votes, while image-only card polls still get distinct IDs. All 67 quiz tests passed, and lint completed with warnings outside the changed files. Waiting for CI on the repair commit.

Session

Pushed 1a0d770 and resolved the P1 review thread. Unchanged image-only row polls keep their saved votes, while image-only card polls still get distinct IDs. All 67 quiz tests passed, and lint completed with warnings outside the changed files. Waiting for CI on the repair commit.

Session

Pushed 1a0d770 and resolved the P1 review thread. Unchanged image-only row polls keep their saved votes, while image-only card polls still get distinct IDs. All 67 quiz tests passed, and lint completed with warnings outside the changed files. Waiting for CI on the repair commit.

Session

Pushed 1a0d770 and resolved the P1 review thread. Unchanged image-only row polls keep their saved votes, while image-only card polls still get distinct IDs. All 67 quiz tests passed, and lint completed with warnings outside the changed files. Waiting for CI on the repair commit.

@pkg-pr-new

pkg-pr-new Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

comark-annotate

pnpm add https://pkg.pr.new/comark-annotate@520

comark-badge

pnpm add https://pkg.pr.new/comark-badge@520

comark-bundle

pnpm add https://pkg.pr.new/comark-bundle@520

comark-cards

pnpm add https://pkg.pr.new/comark-cards@520

comark-carousel

pnpm add https://pkg.pr.new/comark-carousel@520

comark-cast

pnpm add https://pkg.pr.new/comark-cast@520

comark-charts

pnpm add https://pkg.pr.new/comark-charts@520

comark-chat

pnpm add https://pkg.pr.new/comark-chat@520

comark-chips

pnpm add https://pkg.pr.new/comark-chips@520

comark-cjk

pnpm add https://pkg.pr.new/comark-cjk@520

comark-code

pnpm add https://pkg.pr.new/comark-code@520

comark-code-notes

pnpm add https://pkg.pr.new/comark-code-notes@520

comark-colors

pnpm add https://pkg.pr.new/comark-colors@520

comark-comments

pnpm add https://pkg.pr.new/comark-comments@520

comark-critic

pnpm add https://pkg.pr.new/comark-critic@520

comark-deflist

pnpm add https://pkg.pr.new/comark-deflist@520

comark-details

pnpm add https://pkg.pr.new/comark-details@520

comark-diagrams

pnpm add https://pkg.pr.new/comark-diagrams@520

comark-diff

pnpm add https://pkg.pr.new/comark-diff@520

comark-embed

pnpm add https://pkg.pr.new/comark-embed@520

comark-fields

pnpm add https://pkg.pr.new/comark-fields@520

comark-figure

pnpm add https://pkg.pr.new/comark-figure@520

comark-file-tree

pnpm add https://pkg.pr.new/comark-file-tree@520

comark-footnotes

pnpm add https://pkg.pr.new/comark-footnotes@520

comark-git-graph

pnpm add https://pkg.pr.new/comark-git-graph@520

comark-github

pnpm add https://pkg.pr.new/comark-github@520

comark-icon

pnpm add https://pkg.pr.new/comark-icon@520

comark-include

pnpm add https://pkg.pr.new/comark-include@520

comark-keys

pnpm add https://pkg.pr.new/comark-keys@520

comark-links

pnpm add https://pkg.pr.new/comark-links@520

comark-linter

pnpm add https://pkg.pr.new/comark-linter@520

comark-magic-move

pnpm add https://pkg.pr.new/comark-magic-move@520

comark-mark

pnpm add https://pkg.pr.new/comark-mark@520

markdown-it-to-comark

pnpm add https://pkg.pr.new/markdown-it-to-comark@520

marked-to-comark

pnpm add https://pkg.pr.new/marked-to-comark@520

comark-mathml

pnpm add https://pkg.pr.new/comark-mathml@520

comark-media

pnpm add https://pkg.pr.new/comark-media@520

comark-metrics

pnpm add https://pkg.pr.new/comark-metrics@520

migrate-to-comark

pnpm add https://pkg.pr.new/migrate-to-comark@520

comark-motion

pnpm add https://pkg.pr.new/comark-motion@520

comark-outline

pnpm add https://pkg.pr.new/comark-outline@520

comark-properties

pnpm add https://pkg.pr.new/comark-properties@520

comark-qr

pnpm add https://pkg.pr.new/comark-qr@520

comark-quiz

pnpm add https://pkg.pr.new/comark-quiz@520

comark-reading-time

pnpm add https://pkg.pr.new/comark-reading-time@520

remark-to-comark

pnpm add https://pkg.pr.new/remark-to-comark@520

comark-social

pnpm add https://pkg.pr.new/comark-social@520

comark-sources

pnpm add https://pkg.pr.new/comark-sources@520

comark-steps

pnpm add https://pkg.pr.new/comark-steps@520

comark-table

pnpm add https://pkg.pr.new/comark-table@520

comark-tabs

pnpm add https://pkg.pr.new/comark-tabs@520

comark-tests

pnpm add https://pkg.pr.new/comark-tests@520

comark-time

pnpm add https://pkg.pr.new/comark-time@520

comark-ui

pnpm add https://pkg.pr.new/comark-ui@520

comark-xref

pnpm add https://pkg.pr.new/comark-xref@520

comark-zoom

pnpm add https://pkg.pr.new/comark-zoom@520

commit: 1a0d770

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Reordering picture cards with the same caption can move saved votes to the wrong photo, and clicking a caption link selects the card instead of opening the link.

Approach: An opt-in grid that reuses the native quiz inputs and host protocol is the right fit, but the grid needs to preserve option identity and link behavior.

Reviewed changes — I traced the new layout from Markdown through HTML and the browser runtime. All 62 quiz unit tests and 43 Chromium quiz tests passed; the two cases above were reproduced separately.

  • Parsing and validation: Reviewed columns, leading-image extraction, zoom suppression, and the new diagnostics.
  • Rendering and interaction: Reviewed the responsive grid, native controls, descriptions, answer key, and host vote and result handling.
  • Integration: Reviewed preset registration, component metadata, docs, and the row-output regression fixture.

PullfrogÂ Â ï―œ Fix all ➔ ï―œ Fix 👍s ➔ ï―œ View workflow run ï―œ Using pullfrog(medium) ï―œ 𝕏

Comment thread packages/quiz/src/read.ts Resolved
Comment thread packages/quiz/src/styles.ts Resolved

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

No new blocking issues found in this commit. The two existing P1 threads remain open.

Reviewed changes — I reviewed the URL changes in the two quiz Doctor pages.

  • Updated image URLs: Replaced relative image paths in the invalid-columns and picture-alt examples with external URLs. The docs link checker now skips those URLs because they are off-site.

Non-blocking

  • P2 — Class: live examples reference missing images. Both new example.com image URLs return HTTP 404, so the Correct and Incorrect previews still show broken pictures. Use checked-in assets such as /before.png and /after.png, with matching captions and alt text, so both pages demonstrate the cards and the link checker verifies the assets. See invalid-columns.md and picture-alt.md.

PullfrogÂ Â ï―œ Fix it ➔ ï―œ View workflow run ï―œ Using pullfrog(medium) ï―œ 𝕏

@onmax

onmax commented Dec 3, 2026

Copy link
Copy Markdown
Owner Author

Before/after on Drop

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Adding columns to an existing picture poll can make saved votes disappear even though the poll and its options are unchanged.

Reviewed changes — I reviewed the picture key and caption link fixes and the Doctor example updates. All 63 quiz unit tests and 10 Chromium card tests passed.

  • Disambiguated picture keys: Added the image source to the key so photos with the same caption retain their identities when reordered.
  • Restored caption navigation: Raised caption links above the card overlay and verified that clicking the picture still selects the card.
  • Replaced missing example images: Switched both Doctor pages to checked-in screenshots.

PullfrogÂ Â ï―œ Fix all ➔ ï―œ Fix 👍s ➔ ï―œ View workflow run ï―œ Using pullfrog(medium) ï―œ 𝕏

Comment thread packages/quiz/src/read.ts Resolved

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Distinct picture-only polls can now share a generated ID and overwrite each other’s saved votes.

Reviewed changes — I reviewed aeb4a9e against the previous review. All 65 quiz unit tests passed; I reproduced the generated-ID collision separately through the public renderer.

  • Preserved existing option keys: Kept legacy keys for unambiguous options when toggling columns, while retaining source-derived keys for cards with shared captions.
  • Moved generated ID calculation: Computed fallback IDs before extracting pictures and added row-to-grid identity tests for polls with and without explicit IDs.

PullfrogÂ Â ï―œ Fix all ➔ ï―œ Fix 👍s ➔ ï―œ View workflow run ï―œ Using pullfrog(medium) ï―œ 𝕏

Comment thread packages/quiz/src/read.ts Resolved

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

The collision fix changes the ID of existing image-only row polls, so saved votes no longer restore even when the Markdown is unchanged.

Reviewed changes — I reviewed d493a81 against the previous review. All 66 quiz unit tests passed; I verified the old and new IDs separately through the legacy formula and public renderer.

  • Distinguished image-only polls: Added image sources to generated IDs for options without captions and tested that distinct polls get distinct IDs in both layouts.

PullfrogÂ Â ï―œ Fix all ➔ ï―œ Fix 👍s ➔ ï―œ View workflow run ï―œ Using pullfrog(medium) ï―œ 𝕏

Comment thread packages/quiz/src/read.ts Resolved

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes — No P0 or P1 findings remain, and all 67 quiz unit tests passed.

  • Restored legacy row IDs. Unchanged image-only row polls keep their generated IDs and option keys, so saved votes still restore.
  • Kept image-only card polls distinct. Generated card IDs still distinguish different photo sets and stay stable across column counts. The README documents using an explicit #id when switching between rows and cards.

PullfrogÂ Â ï―œ View workflow run ï―œ Using pullfrog(medium) ï―œ 𝕏

@vite-hub
vite-hub Bot merged commit 59d6a37 into main Dec 3, 2026
7 checks passed
@vite-hub
vite-hub Bot deleted the feat/quiz-option-cards branch December 3, 2026 11:29
@github-actions github-actions Bot mentioned this pull request Dec 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant