pierrejeambrun commented on code in PR #62172:
URL: https://github.com/apache/airflow/pull/62172#discussion_r2840908334
##########
airflow-core/src/airflow/ui/src/layouts/Nav/Nav.tsx:
##########
@@ -100,6 +103,15 @@ export const Nav = () => {
const { selectedTimezone } = useTimezone();
const offset = getTimezoneOffsetString(selectedTimezone);
const tooltipLabel = getTimezoneTooltipLabel(selectedTimezone);
+ const theme = useConfig("theme") as unknown as { icon?: string;
icon_dark_mode?: string } | undefined;
+
+ // Custom icons handling
+ const { colorMode } = useColorMode();
+ const darkIcon = theme?.icon_dark_mode ?? undefined;
+ const lightIcon = theme?.icon ?? undefined;
+ const iconSrc = colorMode === "dark" && darkIcon !== undefined ? darkIcon :
lightIcon;
+ const hasIconSrc = Boolean(iconSrc);
+ const [failedLoadingCustomIcon, setFailedLoadingCustomIcon] = useState({
dark: false, light: false });
Review Comment:
Yes there is no retry logic, if the img fail to load once it will default to
airflow logo.
Your message above stand also for light mode, because we only load the img
once for the entire app. (layout isn't re-rendered).
We can improve later but I don't think it's worth to add super complex retry
logic for this.
--
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]