Skip to content

[WEB-4874]fix: calendar picker build errors and styles override#7762

Merged
pushya22 merged 2 commits intopreviewfrom
fix-calender_picker_build_errors
Sep 10, 2025
Merged

[WEB-4874]fix: calendar picker build errors and styles override#7762
pushya22 merged 2 commits intopreviewfrom
fix-calender_picker_build_errors

Conversation

@vamsikrishnamathala
Copy link
Member

@vamsikrishnamathala vamsikrishnamathala commented Sep 10, 2025

Description

This update fixes the build errors caused by calendar picker's version update and also the styles override in the calendar picker implementation.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Improvement (change that would cause existing functionality to not work as expected)
  • Code refactoring
  • Performance improvements
  • Documentation update

Screenshots and Media (if applicable)

Test Scenarios

References

Summary by CodeRabbit

  • Refactor
    • Improved type-safety across date pickers, date-range selector, snooze scheduling, and analytics labeling; no visible UI or behavior changes.
  • Style
    • Consolidated calendar styling to a consistent rounded, bordered appearance across date controls.
  • Chores
    • Minor internal cleanup in analytics data handling with no impact on displayed labels or data fetching.

@vamsikrishnamathala vamsikrishnamathala self-assigned this Sep 10, 2025
@vamsikrishnamathala vamsikrishnamathala added the 🐛bug Something isn't working label Sep 10, 2025
JayashTripathy
JayashTripathy previously approved these changes Sep 10, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 10, 2025

Walkthrough

Types were tightened for Calendar onSelect handlers (Date | undefined or DateRange | undefined). In analytics/total-insights, the i18n function parameter type was refined and an unused destructured field (selectedDurationLabel) was removed. No runtime behavior or public API changes.

Changes

