Skip to content

Conversation

@TheoGrandin74
Copy link
Contributor

@TheoGrandin74 TheoGrandin74 commented Jan 19, 2026

Summary

Refactor of the date-picker component to add new tokens and behaviors. Changes:

  • Date-picker-header handle the header of the calendar like before
  • Date-picker-calendar handle the calendar section and its behaviors
  • Date-picker-period-list handle the period list and is a boolean to be displayed or not
  • Date-picker is the master component that combine all the relevant date-picker sub components
  • Added types.ts and utils.ts file to handle all the props/function in separated files

Screenshots / Recordings

Testing

  • Changes tested locally in the relevant Console's pages and Storybooks
  • yarn test or yarn test -u (if you need to regenerate snapshots)
  • yarn format
  • yarn lint

PR Checklist

  • I followed naming, styling, and TypeScript rules (see .cursor/rules)
  • I performed a self-review (diff inspected, dead code removed)
  • I titled the PR using Conventional Commits with a scope when possible (e.g. feat(service): add new Terraform service) - required for semantic-release
  • I only kept necessary comments, written in English (watch for useless AI comments)
  • I involved a designer to validate UI changes if I am not a designer
  • I covered new business logic with tests (unit)
  • I confirmed CI is green (Codecov red can be accepted)
  • I reviewed and executed locally any AI-assisted code

@RemiBonnet
Copy link
Member

Qovery Preview

Qovery can create a Preview Environment for this PR.
To trigger its creation, please post a comment with one of the following command.

Command Blueprint environment
/qovery preview 15d69f24-9bc1-4a8d-80fe-d1bb1b2bcd00 New Navigation
/qovery preview {all|UUID1,UUID2,...} To preview multiple environments

This comment has been generated from Qovery AI 🤖.
Below, a word from its wisdom :

One day they will all understand

…ing dark mode styles and improving color tokens for better consistency
@TheoGrandin74 TheoGrandin74 force-pushed the feat/datepicker-refactoring branch from b804145 to 81883c0 Compare January 19, 2026 17:08
@TheoGrandin74 TheoGrandin74 changed the title Feat/datepicker refactoring feat(datepicker): Component refactoring and new tokens Jan 20, 2026
@TheoGrandin74 TheoGrandin74 marked this pull request as ready for review January 20, 2026 16:54
@TheoGrandin74 TheoGrandin74 requested a review from rmnbrd January 21, 2026 16:02
@@ -0,0 +1,399 @@
import { useEffect, useRef, useState } from 'react'
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you create a folder libs/shared/ui/src/lib/components/date-picker/date-picker-calendar and move this file into it?

@@ -0,0 +1,65 @@
import { twMerge } from '@qovery/shared/util-js'
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you create a folder libs/shared/ui/src/lib/components/date-picker/date-picker-period-list and move this file into it?

onChange,
minDate,
maxDate,
showTimeInput,
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would be clearer to rename this to something like showDateTimeInputs

Comment on lines 42 to 48
const localTimeZone = (() => {
try {
return Intl.DateTimeFormat().resolvedOptions().timeZone
} catch {
return ''
}
})()
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
const localTimeZone = (() => {
try {
return Intl.DateTimeFormat().resolvedOptions().timeZone
} catch {
return ''
}
})()
const localTimeZone = useMemo(() => {
try {
return Intl.DateTimeFormat().resolvedOptions().timeZone
} catch (error) {
return 'Local'
}
}, [])

@TheoGrandin74 TheoGrandin74 requested a review from rmnbrd January 23, 2026 16:19
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.

4 participants