Jasperora commented on code in PR #51946:
URL: https://github.com/apache/airflow/pull/51946#discussion_r2158440938
##########
airflow-core/src/airflow/ui/src/layouts/Details/DetailsLayout.tsx:
##########
@@ -92,50 +112,76 @@ export const DetailsLayout = ({ children, error,
isLoading, tabs }: Props) => {
{dagView === "graph" ? <Graph /> : <Grid limit={limit} />}
</Box>
</Panel>
- <PanelResizeHandle
- className="resize-handle"
- onDragging={(isDragging) => {
- if (!isDragging) {
- const zoom = getZoom();
+ {!isRightPanelCollapsed && (
+ <PanelResizeHandle
+ className="resize-handle"
+ onDragging={(isDragging) => {
+ if (!isDragging) {
+ const zoom = getZoom();
- void fitView({ maxZoom: zoom, minZoom: zoom });
- }
- }}
- >
- <Box bg="fg.subtle" cursor="col-resize" h="100%"
transition="background 0.2s" w={0.5} />
- </PanelResizeHandle>
- <Panel defaultSize={dagView === "graph" ? 30 : 80} minSize={20}>
- <Box display="flex" flexDirection="column" h="100%">
- {children}
- {Boolean(error) || (warningData?.dag_warnings.length ?? 0) > 0 ?
(
- <>
- <ActionButton
- actionName={translate("common:dagWarnings")}
- colorPalette={Boolean(error) ? "red" : "orange"}
- icon={<LuFileWarning />}
- margin="2"
- marginBottom="-1"
- onClick={onOpen}
- rounded="full"
- text={String(warningData?.total_entries ?? 0 +
Number(error))}
- variant="solid"
- />
+ void fitView({ maxZoom: zoom, minZoom: zoom });
+ }
+ }}
+ >
+ <Box
Review Comment:

Hi @guan404ming, thanks for your kind suggestion.
I think `<Box>` starting at line 126 is necessary since it aligns the
`<IconButton>` to center.
I tested UI without it. As the image shows, the IconButton would be in
another position, and the resize line (`<PanelResizeHandle>`) would disappear
although its functionality remains. (You can still drag the line to resize the
right panel although the line disappears.)
Thus, I think we still need the `<Box>`.
--
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]