Skip to content

feat(quiz): mark a poll's recommended option with a pill, and put it first - #498

Merged
vite-hub[bot] merged 8 commits into
mainfrom
feat/quiz-recommended
Nov 28, 2026
Merged

vite-hub[bot] merged 8 commits into
mainfrom
feat/quiz-recommended

Conversation

@onmax

@onmax onmax commented Nov 28, 2026

Copy link
Copy Markdown
Owner

A poll had no way to say which option the author picks. - [ ] Neon {recommended} now draws a "Recommended" pill after the option's text, and {recommended="My pick"} sets the pill's words. Stacked on #497.

Comark already moves an attribute after a task item's text onto its li and drops it from the text, in tight and loose lists and before a > reason, so the parse plugin reads it there and the option's key stays the hash of its text alone. A poll lists its recommended options first, in the order written, then the rest. The option gets data-recommended with the pill's words, and the pill is .cqz-pill (data-slot="recommended") inside the label, so a screen reader hears it with the option.

On a ::question the mark would give the answer away, so it's dropped and reported as comark/quiz/recommended-in-question (COMARK4017), with a doctor page.

Decisions:

  • The pill sits inside .cqz-label, after the text, so it wraps with it. It's --comark-accent on --comark-foreground, a 0.75rem rounded pill, no motion.
  • Several options may be recommended; they keep their order at the top.
  • The labels option gains recommended, so a translated page can say "Recomendado".
  • Drop reads only data-key from the options, so the pill's text doesn't reach stored answers.

Checked:

  • packages/quiz/test/quiz.test.ts: the recommended option renders first with the pill and data-recommended, a custom pill label, the labels option, the key and id unchanged by the mark, the question issue, and the mark dropped on a question.
  • test/doctor.test.ts for the quiz rules (the new page's incorrect example reports only its rule, the correct one nothing), format, lint, typecheck of quiz and the lint rules, vite-doctor on the package and pnpm run lint:docs.

Docs: a "Recommended" section under Poll, the recommended label, the slot and the attribute, and the comark-ui skill reference.

Plan: https://drop.vitehub.dev/d/wtn1zg3tajmt/social-poll-drop-plan

@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-11-28T12:20:43.329558Z
We couldn’t complete this review. Comment @codex review to try again.
09f5271 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.

@pkg-pr-new

pkg-pr-new Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

comark-annotate

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

comark-badge

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

comark-bundle

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

comark-cards

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

comark-carousel

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

comark-cast

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

comark-charts

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

comark-chat

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

comark-chips

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

comark-cjk

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

comark-code

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

comark-code-notes

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

comark-colors

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

comark-comments

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

comark-critic

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

comark-deflist

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

comark-details

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

comark-diagrams

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

comark-diff

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

comark-embed

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

comark-fields

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

comark-figure

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

comark-file-tree

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

comark-footnotes

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

comark-git-graph

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

comark-github

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

comark-icon

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

comark-include

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

comark-keys

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

comark-links

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

comark-linter

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

comark-magic-move

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

comark-mark

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

markdown-it-to-comark

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

marked-to-comark

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

comark-mathml

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

comark-media

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

comark-metrics

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

migrate-to-comark

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

comark-motion

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

comark-outline

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

comark-properties

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

comark-qr

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

comark-quiz

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

comark-reading-time

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

remark-to-comark

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

comark-sources

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

comark-steps

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

comark-table

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

comark-tabs

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

comark-tests

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

comark-time

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

comark-ui

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

comark-xref

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

comark-zoom

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

commit: f807904

@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

A blank line before an option’s rationale can silently disable {recommended}. Please handle that layout before merging.

Approach: Sorting after the vote keys are computed is the right way to put recommendations first without changing stored answers.

Reviewed changes across quiz parsing, HTML rendering, and authoring tools:

  • Parsing and vote identity: Checked recommendation detection, stable ordering, and the keys used by hosts.
  • Rendering and localization: Checked the pill, custom and translated labels, data-recommended, and narrow-screen rendering.
  • Validation and authoring: Checked the question diagnostic, Doctor examples, component metadata, docs, and skill reference.
  • Verification: The workspace build, 41 quiz tests, and 19 focused Doctor tests passed. Separate parse-and-render and Chromium checks reproduced the two findings below.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using gpt-6.2-sol(high) | 𝕏

Comment thread packages/quiz/src/read.ts Resolved
Comment thread packages/quiz/src/styles.ts Resolved
@vite-hub

vite-hub Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor
Session Status Started Duration
Pending Completed Not started —
View session Waiting 2026-11-28T13:36:55.053Z 3m 50s
View session Completed 2026-11-28T13:21:03.312Z 7m 51s
View session Cancelled 2026-11-28T13:14:51.193Z 2m 49s
View session Waiting 2026-11-28T12:47:07.767Z 4m 35s
View session Last seen running 2026-11-28T12:31:20.365Z 2s

Latest result

Pull request merged.

Final answers

Session

Pull request merged.

View session

PR #498 is ready to merge. Its parent #497 is in main, all hosted checks passed, and both resolved findings remain fixed: loose task items retain their recommendations, and long pills wrap at narrow widths. All 44 quiz tests passed locally, and lint exited successfully with warnings. No repair push was needed.

Session

Resolved the merge conflicts and pushed f807904, preserving multiline option labels, recommendation pills, and stable vote keys. All 44 quiz tests and formatting passed. The pnpm wrapper hit a local SQLite error, but lint ran directly and reported warnings only. Both historical Pullfrog threads were already resolved, and their fixes remain intact. Awaiting hosted checks.

View session

Resolved the merge conflicts and pushed f807904, preserving multiline option labels, recommendation pills, and stable vote keys. All 44 quiz tests and formatting passed. The pnpm wrapper hit a local SQLite error, but lint ran directly and reported warnings only. Both historical Pullfrog threads were already resolved, and their fixes remain intact. Awaiting hosted checks.

Session

Updated the branch with feat/quiz-multiline-options because feat/quiz-multiline-options changed e2e/quiz.e2e.ts after its checks ran; waiting for checks on the new head.

Session

Updated the branch with feat/quiz-multiline-options because feat/quiz-multiline-options changed e2e/quiz.e2e.ts after its checks ran; waiting for checks on the new head.

View session

PR #498 is ready with no further repair. The loose-list recommendation and narrow-screen pill fixes are already in the reviewed commit, and both threads are resolved. All hosted checks and 43 local quiz tests passed. Local lint passed with warnings; the sandbox blocked Playwright’s local server, but hosted E2E passed.

@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. No P0 or P1 findings remain.

Reviewed changes in f5b81f9:

  • Recognized recommendations in loose task lists. The parser reads the checkbox paragraph, not the rationale, and still reports and drops recommendations on questions.
  • Wrapped long recommendation pills. The pill stays within its option label at a 320px viewport.
  • Verified both fixes. All 43 quiz parse-and-render tests and 16 Chromium quiz tests passed.

Pullfrog  | View workflow run | Using gpt-6.2-sol(high) | 𝕏

@vite-hub
vite-hub Bot changed the base branch from feat/quiz-multiline-options to main November 28, 2026 13:08
@onmax

onmax commented Nov 28, 2026

Copy link
Copy Markdown
Owner Author

Before/after on Drop

@vite-hub
vite-hub Bot merged commit 9acb5e9 into main Nov 28, 2026
7 checks passed
@vite-hub
vite-hub Bot deleted the feat/quiz-recommended branch November 28, 2026 13:43
@github-actions github-actions Bot mentioned this pull request Nov 28, 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