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

fix: Certain query params being filtered out from embed #16936

Merged
merged 1 commit into from
Oct 4, 2024

Conversation

hariombalhara
Copy link
Member

@hariombalhara hariombalhara commented Oct 4, 2024

What does this PR do?

  • No params are filtered out now by default.
  • With forwardQueryParams feature enabled, we are filtering out the page query params. Config query params will still be unfiltered. This should allow rescheduleUid(and other reserved query params) in config to keep on working even with the forwardQueryParams feature enabled

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • N/A I have added a Docs issue here 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.

@graphite-app graphite-app bot requested a review from a team October 4, 2024 05:43
@hariombalhara hariombalhara marked this pull request as draft October 4, 2024 05:43
@keithwillcode keithwillcode added core area: core, team members only enterprise area: enterprise, audit log, organisation, SAML, SSO labels Oct 4, 2024
@dosubot dosubot bot added embed area: embed, widget, react embed 🐛 bug Something isn't working labels Oct 4, 2024
Copy link

graphite-app bot commented Oct 4, 2024

Graphite Automations

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

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

Copy link

vercel bot commented Oct 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
cal ⬜️ Ignored (Inspect) Visit Preview Oct 4, 2024 6:21am
calcom-web-canary ⬜️ Ignored (Inspect) Visit Preview Oct 4, 2024 6:21am

Copy link
Contributor

github-actions bot commented Oct 4, 2024

E2E results are ready!

@hariombalhara hariombalhara marked this pull request as ready for review October 4, 2024 06:18
Comment on lines +38 to +42
beforeEach(() => {
cal = new CalClass("test-namespace", []);
window.Cal.config = { forwardQueryParams: true };
// Mock the getConfig method
cal.getConfig = vi.fn().mockReturnValue({ calOrigin: "https://app.cal.com" });
Copy link
Member Author

Choose a reason for hiding this comment

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

Moved here to convey that all tests within the describe use forwardQueryParams feature

private getQueryParamsFromPage() {
const queryParamsFromPage = getQueryParamsFromPage();
// Ensure valid params are used from the page.
return this.filterParams(queryParamsFromPage);
Copy link
Member Author

Choose a reason for hiding this comment

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

Filtering just the page params now. So, config goes unfiltered as that is explicitly passed by user.

Page Params could be unintended and thus need to be filtered.

@hariombalhara hariombalhara merged commit 8ae71f6 into main Oct 4, 2024
41 checks passed
@hariombalhara hariombalhara deleted the hotfix/params-filtering branch October 4, 2024 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working core area: core, team members only embed area: embed, widget, react embed enterprise area: enterprise, audit log, organisation, SAML, SSO ready-for-e2e
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants