fix(react): Small adjustments to some components.#1624
Conversation
Adds a few classnames to some of the basic catalog components so they can be located in tests in a similar way to those on Lit and Angular: Card, ChoicePicker, Modal and Tabs. Adds handling for the DateTimeInput value so it conforms with HTML5 values.
There was a problem hiding this comment.
Code Review
This pull request adds missing CSS classes to the Card, ChoicePicker, Modal, and Tabs components to align with other implementations, and updates DateTimeInput to support rendering different input types correctly. A bug was identified in the new normalizeDateTimeValue helper function where values without a 'T' separator (such as date-only or time-only strings) are parsed incorrectly, leading to invalid date or time values.
josemontespg
left a comment
There was a problem hiding this comment.
Makes sense, thank you for the improvement!
|
I ended up not getting in the business of parsing date/time strings. There's some libraries that would help us do this (Intl, any-date-parser) but for now, this is better than the implementation that is currently available (and is functionally equivalent to Lit and Angular) |
Adds a few classnames to some of the basic catalog components so they can be located in tests in a similar way to those on Lit and Angular:
Card,ChoicePicker,ModalandTabs.Adds handling for the DateTimeInput value so it conforms with HTML5 values; similar to what was needed in the Lit package.
Pre-launch Checklist
If you need help, consider asking for advice on the discussion board.