Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 16 additions & 13 deletions airflow-core/src/airflow/ui/src/layouts/Nav/PluginMenuItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,12 @@ export const PluginMenuItem = ({ href, icon, name, topLevel = false, url_route:
to={href}
/>
) : (
<Box alignItems="center" display="flex" gap={2} outline="none" px={2} py="6px">
<Box alignItems="center" display="flex" width="100%">
<Link
aria-label={name}
fontSize="sm"
href={href}
outline="none"
rel="noopener noreferrer"
target="_blank"
width="100%"
Expand Down Expand Up @@ -79,17 +80,19 @@ export const PluginMenuItem = ({ href, icon, name, topLevel = false, url_route:
}

return (
<RouterLink to={`plugin/${urlRoute}`}>
<Box alignItems="center" display="flex" fontSize="sm" gap={2} px={2} py="6px">
{typeof icon === "string" ? (
<Image height="1.25rem" src={icon} width="1.25rem" />
) : urlRoute === "legacy-fab-views" ? (
<RiArchiveStackLine size="1.25rem" />
) : (
<LuPlug size="1.25rem" />
)}
{name}
</Box>
</RouterLink>
<Box width="100%">
<RouterLink style={{ outline: "none" }} to={`plugin/${urlRoute}`}>
<Box alignItems="center" display="flex" fontSize="sm">
{typeof icon === "string" ? (
<Image height="1.25rem" src={icon} width="1.25rem" />
) : urlRoute === "legacy-fab-views" ? (
<RiArchiveStackLine size="1.25rem" />
) : (
<LuPlug size="1.25rem" />
)}
{name}
</Box>
</RouterLink>
</Box>
);
};
4 changes: 2 additions & 2 deletions airflow-core/src/airflow/ui/src/layouts/Nav/PluginMenus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export const PluginMenus = () => {
</Menu.Trigger>
<Menu.Content>
{buttons.map((externalView) => (
<Menu.Item asChild key={externalView.name} value={externalView.name}>
<Menu.Item key={externalView.name} value={externalView.name}>
<PluginMenuItem {...externalView} />
</Menu.Item>
))}
Expand All @@ -104,7 +104,7 @@ export const PluginMenus = () => {
</Menu.TriggerItem>
<Menu.Content>
{menuButtons.map((externalView) => (
<Menu.Item asChild key={externalView.name} value={externalView.name}>
<Menu.Item key={externalView.name} value={externalView.name}>
<PluginMenuItem {...externalView} />
</Menu.Item>
))}
Expand Down