Skip to content
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

Add InputDatePicker type in inputTypes.ts #601

Merged
merged 1 commit into from
Jul 18, 2024

Conversation

samuel-duhaime
Copy link
Collaborator

Pull request

Justification

There is no type for InputDatePicker, it's easy to make errors with this input.

Description

Add InputDatePicker type in inputTypes.ts

@samuel-duhaime samuel-duhaime requested a review from tahini July 17, 2024 15:32
Copy link
Contributor

@tahini tahini left a comment

Choose a reason for hiding this comment

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

Je vais l'approuver parce qu'on a #532 pour uniformiser les types, à faire bientôt...

@@ -298,3 +298,21 @@ export type InputMapFindPlace = InputMapFindPlaceBase & {

/* InfoMap widgetConfig Type */
export type InfoMap = InfoMapWidgetConfig;

/* InputDatePicker widgetConfig Type */
export type InputDatePicker = {
Copy link
Contributor

Choose a reason for hiding this comment

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

Voir le InputDatePickerType dans WidgetConfig.ts. D'ailleurs il faudrait vraiment uniformiser les types entre le générateur et WidgetConfig, mais la façon dont ils sont décrits ne le permet pas efficacement actuellement, pour les questions du moins. Mais les types du WidgetConfig sont plus complets. Par exemple, pour locale, la clé est le code de langue et non fixé à 'fr', 'en' et les max/minDate peuvent aussi être une date hardcodée et pas qu'une fonction.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

C'est bon. Il va falloir uniformiser cela dès que possible.

@samuel-duhaime samuel-duhaime merged commit 0a29b3a into main Jul 18, 2024
4 checks passed
samuel-duhaime added a commit that referenced this pull request Jul 19, 2024
@tahini tahini deleted the addInputDatePickerType branch September 24, 2024 19:46
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