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
Improvements: Prefill Routing Forms and connect prefilling with Booking Form #8780
Improvements: Prefill Routing Forms and connect prefilling with Booking Form #8780
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
93164a9
to
45fb94c
Compare
📦 Next.js Bundle Analysis for @calcom/webThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
Current Playwright Test Results Summary✅ 109 Passing - ❌ 3 Failing - Run may still be in progress, this comment will be updated as current testing workflow or job completes... (Last updated on 05/17/2023 05:11:13am UTC) Run DetailsRunning Workflow PR Update on Github Actions Commit: 39c83d9 Started: 05/17/2023 04:59:28am UTC ❌ Failures📄 packages/embeds/embed-core/playwright/tests/action-based.test.ts • 2 FailuresTop 1 Common Error Messages
Test Case Results
📄 packages/embeds/embed-core/playwright/tests/inline.e2e.ts • 1 FailureTest Case Results
|
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
Reschedule Tests -- new-booker Should display request reschedule send on bookings/cancelled
Retry 1 • Initial Attempt |
0% (0)0 / 281 runsfailed over last 7 days |
2.49% (7)7 / 281 runsflaked over last 7 days |
📄 apps/web/playwright/booking-seats.e2e.ts • 1 Flake
Test Case Results
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
Booking with Seats -- new-booker Reschedule for booking with seats -- old-booker Should reschedule booking with seats and if everyone rescheduled it should be deleted
Retry 1 • Initial Attempt |
0% (0)0 / 290 runsfailed over last 7 days |
82.07% (238)238 / 290 runsflaked over last 7 days |
@@ -201,7 +201,7 @@ export const FormBuilder = function FormBuilder({ | |||
// It has the same drawback that if the label is changed, the value of the option will change. It is not a big deal for now. | |||
value.splice(index, 1, { | |||
label: e.target.value, | |||
value: e.target.value.toLowerCase().trim(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Routing Form uses the strategy of not lowercasing the option label and using it as is.
Changed this logic here to match that, otherwise an option value forwarded from Routing Form won't be prefillable in Booking Form.
It also fixes #8839
|
||
return ( | ||
<Select | ||
className="mb-2" | ||
onChange={(items) => { | ||
setValue(items?.map((item) => item.value)); | ||
}} | ||
defaultValue={defaultValue} | ||
value={validValue} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a controlled input so it should use value field.
e560f1e
to
bb967f3
Compare
bb967f3
to
1221dd8
Compare
…support-routing-forms
@@ -276,6 +276,9 @@ export function FormActionsProvider({ appUrl, children }: { appUrl: string; chil | |||
} | |||
return { previousValue }; | |||
}, | |||
onSuccess: () => { | |||
showToast(t("form_updated_successfully"), "success"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On toggling the form there was no toast coming up.
|
||
return ( | ||
<Select | ||
className="mb-2" | ||
onChange={(items) => { | ||
setValue(items?.map((item) => item.value)); | ||
}} | ||
defaultValue={defaultValue} | ||
value={optionsFromList} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is supposed to be a controlled input
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice looks good 🙏
…ng Form (#8780) * Support prefilling routing form and prefilling Booking form through routing form * Use Option Value as is instead of lowercasing * Fix prefill validation issue * Add prefill tests * Fix Routing Form tests * Small fix
What does this PR do?
Also, Fixes #8839
Demo
Environment: Production
Type of change
How should this be tested?
Checklist