Skip to content

Conversation

sergiocarracedo
Copy link
Collaborator

@sergiocarracedo sergiocarracedo commented Oct 2, 2025

  • chore: day string
  • feat: better week, month, quarter, half, year tostring
  • chore: fixes
  • fix: vaklue update on select

Description

  • Improve the toString format for the distinct granularities, specially for ranges, for example:

    • 29-01-2025 -> 31-01-2025 becomes 29 -> 31 Jan 2025 (before was 29/01/29025 -> 31/Jan/2025
    • 29-01-2025 -> 03-02-2025 becomes 29 Jan -> 3 Feb 2025
  • fix: Week granularity for single week

  • fix: reset selection to the from date on granularity change to avoid select multiple items when granulary passes from examploe from month to days

  • fix: select componet doesnt update the option when the value prop changes

Screenshots (if applicable)

image image
Screen.Recording.2025-10-02.at.16.28.21.mov

Implementation details

@sergiocarracedo sergiocarracedo requested a review from a team as a code owner October 2, 2025 14:26
Copy link
Contributor

github-actions bot commented Oct 2, 2025

🔍 Visual review for your branch is published 🔍

Here are the links to:

Copy link
Contributor

github-actions bot commented Oct 2, 2025

Coverage Report for packages/react

Status Category Percentage Covered / Total
🔵 Lines 16.9% 16332 / 96598
🔵 Statements 16.9% 16332 / 96598
🔵 Functions 44.06% 828 / 1879
🔵 Branches 70.72% 2305 / 3259
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/react/src/experimental/Forms/Fields/Select/index.tsx 87.71% 72.22% 72.72% 87.71% 143-145, 224-225, 232-234, 236-239, 244, 257, 290-294, 353-354, 416-433, 438-439, 446-448, 465-467, 469-470, 544-546
packages/react/src/experimental/OneCalendar/OneCalendar.tsx 59.32% 52.94% 11.76% 59.32% 29-41, 44-51, 105-108, 115-121, 137-138, 142-150, 155-169, 177-179, 200-215, 229-236, 240-257
packages/react/src/experimental/OneCalendar/granularities/day/index.tsx 91.89% 87.87% 100% 91.89% 41-42, 69-73, 104-105
packages/react/src/experimental/OneCalendar/granularities/halfyear/index.tsx 86.09% 88% 94.73% 86.09% 84-85, 94-95, 117-118, 148-149, 184-197
packages/react/src/experimental/OneCalendar/granularities/month/index.tsx 74.16% 87.09% 86.66% 74.16% 45-46, 67-68, 98-99, 127-139, 144-157
packages/react/src/experimental/OneCalendar/granularities/quarter/index.tsx 82.4% 86.2% 93.33% 82.4% 43-44, 66-67, 97-98, 131-144
packages/react/src/experimental/OneCalendar/granularities/week/index.tsx 84.44% 83.78% 93.75% 84.44% 41-42, 67-68, 102-103, 139-140, 175-188
packages/react/src/experimental/OneCalendar/granularities/year/index.tsx 81.72% 86.95% 92.3% 81.72% 34-35, 69-70, 99-112
packages/react/src/experimental/OneDateNavigator/__stories__/OneDateNavigator.stories.tsx 0% 0% 0% 0% 1-246
packages/react/src/lib/providers/i18n/i18n-provider-defaults.ts 100% 100% 100% 100%
Generated in workflow #8347 for commit b71b820 by the Vitest Coverage Report Action

Copy link
Contributor

github-actions bot commented Oct 2, 2025

size-limit report 📦

Path Size
JS: Stable 581.5 KB (+0.05% 🔺)
JS: Experimental 968.03 KB (+0.08% 🔺)
CSS 71.93 KB (0%)

@@ -186,7 +186,7 @@ export const WithCompareTo: Story = {
} as DatePickerValue,
granularities: ["day", "week", "month"],
minDate: subDays(today, 30), // Can't select dates before 30 days ago
maxDate: today, // Can't select dates after today
//maxDate: today, // Can't select dates after today
Copy link
Contributor

Choose a reason for hiding this comment

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

uncomment?

@sergiocarracedo sergiocarracedo merged commit 570c2b1 into main Oct 9, 2025
20 checks passed
@sergiocarracedo sergiocarracedo deleted the FCT-37288-improve-dates-range-human-readable-strings branch October 9, 2025 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants