You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "github-actions[bot] (via GitHub)" <gi...@apache.org> on 2026/10/18 08:58:45 UTC
[PR] [v3-4-test] UI: Use RadioCardRoot's typed onValueChange instead of DOM casts (#73985) [airflow]
github-actions[bot] opened a new pull request, #74979:
URL: https://github.com/apache/airflow/pull/74979
Reading the selected value off a raw change event required casting
event.target to HTMLInputElement, and for the enum/union-typed call
sites a second `as` cast on top of that. Those casts are unchecked: a
radio value renamed in the markup but not in the type still compiles
and only breaks at runtime. Chakra v3's RadioCard.Root already hands
the value to onValueChange, so narrowing can be done with a type
predicate and the compiler verifies the value set matches the type.
The predicate was being hand-written per call site, so it moves to
src/utils/isOneOf.ts and narrows to the literal union of the values it
is given. Where a generated API type already describes that union the
values are checked against it, rather than a hand-maintained copy.
Two CreateAssetEventModal tests had to await the submit button: the
value now arrives through Ark UI's state machine, so the re-render no
longer lands synchronously inside fireEvent.
(cherry picked from commit fdf4adce2a3e04ad11f6ab262fcb36fb0ac36c42)
Co-authored-by: Brent Bovenzi <br...@astronomer.io>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [v3-4-test] UI: Use RadioCardRoot's typed onValueChange instead of DOM casts (#73985) [airflow]
Posted by "vatsrahul1001 (via GitHub)" <gi...@apache.org>.
vatsrahul1001 merged PR #74979:
URL: https://github.com/apache/airflow/pull/74979
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org