Publish the Toronto 2026 candidate questionnaire - #69
Conversation
Adds /toronto/vote/survey-questions, a noindexed page listing every question we ask Toronto's 2026 municipal candidates: five Stage One yes/no questions, sixteen Stage Two trilemmas across six sections, and ten additional questions. The page is kept out of search results two ways: page metadata sets noindex/nofollow/nocache, and robots.txt disallows the path for `*` as well as for each AI crawler that previously had a blanket `Allow: /`. It is not in the sitemap, which is a hand-maintained list. "Download PDF" triggers the browser print dialog, reusing the existing @media print rules in globals.css the same way memo sharing does. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Greptile SummaryThe PR adds a typed, static Toronto 2026 candidate-questionnaire page with print controls and explicit search-engine exclusion.
Confidence Score: 4/5The PR appears safe to merge, with a non-blocking print-layout issue that should be corrected so consecutive questions remain visually separated in saved PDFs. The new route, crawler policy, metadata, and typed content are internally consistent; the only accepted issue is that the global print rule overrides the margins used to separate question articles. Files Needing Attention: src/app/toronto/vote/survey-questions/page.tsx
|
| Filename | Overview |
|---|---|
| src/app/robots.ts | Adds the questionnaire path to the wildcard and named AI-crawler disallow rules, consistent with the stated noindex policy. |
| src/app/toronto/vote/survey-questions/DownloadPdfButton.tsx | Adds a client-side print control that is correctly hidden by the existing global print stylesheet. |
| src/app/toronto/vote/survey-questions/page.tsx | Adds the complete responsive questionnaire presentation, but its article spacing is erased when the print stylesheet runs. |
| src/app/toronto/vote/survey-questions/questions.ts | Defines the questionnaire as straightforward typed static data with the described five, sixteen, and ten-question groups. |
Prompt To Fix All With AI
### Issue 1
src/app/toronto/vote/survey-questions/page.tsx:103
**Print removes question spacing**
When a visitor prints or saves the questionnaire as a PDF, the global print rule sets every `article` margin to zero with `!important`, overriding the `mt-10` and `mt-12` utilities and placing consecutive questions directly against the preceding option grids.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Reviews (1): Last reviewed commit: "Publish the Toronto 2026 candidate quest..." | Re-trigger Greptile
| <span className="text-border-light mr-3">{number}</span> | ||
| {title} | ||
| </h3> | ||
| {questions.map(({ id: qid, question, options }) => ( |
There was a problem hiding this comment.
Print removes question spacing
When a visitor prints or saves the questionnaire as a PDF, the global print rule sets every article margin to zero with !important, overriding the mt-10 and mt-12 utilities and placing consecutive questions directly against the preceding option grids.
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/app/toronto/vote/survey-questions/page.tsx
Line: 103
Comment:
**Print removes question spacing**
When a visitor prints or saves the questionnaire as a PDF, the global print rule sets every `article` margin to zero with `!important`, overriding the `mt-10` and `mt-12` utilities and placing consecutive questions directly against the preceding option grids.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
Adds
/toronto/vote/survey-questions, a page listing every question we ask Toronto's 2026 municipal candidates, so we can point people at our own URL instead of a Google Doc.What's on the page
Content lives in
questions.tsas typed data, so it's editable without touching layout. Styling follows the neighbouring/toronto/vote/get-involvedpage (theme-election, framed container, section grids).Keeping it out of search
Two layers:
noindex, nofollow, nocache— verified in the served HTML.robots.tsdisallows the path for*and for each AI crawler (GPTBot, ChatGPT-User, ClaudeBot, PerplexityBot). Those crawler rules had a blanketAllow: /with no disallow list, so they needed the path added explicitly.The sitemap is a hand-maintained list, so the route never appears there.
PDF download
"Download PDF" calls
window.print(), reusing the existing@media printrules inglobals.css— the same approachShareButtonsalready uses for memos. No new dependency.Tradeoff worth knowing: this means the reader picks "Save as PDF" in the print dialog rather than getting a direct file download. A true one-click
.pdfwould need a PDF library or a headless-Chrome route. Happy to add that if we'd rather have it.Verification
tsc --noEmitandeslintpass cleanrobots.txtoutput are correct🤖 Generated with Claude Code