-
Notifications
You must be signed in to change notification settings - Fork 28
feat(datepicker): Component refactoring and new tokens #2316
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: new-navigation
Are you sure you want to change the base?
Conversation
|
Qovery can create a Preview Environment for this PR.
This comment has been generated from Qovery AI 🤖.
|
…ing dark mode styles and improving color tokens for better consistency
b804145 to
81883c0
Compare
…nced functionality and styling
| @@ -0,0 +1,399 @@ | |||
| import { useEffect, useRef, useState } from 'react' | |||
There was a problem hiding this comment.
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' | |||
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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
| const localTimeZone = (() => { | ||
| try { | ||
| return Intl.DateTimeFormat().resolvedOptions().timeZone | ||
| } catch { | ||
| return '' | ||
| } | ||
| })() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| const localTimeZone = (() => { | |
| try { | |
| return Intl.DateTimeFormat().resolvedOptions().timeZone | |
| } catch { | |
| return '' | |
| } | |
| })() | |
| const localTimeZone = useMemo(() => { | |
| try { | |
| return Intl.DateTimeFormat().resolvedOptions().timeZone | |
| } catch (error) { | |
| return 'Local' | |
| } | |
| }, []) |
…s across components + file architecture
Summary
Refactor of the date-picker component to add new tokens and behaviors. Changes:
Screenshots / Recordings
Testing
yarn testoryarn test -u(if you need to regenerate snapshots)yarn formatyarn lintPR Checklist
.cursor/rules)feat(service): add new Terraform service) - required for semantic-release