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: Routing Form, only last option of multiselect is forwarded to Booking Form. #9328

Merged
merged 1 commit into from
Jun 5, 2023

Conversation

hariombalhara
Copy link
Member

@hariombalhara hariombalhara commented Jun 5, 2023

What does this PR do?

Fixes #9329
Fixes Cal-1865

Before Fix:
https://www.loom.com/share/fb1692f1269d47ae934300001d3a8d3f
After Fix:
https://www.loom.com/share/4f0c31c391b24eb080596b89cbfa6aff

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How should this be tested?

Bug-1: MultiSelect field has only last option in query string

  • Create an Routing Form with multiple select type and choose all the options for the field.
  • Notice that only last of the option is visible in the query string.

Bug-2

  • Simply submit a routing form that redirects to event-type
  • Notice that submit button loader goes away and still nothing happens for a very significant amount of time

Checklist

  • I haven't added tests that prove my fix is effective or that my feature works

@vercel
Copy link

vercel bot commented Jun 5, 2023

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

Name Status Preview Comments Updated (UTC)
cal ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 5, 2023 9:34am
ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 5, 2023 9:34am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
api ⬜️ Ignored (Inspect) Jun 5, 2023 9:34am

@github-actions
Copy link
Contributor

github-actions bot commented Jun 5, 2023

📦 Next.js Bundle Analysis for @calcom/web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

Five Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load % of Budget (350 KB)
/apps/[slug]/[...pages] 458.51 KB 609.73 KB 174.21% (🟢 -0.44%)
/auth/setup 174.51 KB 325.72 KB 93.06% (🟢 -0.17%)
/event-types/[type] 479.07 KB 630.29 KB 180.08% (🟢 -0.22%)
/getting-started/[[...step]] 427.28 KB 578.49 KB 165.28% (🟡 +0.23%)
/settings/my-account/calendars 253.5 KB 404.71 KB 115.63% (🟡 +0.22%)
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored.

@deploysentinel
Copy link

deploysentinel bot commented Jun 5, 2023

Current Playwright Test Results Summary

✅ 106 Passing - ⚠️ 3 Flaky

Run may still be in progress, this comment will be updated as current testing workflow or job completes...

(Last updated on 06/05/2023 09:41:01am UTC)

Run Details

Running Workflow PR Update on Github Actions

Commit: 6ed2dd8

Started: 06/05/2023 09:37:47am UTC

⚠️ Flakes

📄   apps/web/playwright/managed-event-types.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Managed Event Types tests Can create managed event type
Retry 1Initial Attempt
1.28% (5) 5 / 391 runs
failed over last 7 days
19.95% (78) 78 / 391 runs
flaked over last 7 days

📄   packages/embeds/embed-core/playwright/tests/action-based.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Popup Tests should be able to reschedule
Retry 1Initial Attempt
4.23% (9) 9 / 213 runs
failed over last 7 days
92.96% (198) 198 / 213 runs
flaked over last 7 days

📄   apps/web/playwright/login.2fa.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
2FA Tests should allow a user to disable 2FA
Retry 1Initial Attempt
0% (0) 0 / 304 runs
failed over last 7 days
18.09% (55) 55 / 304 runs
flaked over last 7 days

View Detailed Build Results


@hariombalhara hariombalhara requested a review from a team June 5, 2023 09:15
@@ -5,7 +5,19 @@ export default function useRouterQuery<T extends string>(name: T) {
const existingQueryParams = router.asPath.split("?")[1];

const urlParams = new URLSearchParams(existingQueryParams);
const query = Object.fromEntries(urlParams);
Copy link
Member Author

Choose a reason for hiding this comment

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

fromEntries returns Record<string,string> value and thus it ends up overriding existing keys.

@emrysal emrysal added this pull request to the merge queue Jun 5, 2023
Merged via the queue into main with commit 785a08b Jun 5, 2023
27 of 28 checks passed
@emrysal emrysal deleted the fix/routing-form-duplicate-query-param branch June 5, 2023 10:12
@PeerRich PeerRich added the core area: core, team members only label Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core area: core, team members only
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CAL-1865] Routing Form - Only the last option for Multi Select Field is forwarded to Booking Form
3 participants