Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat] Populate support form from search params #12324

Merged
merged 2 commits into from
Dec 17, 2024

Conversation

esizer
Copy link
Member

@esizer esizer commented Dec 16, 2024

🤖 Resolves #12215

👋 Introduction

Uses search params to pre-populate the support form subject and description fields.

🧪 Testing

Tip

When adding search params, make sure they are encoded for URIs.

  1. Build the app pnpm run dev:fresh
  2. Navigate to /support
  3. Confirm the form is empty
  4. Add search params for subject (only "bug", "feedback" and "question" are supported values) and description
  5. Confirm the form is populated
  6. Confirm unsupported subject fields leads to an empty "I'm looking to..." field
  7. Confirm unsafe input to the description param is sanitized (i.e <script>alert('unsafe');</script> does nothing)

📸 Screenshot

2024-12-16_14-41

@vd1992
Copy link
Contributor

vd1992 commented Dec 16, 2024

Question, where are the URLs supposed to be coming from? Do we have to generate them or is someone providing them to a user?

@esizer
Copy link
Member Author

esizer commented Dec 16, 2024

Question, where are the URLs supposed to be coming from? Do we have to generate them or is someone providing them to a user?

I think it can be both but likely that the majority will be generated on the client.

@vd1992
Copy link
Contributor

vd1992 commented Dec 16, 2024

Question, where are the URLs supposed to be coming from? Do we have to generate them or is someone providing them to a user?

I think it can be both but likely that the majority will be generated on the client.

Okay, so there should be a separate ticket then to generate the URLs then? I was a bit confused as to whether the issue scope included generating the URLs too

@petertgiles petertgiles self-requested a review December 17, 2024 14:59
Copy link
Contributor

@petertgiles petertgiles left a comment

Choose a reason for hiding this comment

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

Nice! Works great. Thanks for the test, too.

@petertgiles
Copy link
Contributor

Question, where are the URLs supposed to be coming from? Do we have to generate them or is someone providing them to a user?

This issue is part of the new applicant dashboard milestone. You can see if reference to it here: #12164 . I think this part of the whole "if you've been screened out, reach out to us to chat about it" thing.

@esizer esizer added this pull request to the merge queue Dec 17, 2024
Merged via the queue into main with commit 2420b55 Dec 17, 2024
12 checks passed
@esizer esizer deleted the 12215-populate-support-form-from-search-params branch December 17, 2024 15:23
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.

✨ URL params for the support page to pre-populate the support form
3 participants