ashb commented on code in PR #68760:
URL: https://github.com/apache/airflow/pull/68760#discussion_r3528195609
##########
airflow-core/src/airflow/api_fastapi/core_api/services/ui/task_group.py:
##########
@@ -37,6 +38,20 @@ def get_task_group_children_getter() -> Callable:
return methodcaller("hierarchical_alphabetical_sort")
+def _ui_colors(node) -> dict[str, str]:
+ """
+ Return the node's ``ui_color``/``ui_fgcolor`` keys, keeping only valid
Chakra color tokens.
+
+ Legacy values (raw hex, CSS names, the unset defaults) are dropped so the
graph only ever
+ receives colors the UI can resolve against the theme.
+ """
+ return {
+ key: value
+ for key in ("ui_color", "ui_fgcolor")
+ if is_chakra_color_token(value := getattr(node, key, None))
Review Comment:
Does the server need to validate/care about this? Can't it just return
whatever it is given?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]