Skip to content

Comments

refactor: Extract collagen signup logic from join.md#657

Open
RisingOrange wants to merge 2 commits intoPauseAI:mainfrom
RisingOrange:refactor/collagen-signup-component
Open

refactor: Extract collagen signup logic from join.md#657
RisingOrange wants to merge 2 commits intoPauseAI:mainfrom
RisingOrange:refactor/collagen-signup-component

Conversation

@RisingOrange
Copy link
Contributor

@RisingOrange RisingOrange commented Feb 20, 2026

Closes #529

Summary

  • Extracts the collagen campaign logic (URL param detection, state management, conditional banners, newsletter pre-fill) from src/posts/join.md into a new src/lib/components/CollagenSignup.svelte component
  • Exports userHasUid, subscribeEmail, and newsletterEmail as bound props so join.md can share state with the bottom newsletter signup and conditional note
  • Replaces on:click submit detection with on:submit on the wrapper div — more semantically correct and doesn't rely on the synthetic click behaviour specified in the HTML implicit submission algorithm

Note on submit tracking

The original code used a click handler to detect newsletter submission. This works because per the HTML spec, pressing Enter in a form field fires a click event on the default submit button before firing the form's submit event. The on:submit approach is cleaner and more direct, but this is a code quality change rather than a bug fix.

Test plan

  • Normal visit to /join — page renders correctly, no banner shown
  • Visit /join?collagen_uid_sayno=xxx&subscribe-email=test@example.com — welcome banner shown, email pre-filled in top and bottom newsletter forms, share link visible
  • Submit newsletter form (click and Enter) — banner updates to "Thanks. [...]"

…nup component

Moves the collagen campaign logic (URL param detection, state management,
conditional banners, newsletter pre-fill) out of join.md into a dedicated
CollagenSignup.svelte component. Exports userHasUid, subscribeEmail, and
newsletterEmail as bound props so join.md can share state with the bottom
newsletter signup and conditional note.
@netlify
Copy link

netlify bot commented Feb 20, 2026

Deploy Preview for pauseai ready!

Name Link
🔨 Latest commit 9a93b9a
🔍 Latest deploy log https://app.netlify.com/projects/pauseai/deploys/6998df1a8fcf020008e22856
😎 Deploy Preview https://deploy-preview-657--pauseai.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 65 (🟢 up 7 from production)
Accessibility: 90 (no change from production)
Best Practices: 100 (🟢 up 8 from production)
SEO: 99 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

…cking

on:submit is more semantically correct than detecting click events on the
submit button. submit events bubble and cover all submission paths regardless
of browser-specific synthetic click behaviour.
@RisingOrange RisingOrange force-pushed the refactor/collagen-signup-component branch from 539b662 to 9a93b9a Compare February 20, 2026 22:24
@RisingOrange RisingOrange marked this pull request as ready for review February 20, 2026 22:29
@RisingOrange RisingOrange changed the title refactor: extract collagen signup logic from join.md into CollagenSignup component ref: Extract collagen signup logic from join.md into CollagenSignup component Feb 20, 2026
@RisingOrange RisingOrange changed the title ref: Extract collagen signup logic from join.md into CollagenSignup component refactor: Extract collagen signup logic from join.md Feb 20, 2026
@Wituareard
Copy link
Collaborator

Thank you! I'd like Anthony to review and perform the testing because he knows more about the requirements, but it'll probably take a while because of PauseCon

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.

Reduce Svelte code in join.md

2 participants