Skip to content

fix(react): Small adjustments to some components.#1624

Merged
ditman merged 1 commit into
a2ui-project:mainfrom
ditman:react-minor-component-fixes
Jun 16, 2026
Merged

fix(react): Small adjustments to some components.#1624
ditman merged 1 commit into
a2ui-project:mainfrom
ditman:react-minor-component-fixes

Conversation

@ditman

@ditman ditman commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

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; similar to what was needed in the Lit package.

Pre-launch Checklist

If you need help, consider asking for advice on the discussion board.

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.
@ditman ditman requested a review from josemontespg June 12, 2026 02:08

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Comment thread renderers/react/src/v0_9/catalog/basic/components/DateTimeInput.tsx

@josemontespg josemontespg left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Makes sense, thank you for the improvement!

Comment thread renderers/react/src/v0_9/catalog/basic/components/DateTimeInput.tsx
@ditman

ditman commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator Author

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)

@ditman ditman merged commit 426cebd into a2ui-project:main Jun 16, 2026
19 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in A2UI Jun 16, 2026
@ditman ditman deleted the react-minor-component-fixes branch June 16, 2026 01:00
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