Skip to content

Conversation

guptadeepak8
Copy link
Contributor

@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
Contributor

@cubic-dev-ai cubic-dev-ai 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.

"Add ready-for-e2e label" took an action on this PR • (07/01/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
Contributor 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
Contributor

@cubic-dev-ai cubic-dev-ai 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
@guptadeepak8 guptadeepak8 force-pushed the fix-wordpress-page-break branch from a844625 to 2ce25f5 Compare May 21, 2025 19:03
@guptadeepak8 guptadeepak8 reopened this May 21, 2025
@guptadeepak8 guptadeepak8 marked this pull request as ready for review May 21, 2025 19:50
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

cubic reviewed 2 files and found no issues. Review PR in cubic.dev.

Copy link
Contributor

github-actions bot commented Jun 7, 2025

This PR is being marked as stale due to inactivity.

@github-actions github-actions bot added the Stale label Jun 7, 2025
@guptadeepak8
Copy link
Contributor Author

@TusharBhatt1 pls review this

@github-actions github-actions bot removed the Stale label Jun 8, 2025
@github-actions github-actions bot added the Stale label Jun 12, 2025
Copy link
Contributor

@kart1ka kart1ka left a comment

Choose a reason for hiding this comment

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

LGTM

@github-actions github-actions bot removed the Stale label Jun 20, 2025
Copy link
Contributor

@Devanshusharma2005 Devanshusharma2005 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

github-actions bot commented Jul 1, 2025

E2E results are ready!

@github-actions github-actions bot added the Medium priority Created by Linear-GitHub Sync label Jul 1, 2025
@anikdhabal anikdhabal merged commit 4404699 into calcom:main Jul 7, 2025
35 of 39 checks passed
@@ -184,6 +189,7 @@ export const useBookingSuccessRedirect = () => {
query: {
...query,
...bookingExtraParams,
isEmbed,
Copy link
Member

Choose a reason for hiding this comment

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

I don't think it is implemented correctly @Devanshusharma2005 could you confirm?

getNewSearchParams seems to have added a new property isEmbed(optional) but that isn't passed here. isEmbed is being passed in query object and we don't read isEmbed from query object in getNewSearchParams

Copy link
Member

Choose a reason for hiding this comment

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

Also, I asked Devin to work on a much more exhaustive approach with unit tests to handle all embed related params

#22028 @Devanshusharma2005 Maybe you want to pick it up?

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 Medium priority Created by Linear-GitHub Sync ready-for-e2e
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
7 participants