Cohort / File(s) Summary
Analytics i18n typing
apps/web/core/components/analytics/total-insights.tsx
Refined t parameter type to (key: string, params?: Record<string, unknown>) => string and removed selectedDurationLabel from useAnalytics() destructuring. Rendering and data fetching unchanged.
Calendar onSelect typing & styling
apps/web/core/components/core/filters/date-filter-modal.tsx, apps/web/core/components/dropdowns/date-range.tsx, apps/web/core/components/dropdowns/date.tsx, apps/web/core/components/inbox/modals/snooze-issue-modal.tsx
Switched Calendar styling to className="rounded-md border border-custom-border-200 p-3" and added explicit onSelect parameter types (`Date

Sequence Diagram(s)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

🛠️refactor

Suggested reviewers

  • sriramveeraghanta
  • anmolsinghbhatia

Poem

A nibble of types, a crunch of dates,
I hop through code and tidy traits.
Calendars whisper "maybe none,"
I catch the fall and set the sun.
Insights trimmed and styling neat—thump-thump! 🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 323e3ea and 1d3ed48.

📒 Files selected for processing (4)
  • apps/web/core/components/core/filters/date-filter-modal.tsx (2 hunks)
  • apps/web/core/components/dropdowns/date-range.tsx (1 hunks)
  • apps/web/core/components/dropdowns/date.tsx (1 hunks)
  • apps/web/core/components/inbox/modals/snooze-issue-modal.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
  • apps/web/core/components/dropdowns/date-range.tsx
  • apps/web/core/components/inbox/modals/snooze-issue-modal.tsx
  • apps/web/core/components/core/filters/date-filter-modal.tsx
  • apps/web/core/components/dropdowns/date.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: Build and lint web apps
  • GitHub Check: Analyze (javascript)

Pre-merge checks (2 passed, 1 warning)

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The description outlines the overall fix and correctly marks the change type, but it omits details under the Screenshots and Media, Test Scenarios, and References sections that are expected by the repository template. Please provide any relevant screenshots or media demonstrating the style updates, list the test scenarios you executed to verify the fixes, and include references to related issues or tickets to fully satisfy the template requirements.
✅ Passed checks (2 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
Title Check ✅ Passed The current title concisely describes the primary focus of the changeset by referencing calendar picker build errors and styling overrides, which represent the majority of the updates to various calendar components. It clearly indicates that this PR addresses a bug fix related to the calendar picker implementation. Although the PR also includes a minor analytics type adjustment, the title highlights the most significant change from the developer’s perspective.
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-calender_picker_build_errors

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
Contributor

@coderabbitai coderabbitai bot left a 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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
apps/web/core/components/inbox/modals/snooze-issue-modal.tsx (1)

68-72: Runtime bug: close() is undefined — call handleClose() instead.
Clicking the button will throw at runtime.

Apply this diff:

-  <Button
+  <Button
     variant="primary"
     onClick={() => {
-      close();
-      onConfirm(date);
+      handleClose();
+      onConfirm(date);
     }}
   >
apps/web/core/components/core/filters/date-filter-modal.tsx (1)

47-50: Bug: date2 watches date1, breaking validation and disabling logic.
This makes isInvalid and disabled checks unreliable.

-const date1 = getDate(watch("date1"));
-const date2 = getDate(watch("date1"));
+const date1 = getDate(watch("date1"));
+const date2 = getDate(watch("date2"));
🧹 Nitpick comments (3)
apps/web/core/components/inbox/modals/snooze-issue-modal.tsx (1)

54-56: Avoid redundant new Date wrapping on every render.
date is already a Date; cloning each render is unnecessary.

- selected={date ? new Date(date) : undefined}
- defaultMonth={date ? new Date(date) : undefined}
+ selected={date || undefined}
+ defaultMonth={date || undefined}
apps/web/core/components/dropdowns/date-range.tsx (1)

277-279: onSelect typing matches new Calendar signature — consider updating local state too.
Current code relies on the parent to reflect selection; updating local state improves UX in controlled+local scenarios.

- onSelect={(val: DateRange | undefined) => {
-   onSelect?.(val);
- }}
+ onSelect={(val: DateRange | undefined) => {
+   setDateRange(val ?? { from: undefined, to: undefined });
+   onSelect?.(val);
+ }}
apps/web/core/components/analytics/total-insights.tsx (1)

55-69: SWR key includes selectedDuration but fetcher ignores it.
Either include it in the request or drop it from the key to avoid unnecessary cache busts.

- `total-insights-${analyticsType}-${selectedDuration}-${selectedProjects}-${selectedCycle}-${selectedModule}-${isEpic}`,
+ `total-insights-${analyticsType}-${selectedProjects}-${selectedCycle}-${selectedModule}-${isEpic}`,

Or uncomment and pass date_filter: selectedDuration in the payload.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between db18c35 and 323e3ea.

📒 Files selected for processing (5)
  • apps/web/core/components/analytics/total-insights.tsx (2 hunks)
  • apps/web/core/components/core/filters/date-filter-modal.tsx (2 hunks)
  • apps/web/core/components/dropdowns/date-range.tsx (1 hunks)
  • apps/web/core/components/dropdowns/date.tsx (1 hunks)
  • apps/web/core/components/inbox/modals/snooze-issue-modal.tsx (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
apps/web/core/components/dropdowns/date-range.tsx (1)
packages/propel/src/calendar/index.ts (1)
  • DateRange (2-2)
apps/web/core/components/analytics/total-insights.tsx (1)
packages/i18n/src/store/index.ts (1)
  • t (224-245)
🔇 Additional comments (6)
apps/web/core/components/inbox/modals/snooze-issue-modal.tsx (1)

56-59: onSelect typing aligns with Calendar update — looks good.
The explicit Date | undefined param matches the updated calendar API. No behavior change.

apps/web/core/components/core/filters/date-filter-modal.tsx (2)

104-107: onSelect typing: OK.
Explicit Date | undefined improves type safety without behavior change.


129-132: Second calendar onSelect typing: OK.
Consistent with the first calendar and the updated API.

apps/web/core/components/dropdowns/date.tsx (1)

185-187: onSelect typing: looks good.
date ?? null keeps the public onChange(Date | null) contract intact.

apps/web/core/components/analytics/total-insights.tsx (2)

22-22: t() parameter typing aligned with i18n store — good.
Matches t(key: string, params?: Record<string, unknown>): string.


53-53: Removed selectedDurationLabel from destructuring — fine.
No downstream usage here; safe cleanup.

@vamsikrishnamathala vamsikrishnamathala changed the title fix: calender picker build errors fix: calendar picker build errors and styles fix Sep 10, 2025
@vamsikrishnamathala vamsikrishnamathala changed the title fix: calendar picker build errors and styles fix [WEB-4874]fix: calendar picker build errors and styles override Sep 10, 2025
@makeplane
Copy link

makeplane bot commented Sep 10, 2025

Pull Request Linked with Plane Work Items

Comment Automatically Generated by Plane

@pushya22 pushya22 merged commit ac835bf into preview Sep 10, 2025
6 of 8 checks passed
@pushya22 pushya22 deleted the fix-calender_picker_build_errors branch September 10, 2025 11:40
yarikoptic pushed a commit to yarikoptic/plane that referenced this pull request Oct 1, 2025
…plane#7762)

* fix: calender picker build errors

* fix: styles override in the picker implementation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐛bug Something isn't working ready to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants