Skip to content

Fix layout. Fix reset of modal on close - #57

Merged
mikaalnaik merged 2 commits into
mainfrom
mikaal/toronto-pledge-modal-reset-mobile-pledge-page
Aug 12, 2026
Merged

Fix layout. Fix reset of modal on close#57
mikaalnaik merged 2 commits into
mainfrom
mikaal/toronto-pledge-modal-reset-mobile-pledge-page

Conversation

@mikaalnaik

Copy link
Copy Markdown
Contributor

No description provided.

@greptile-apps

greptile-apps Bot commented Aug 11, 2026

Copy link
Copy Markdown

Greptile Summary

The PR revises the Toronto and Brampton shared-pledge pages to use vertically separated content bands on mobile and overlay them at larger breakpoints. It also makes the pledge dialog controlled so closing it clears stale loading and error state.

  • Introduces responsive mobile sizing and spacing for shared-pledge headers, stamp scenes, controls, and footers.
  • Resets pledge-dialog loading and error state when the modal closes.
  • Explicitly closes the pledge dialog before navigating to the outside-region flow.

Confidence Score: 5/5

The PR appears safe to merge because no blocking failure remains established.

No blocking failure remains.

Important Files Changed

Filename Overview
src/app/toronto/vote/2026/pledge/[slug]/SharedPledgeClient.tsx Reworks the shared-pledge page into responsive mobile bands while retaining the desktop overlay layout.
src/app/brampton/vote/2026/pledge/[slug]/SharedPledgeClient.tsx Applies the same responsive shared-pledge layout changes using Brampton election configuration.
src/components/elections/PledgeButton.tsx Controls dialog visibility and clears stale loading and error state when it closes.

Reviews (2): Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." | Re-trigger Greptile

@@ -40,31 +40,33 @@ export default function SharedPledgeClient({ name }: { name: string }) {

return (
<div className="theme-election bg-bg text-dark">
<div className="relative h-[calc(100dvh-20px)] min-h-[480px] border-2 border-dark bg-bg overflow-clip">
{/* On small screens the copy would sit on top of the stamp, so the three

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Clipped stacked mobile layout

When a long pledge name and the footer controls wrap on a narrow mobile viewport, the non-shrinking header and footer plus the stamp's 220px minimum height exceed this fixed-height container; overflow-clip then hides the bottom content without an internal scrolling path, making navigation or explanatory text inaccessible. The same layout is used by the Brampton shared pledge page.

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/app/toronto/elections/2026/pledge/[slug]/SharedPledgeClient.tsx
Line: 43

Comment:
**Clipped stacked mobile layout**

When a long pledge name and the footer controls wrap on a narrow mobile viewport, the non-shrinking header and footer plus the stamp's 220px minimum height exceed this fixed-height container; `overflow-clip` then hides the bottom content without an internal scrolling path, making navigation or explanatory text inaccessible. The same layout is used by the Brampton shared pledge page.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Fix in Codex Fix in Claude Code

…-modal-reset-mobile-pledge-page

# Conflicts:
#	src/app/toronto/vote/2026/pledge/[slug]/SharedPledgeClient.tsx
@mikaalnaik
mikaalnaik merged commit 1bfdedb into main Aug 12, 2026
2 checks passed
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