Skip to content

chore: add note when editing a public schedule to be private#15213

Merged
bodhish merged 1 commit intodevelopfrom
rithviknishad/chore/note-when-making-public-schedule-private
Feb 21, 2026
Merged

chore: add note when editing a public schedule to be private#15213
bodhish merged 1 commit intodevelopfrom
rithviknishad/chore/note-when-making-public-schedule-private

Conversation

@rithviknishad
Copy link
Copy Markdown
Member

@rithviknishad rithviknishad commented Jan 18, 2026

Proposed Changes

image

Summary by CodeRabbit

  • New Features

    • Added warning message when adjusting template visibility settings to inform users about impact on existing appointments.
  • Improvements

    • Clarified template public visibility description to specify it applies to individual slots within a schedule.
    • Enhanced layout of template visibility settings with improved spacing and readability on smaller screens.

✏️ Tip: You can customize this high-level summary in your review settings.

@rithviknishad rithviknishad requested review from a team and Copilot January 18, 2026 13:58
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 18, 2026

Walkthrough

Updated 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

Cohort / File(s) Summary
Localization Updates
public/locale/en.json
Added new warning message template_visibility_change_warning clarifying that existing appointments remain unaffected when changing visibility. Updated make_template_public_description to specify that self-booking applies to "slots in this schedule" rather than the schedule generally.
UI Component Restructuring
src/pages/Scheduling/components/EditScheduleTemplateSheet.tsx
Restructured is\_public field from horizontal to vertical layout with conditional Callout warning when visibility changes from public to private. Expanded SheetContent width constraint (sm:min-w-[32rem] → sm:min-w-128). Reorganized action buttons placement to separate bottom-aligned control group while maintaining disabled states and form validation logic.
🚥 Pre-merge checks | ✅ 3 | ❌ 2
❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is largely incomplete, missing key required sections like proposed changes details, context, and the merge checklist. Expand the description with detailed change explanations, testing notes, and complete the merge checklist items such as specs, I18n verification, and test updates.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: adding a note when editing a public schedule to make it private.
Linked Issues check ✅ Passed The changes successfully address #15212 by adding a warning callout when changing a public schedule to private and updating I18n strings to clarify visibility behavior.
Out of Scope Changes check ✅ Passed All changes are directly related to the objective of adding a note when editing public schedules to private, with no out-of-scope modifications.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch rithviknishad/chore/note-when-making-public-schedule-private

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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">
Copy link

Copilot AI Jan 18, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
<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]">

Copilot uses AI. Check for mistakes.
control={form.control}
name="is_public"
render={({ field }) => (
<FormItem className="space-y-2">
Copy link

Copilot AI Jan 18, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying care-preview with  Cloudflare Pages  Cloudflare Pages

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

View logs

@github-actions
Copy link
Copy Markdown

🎭 Playwright Test Results

Status: ❌ Failed
Test Shards: 3

Metric Count
Total Tests 171
✅ Passed 164
❌ Failed 7
⏭️ Skipped 0

📊 Detailed results are available in the playwright-final-report artifact.

Run: #4886

@bodhish bodhish merged commit fdccb40 into develop Feb 21, 2026
28 of 32 checks passed
@bodhish bodhish deleted the rithviknishad/chore/note-when-making-public-schedule-private branch February 21, 2026 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add a note when editing a public schedule to be private

3 participants