Skip to content

feat: add ?city and ?languages prefill params to onboarding embed#951

Open
hturnbull93 wants to merge 2 commits into
PauseAI:mainfrom
hturnbull93:feat/onboarding-prefill-city-languages
Open

feat: add ?city and ?languages prefill params to onboarding embed#951
hturnbull93 wants to merge 2 commits into
PauseAI:mainfrom
hturnbull93:feat/onboarding-prefill-city-languages

Conversation

@hturnbull93

Copy link
Copy Markdown
Contributor

Summary

  • Adds ?city=<value> query param to prefill the city field in the onboarding embed iframe
  • Adds ?languages=<comma-separated> query param to prefill the languages multiselect (e.g. ?languages=German,English)
  • Invalid/unrecognised language values are silently dropped; falls back to ['English'] if nothing valid is provided
  • Consistent with the existing ?country= param behaviour

Test plan

  • ?city=Berlin → city field prefilled with "Berlin"
  • ?languages=German,English → languages multiselect prefilled with German and English
  • ?languages=InvalidLang → falls back to English (invalid value dropped)
  • ?country=Germany&city=Berlin&languages=German → all three params work together
  • No params → city empty, languages defaults to English (existing behaviour unchanged)

🤖 Generated with Claude Code

https://claude.ai/code/session_015aKhZeP6x8pgBkDEraXGUs

Allows the iframe host to prefill the city field and languages multiselect
via URL query params, consistent with the existing ?country param.

- ?city=Berlin → prefills city input
- ?languages=German,English → prefills languages (comma-separated stored values)
  Invalid/unrecognised language values are silently dropped; falls back to
  ['English'] if nothing valid is provided.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015aKhZeP6x8pgBkDEraXGUs
@netlify

netlify Bot commented Jul 1, 2026

Copy link
Copy Markdown

Deploy Preview for pauseai ready!

Name Link
🔨 Latest commit a872f99
🔍 Latest deploy log https://app.netlify.com/projects/pauseai/deploys/6a47e17395064700085dd395
😎 Deploy Preview https://deploy-preview-951--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: 56 (🔴 down 5 from production)
Accessibility: 89 (no change from production)
Best Practices: 100 (no change from production)
SEO: 82 (no change from production)
PWA: -
View the detailed breakdown and full score reports
🤖 Make changes Run an agent on this branch

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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Implementation of logic for defaulting an empty set of valid languages to just Englush looks wrong? Check size after filter, no? L122-124.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

well spotted, fixed :)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I see the existing pattern being extended with more specific cases, but seems possibly better to generalize and simplify. Why not allow an initial value for any field?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

the fields country, city and languages are the only fields that can sensibly be prefilled, the rest of the fields would be particular to an individual

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

How are we currently documenting or tracking who embeds and what we support? External interfaces need curation.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

sure, documented now

Language default check ran before filtering invalid values, so an
all-invalid ?languages= param produced an empty selection instead of
falling back to English. Also removes the unused/dead initialEmail
prop and documents the /embed/onboarding-form route and its query
params in ONBOARDING_EMBED.md, linked from the README.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018hV7D3mAfDrxytSxnaXZXf
@hturnbull93 hturnbull93 requested a review from anthonybailey July 3, 2026 16:22
@hturnbull93

Copy link
Copy Markdown
Contributor Author

@anthonybailey happy to rereview?

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.

2 participants