-
Notifications
You must be signed in to change notification settings - Fork 10.4k
fix: Contact support button position changed from absolute to fixed #23002
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: Contact support button position changed from absolute to fixed #23002
Conversation
@kumarayushkumar is attempting to deploy a commit to the cal Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughA single change updates the container in apps/web/components/plain/PlainContactForm.tsx from absolute to fixed positioning by modifying its className from "absolute bottom-[1rem] right-[1rem] z-50" to "fixed bottom-[1rem] right-[1rem] z-50". No other logic, markup, or exports were altered. Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Assessment against linked issues
Possibly related PRs
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Graphite Automations"Add consumer team as reviewer" took an action on this PR • (08/11/25)1 reviewer was added to this PR based on Keith Williams's automation. "Add community label" took an action on this PR • (08/11/25)1 label was added to this PR based on Keith Williams's automation. |
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.
Actionable comments posted: 0
🔭 Outside diff range comments (4)
apps/web/components/plain/PlainContactForm.tsx (4)
76-80
: Bug: interpolate Response.text without awaiting; users will see “[object Function]”
uploadRes.text
is a function. Interpolating it shows a function string, not the server error. Await the body text (or JSON).Apply:
- if (!uploadRes.ok) { - showToast(`Failed while uploading file: ${uploadRes.text}`, "error"); - setIsUploadingImage(false); - return; - } + if (!uploadRes.ok) { + let errText = ""; + try { + errText = await uploadRes.text(); + } catch {} + showToast(errText ? `Failed while uploading file: ${errText}` : "Failed while uploading file", "error"); + setIsUploadingImage(false); + return; + }
62-63
: isUploadingImage set to false too early; enables premature submit before S3 upload completesYou set isUploadingImage(false) right after /api/support/upload, before the S3 POST finishes. This can re-enable the form and allow submission without the attachmentId added.
Keep isUploadingImage true until the S3 upload completes or fails.
- setIsUploadingImage(false);
Leave the existing setIsUploadingImage(false) in the S3 error branch and at the end of the happy path (lines ~78 and ~89).
Also applies to: 89-90
199-207
: Align FileUploader config with handler: single file onlyThe handler processes only the first new/removed file, but props allow up to 5. Either iterate all files, or set maxFiles to 1 to match current behavior.
- multiple={false} - showFilesList - maxFiles={5} + multiple={false} + showFilesList + maxFiles={1}If multiple files are desired, update handleUpload to loop all newFiles/removedFiles and collect attachmentIds.
161-161
: i18n: wrap all user-facing strings with t() per guidelinesSeveral UI strings and toasts are hardcoded. Please use t() for localization in TSX.
Example:
- <p className="mb-5 text-lg font-semibold">Contact support</p> + <p className="mb-5 text-lg font-semibold">{t("contactSupport")}</p> - <h4 className="mb-2 text-lg font-medium ">Message Sent</h4> + <h4 className="mb-2 text-lg font-medium ">{t("messageSent")}</h4> - <p className="text-subtle mb-4 text-sm"> - Thank you for contacting us. We'll get back to you as soon as possible. - </p> + <p className="text-subtle mb-4 text-sm">{t("thanksWeWillReplySoon")}</p> - <Button ...>Send Another Message</Button> + <Button ...>{t("sendAnotherMessage")}</Button> - <Label htmlFor="message">Describe the issue</Label> + <Label htmlFor="message">{t("describeTheIssue")}</Label> - placeholder="Please describe the issue you're facing, e.g. 'Busy slots are marked available', ..., etc." + placeholder={t("describeIssuePlaceholder")}Also localize:
- Attachments label (“Attachments (optional)”)
- FileUploader buttonMsg (“Add Files”)
- Submit button/loader (“Sending”, “Send Message”)
- Toasts (“Error uploading attachment”, “File uploaded successfully”, “Failed to submit contact form”, “An error occurred”)
If the project uses a specific i18n helper, import and follow that convention.
Also applies to: 174-174, 175-177, 179-179, 185-185, 191-191, 197-197, 200-200, 223-223, 228-228, 52-52, 90-90, 120-120, 132-132
🧹 Nitpick comments (2)
apps/web/components/plain/PlainContactForm.tsx (2)
163-168
: Accessibility: icon-only close button should have an aria-labelAdd an aria-label for screen readers.
<Button color="minimal" variant="button" StartIcon="x" size="sm" onClick={() => setIsOpen(false)} + aria-label="Close" />
12-17
: Unused interface ContactFormDataThe ContactFormData interface isn’t used and diverges from the actual payload. Remove it or align the form to use it.
-interface ContactFormData { - name: string; - email: string; - message: string; - attachments?: FileData[]; -}Alternatively, define a type matching the current API payload:
type SupportPayload = { message: string; attachmentIds: string[] };
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
apps/web/components/plain/PlainContactForm.tsx
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.tsx
📄 CodeRabbit Inference Engine (.cursor/rules/review.mdc)
Always use
t()
for text localization in frontend code; direct text embedding should trigger a warning
Files:
apps/web/components/plain/PlainContactForm.tsx
**/*.{ts,tsx}
📄 CodeRabbit Inference Engine (.cursor/rules/review.mdc)
Flag excessive Day.js use in performance-critical code; prefer native Date or Day.js
.utc()
in hot paths like loops
Files:
apps/web/components/plain/PlainContactForm.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Install dependencies / Yarn install & cache
- GitHub Check: Codacy Static Code Analysis
🔇 Additional comments (1)
apps/web/components/plain/PlainContactForm.tsx (1)
147-147
: LGTM: position fixed prevents scroll drift; verify no transformed ancestorSwitching to fixed anchors the button to the viewport and should stop the upward movement during scroll. Please verify on Safari 18.6 and Firefox 141 as reported, and ensure no ancestor applies transform/filter/perspective, which can change fixed behavior in those browsers.
Manual checks:
- Event type edit page: scroll long content; confirm button remains bottom-right.
- Resize window and test zoom >=125%; confirm no overlap with other fixed UI.
- Inspect ancestors in devtools for transform/filter; if present and issues persist, consider rendering this trigger in a top-level portal/container outside transformed contexts.
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.
Looks like an improvement to me, lgtm; thank you!
E2E results are ready! |
…ice class with DI (#22974) * refactor: convert findQualifiedHostsWithDelegationCredentials to service class with DI - Create QualifiedHostsService class following UserAvailabilityService pattern - Add IQualifiedHostsService interface with prisma and bookingRepo dependencies - Create DI module and container for qualified hosts service - Update filterHostsBySameRoundRobinHost to accept prisma as parameter - Update all usage sites to use the new service: - loadAndValidateUsers.ts - slots/util.ts - test mocks in _post.test.ts - Maintain backward compatibility with original function export - Fix type issues in team properties (rrResetInterval, rrTimestampBasis) Co-Authored-By: morgan@cal.com <morgan@cal.com> * fix: update filterHostsBySameRoundRobinHost test to include prisma parameter - Add missing prisma parameter to all test function calls - Resolves unit test failure caused by function signature change Co-Authored-By: morgan@cal.com <morgan@cal.com> * fix: resolve type issues in FilterHostsService - Import PrismaClient type instead of using unknown - Fix type compatibility for BookingRepository constructor - Update test mocks to use proper BookingRepository type - Ensure all DI dependencies are properly typed Co-Authored-By: morgan@cal.com <morgan@cal.com> * refactor: rename DI files to CamelCase and update imports - Rename all files in packages/lib/di from kebab-case to CamelCase - Update 22 external files with import statements to use new file names - Update internal DI module files with corrected imports - Maintain consistency with TypeScript naming conventions Co-Authored-By: morgan@cal.com <morgan@cal.com> * chore: bump platform libs * chore: bump platform libs * fix: remove obsolete vitest mock after service class refactoring - Remove obsolete mock for old function module - Keep correct mock for new DI container - Resolves CI unit test failures Co-Authored-By: morgan@cal.com <morgan@cal.com> * fix: correct import path for calAIPhone zod-utils module Co-Authored-By: morgan@cal.com <morgan@cal.com> * fix: Booker active booking limit can't be switched off (#23005) * refactor: Get rid of `getServerSideProps` for /getting-started pages (#23003) * refactor * fix type check * fix: Remove Reporting page within Routing Forms (#22990) * fix error in handleNewBooking (#23011) Co-authored-by: CarinaWolli <wollencarina@gmail.com> * Documentation edits made through Mintlify web editor (#23007) Co-authored-by: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com> * fix: Contact support button position changed from absolute to fixed (#23002) * feat: Add private links to API (#22943) * --init * address change requests * adding further changes * address feedback * further changes * further clean-up * clean up * fix module import and others * add guards * remove unnecessary comments * remove unnecessary comments * cleanup * sort coderabbig suggestions * improve check * chore: bump platform libraries --------- Co-authored-by: Lauris Skraucis <lauris.skraucis@gmail.com> Co-authored-by: supalarry <laurisskraucis@gmail.com> * chore: release v5.5.15 * chore: bump platform libs * chore: bump platform libs --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: morgan@cal.com <morgan@cal.com> Co-authored-by: Anik Dhabal Babu <81948346+anikdhabal@users.noreply.github.com> Co-authored-by: Benny Joo <sldisek783@gmail.com> Co-authored-by: Sahitya Chandra <sahityajb@gmail.com> Co-authored-by: Carina Wollendorfer <30310907+CarinaWolli@users.noreply.github.com> Co-authored-by: CarinaWolli <wollencarina@gmail.com> Co-authored-by: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com> Co-authored-by: Ayush Kumar <kumarayushkumar@protonmail.com> Co-authored-by: Syed Ali Shahbaz <52925846+alishaz-polymath@users.noreply.github.com> Co-authored-by: Lauris Skraucis <lauris.skraucis@gmail.com> Co-authored-by: supalarry <laurisskraucis@gmail.com> Co-authored-by: emrysal <me@alexvanandel.com>
What does this PR do?
This PR fixes contact support button issue.
The issue was, contact form button is moving while scrolling the event type edit page.
Video Demo:
https://github.com/user-attachments/assets/35ed8dfe-415f-46a8-8d70-838d5af07016
Mandatory Tasks (DO NOT REMOVE)
How should this be tested?