Conversation
WalkthroughUpdated schedule template visibility management by adding a localization warning message for visibility changes and restructuring the public/private toggle UI to display a callout when changing a public schedule to private. Changes
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Pull request overview
This PR adds a warning note when a user attempts to change a public schedule template to private, informing them that existing appointments will not be affected and only new self-service bookings will be prevented.
Changes:
- Added a warning callout when editing a public schedule template to be private
- Updated the layout structure of the visibility toggle to accommodate the warning
- Improved the description text for schedule template visibility
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/pages/Scheduling/components/EditScheduleTemplateSheet.tsx | Added conditional warning callout, restructured form layout for the is_public toggle, and adjusted sheet width |
| public/locale/en.json | Added new warning message translation key and clarified existing description |
| {trigger || <Button variant="outline" size="sm"></Button>} | ||
| </SheetTrigger> | ||
| <SheetContent className="flex min-w-full flex-col bg-gray-100 sm:min-w-[32rem]"> | ||
| <SheetContent className="flex min-w-full flex-col bg-gray-100 sm:min-w-128"> |
There was a problem hiding this comment.
The Tailwind CSS class 'sm:min-w-128' is not a standard Tailwind utility. Tailwind's spacing scale uses values like 'sm:min-w-[32rem]' for custom sizes. If 128 represents a spacing unit (128 * 0.25rem = 32rem), it should be written as 'sm:min-w-[32rem]' or defined in the Tailwind config if this is a custom utility.
| <SheetContent className="flex min-w-full flex-col bg-gray-100 sm:min-w-128"> | |
| <SheetContent className="flex min-w-full flex-col bg-gray-100 sm:min-w-[32rem]"> |
| control={form.control} | ||
| name="is_public" | ||
| render={({ field }) => ( | ||
| <FormItem className="space-y-2"> |
There was a problem hiding this comment.
The FormItem structure has been changed to use vertical spacing (space-y-2), but the FormMessage is now positioned at the bottom of FormItem after the conditional Callout. Consider whether the FormMessage should appear immediately after the checkbox control for better form validation UX, or if its current position below the warning is intentional.
Deploying care-preview with
|
| Latest commit: |
d339e29
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://aa053c11.care-preview-a7w.pages.dev |
| Branch Preview URL: | https://rithviknishad-chore-note-whe.care-preview-a7w.pages.dev |
🎭 Playwright Test ResultsStatus: ❌ Failed
📊 Detailed results are available in the playwright-final-report artifact. Run: #4886 |
Proposed Changes
Summary by CodeRabbit
New Features
Improvements
✏️ Tip: You can customize this high-level summary in your review settings.