Skip to content

fix: improve redirect parameter handling for success page #20764

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

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

guptadeepak8
Copy link

@guptadeepak8 guptadeepak8 commented Apr 18, 2025

Summary by mrge

Improved redirect handling by removing the unused "embed" parameter before forwarding users to the success page.

  • Bug Fixes
    • Filters out the "embed" query parameter to prevent it from appearing on the success page.
    • Added a test to confirm correct parameter filtering.

What does this PR do?

Improved query parameter handling by removing the unused embed param before forwarding to success page

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

Copy link

vercel bot commented Apr 18, 2025

@guptadeepak8 is attempting to deploy a commit to the cal Team on Vercel.

A member of the Team first needs to authorize it.

@graphite-app graphite-app bot added the community Created by Linear-GitHub Sync label Apr 18, 2025
@graphite-app graphite-app bot requested a review from a team April 18, 2025 06:27
@github-actions github-actions bot added automated-tests area: unit tests, e2e tests, playwright embed area: embed, widget, react embed labels Apr 18, 2025
@dosubot dosubot bot added the 🐛 bug Something isn't working label Apr 18, 2025
Copy link

@mrge-io mrge-io bot left a comment

Choose a reason for hiding this comment

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

mrge reviewed 2 files and found no issues. View the review in mrge.io

Copy link

graphite-app bot commented Apr 18, 2025

Graphite Automations

"Add consumer team as reviewer" took an action on this PR • (04/18/25)

1 reviewer was added to this PR based on Keith Williams's automation.

"Add community label" took an action on this PR • (04/18/25)

1 label was added to this PR based on Keith Williams's automation.

Copy link
Contributor

@TusharBhatt1 TusharBhatt1 left a comment

Choose a reason for hiding this comment

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

@guptadeepak8 visual demo is important here - can you add , making it draft until then.

@TusharBhatt1 TusharBhatt1 marked this pull request as draft April 18, 2025 07:38
@guptadeepak8
Copy link
Author

previous:-
Screenshot 2025-04-18 144955

changes:-

Screen.Recording.2025-04-18.162056.mp4

@guptadeepak8 guptadeepak8 marked this pull request as ready for review April 18, 2025 11:09
Copy link

@mrge-io mrge-io bot left a comment

Choose a reason for hiding this comment

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

mrge reviewed 2 files and found no issues. View the review in mrge.io

@retrogtx retrogtx requested a review from TusharBhatt1 April 21, 2025 05:14
@@ -185,7 +194,7 @@ export const useBookingSuccessRedirect = () => {
...query,
...bookingExtraParams,
},
searchParams: new URLSearchParams(searchParams.toString()),
searchParams: filterEmbedParameter(searchParams, isEmbed),
Copy link
Member

Choose a reason for hiding this comment

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

Instead of making it embed specific we should handle removing the param in getBookingRedirectExtraParams and unit test that function as that function has the responidbility of building what params to send

Copy link
Member

@hariombalhara hariombalhara left a comment

Choose a reason for hiding this comment

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

@guptadeepak8 Thanks for the PR !! I have left a suggestion to implement it in a better way

@TusharBhatt1
Copy link
Contributor

@guptadeepak8 Thanks for the PR !! I have left a suggestion to implement it in a better way

Making it draft until then

@TusharBhatt1 TusharBhatt1 marked this pull request as draft May 2, 2025 05:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automated-tests area: unit tests, e2e tests, playwright 🐛 bug Something isn't working community Created by Linear-GitHub Sync embed area: embed, widget, react embed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CAL-5388] Embed: Success page redirect to a wordpress page breaks that page
5 participants