You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "anshuksi282-ksolves (via GitHub)" <gi...@apache.org> on 2025/10/12 14:24:06 UTC
[PR] Fix: Adjust PanelButtons spacing and alignment [airflow]
anshuksi282-ksolves opened a new pull request, #56570:
URL: https://github.com/apache/airflow/pull/56570
## Fix mis-aligned padding for Graph View options buttons
**Issue** #56076
**Description:**
This PR fixes the mis-aligned padding for the Graph View options buttons in the Airflow Web UI (3.1.0rc2).
**Background:**
The buttons on the upper-right (and slightly on the upper-left) of the Graph View were overlapping with the splitter due to inconsistent padding.
Although this issue was previously assigned to another contributor @alisha-malik, no PR has been submitted in the past 2 weeks. I started working on it now to resolve the open UI bug.
**What this PR does:**
- Corrects the padding for Graph View option buttons to ensure consistent alignment on all sides.
- Prevents the buttons from overlapping with the splitter in both left and right positions.
**Notes:**
- Minor UI fix; does not affect core functionality.
- Before
<img width="1084" height="140" alt="Screenshot from 2025-10-12 18-27-14" src="https://github.com/user-attachments/assets/f0c31a00-d6c4-4e03-a20f-0256f5d54950" />
- After
<img width="978" height="140" alt="Screenshot from 2025-10-12 19-03-18" src="https://github.com/user-attachments/assets/150d7d47-06f9-4595-9bad-f4df71f389ca" />
<img width="1084" height="140" alt="Screenshot from 2025-10-12 19-03-00" src="https://github.com/user-attachments/assets/acff7035-ebc0-49c3-bdd0-ad7b641eac40" />
<!-- Please keep an empty line above the dashes. -->
---
**^ Add meaningful description above**
Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#pull-request-guidelines)** for more information.
In case of fundamental code changes, an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals)) is needed.
In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
In case of backwards incompatible changes please leave a note in a newsfragment file, named `{pr_number}.significant.rst` or `{issue_number}.significant.rst`, in [airflow-core/newsfragments](https://github.com/apache/airflow/tree/main/airflow-core/newsfragments).
--
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] Fix: Adjust PanelButtons spacing and alignment [airflow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #56570:
URL: https://github.com/apache/airflow/pull/56570#issuecomment-3432226626
### Backport successfully created: v3-1-test
<table>
<tr>
<th>Status</th>
<th>Branch</th>
<th>Result</th>
</tr>
<tr>
<td>✅</td>
<td>v3-1-test</td>
<td><a href="https://github.com/apache/airflow/pull/57062"><img src="https://img.shields.io/badge/PR-57062-blue" alt="PR Link"></a></td>
</tr>
</table>
--
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] Fix: Adjust PanelButtons spacing and alignment [airflow]
Posted by "bbovenzi (via GitHub)" <gi...@apache.org>.
bbovenzi commented on PR #56570:
URL: https://github.com/apache/airflow/pull/56570#issuecomment-3411015890
Thanks! Do you mind adding a bg to the buttons while you're at it so we don't get the graph dots seeping through?
--
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] Fix: Adjust PanelButtons spacing and alignment [airflow]
Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on PR #56570:
URL: https://github.com/apache/airflow/pull/56570#issuecomment-3432222222
Awesome work, congrats on your first merged pull request! You are invited to check our [Issue Tracker](https://github.com/apache/airflow/issues) for additional contributions.
--
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] Fix: Adjust PanelButtons spacing and alignment [airflow]
Posted by "anshuksi282-ksolves (via GitHub)" <gi...@apache.org>.
anshuksi282-ksolves commented on PR #56570:
URL: https://github.com/apache/airflow/pull/56570#issuecomment-3414303707
@bbovenzi Thanks for the suggestion! I’ve added a background to the buttons to prevent the graph dots from seeping through. The bg color now changes based on the active state, and hover effects are preserved.
@pierrejeambrun Thanks for the feedback! I’ve removed the negative margins and adjusted the padding so that the left button group aligns properly with the right options button. Now the spacing is consistent with the container, and no manual negative margins are needed.
<img width="993" height="150" alt="Screenshot from 2025-10-17 12-54-01" src="https://github.com/user-attachments/assets/fb1a67cd-4f8a-4ea6-a774-ebff6b400886" />
<img width="1082" height="76" alt="Screenshot from 2025-10-17 13-27-02" src="https://github.com/user-attachments/assets/b0501f2f-a468-4ba5-8461-3dff6250d687" />
--
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] Fix: Adjust PanelButtons spacing and alignment [airflow]
Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun commented on code in PR #56570:
URL: https://github.com/apache/airflow/pull/56570#discussion_r2438973363
##########
airflow-core/src/airflow/ui/src/layouts/Details/PanelButtons.tsx:
##########
@@ -223,11 +223,17 @@ export const PanelButtons = ({
);
return (
- <Box position="absolute" ref={containerRef} top={1} width="100%" zIndex={1}>
- <Flex justifyContent="space-between">
+ <Box position="absolute" px={2} ref={containerRef} top={1} width="100%" zIndex={1}>
+ <Flex justifyContent="space-between" pl={2}>
<ButtonGroup attached size="sm" variant="outline">
<IconButton
+ _hover={{
+ bg: "brand.500",
+ color: "white",
+ }}
Review Comment:
I would remove this too.
##########
airflow-core/src/airflow/ui/src/layouts/Details/PanelButtons.tsx:
##########
@@ -223,11 +223,17 @@ export const PanelButtons = ({
);
return (
- <Box position="absolute" ref={containerRef} top={1} width="100%" zIndex={1}>
- <Flex justifyContent="space-between">
+ <Box position="absolute" px={2} ref={containerRef} top={1} width="100%" zIndex={1}>
+ <Flex justifyContent="space-between" pl={2}>
<ButtonGroup attached size="sm" variant="outline">
<IconButton
+ _hover={{
+ bg: "brand.500",
+ color: "white",
+ }}
Review Comment:
not needed since you have a bg color now.
##########
airflow-core/src/airflow/ui/src/layouts/Details/PanelButtons.tsx:
##########
@@ -250,17 +261,22 @@ export const PanelButtons = ({
}
}}
title={translate("dag:panel.buttons.showGraphShortcut")}
- variant={dagView === "graph" ? "solid" : "outline"}
>
<MdOutlineAccountTree />
</IconButton>
</ButtonGroup>
- <Flex gap={1}>
+ <Flex alignItems="center" gap={1} justifyContent="space-between" pl={2} pr={6}>
<ToggleGroups />
{/* eslint-disable-next-line jsx-a11y/no-autofocus */}
<Popover.Root autoFocus={false} positioning={{ placement: "bottom-end" }}>
<Popover.Trigger asChild>
- <Button size="sm" variant="outline">
+ <Button
+ _hover={{ bg: "brand.500", color: "white" }}
+ bg="var(--chakra-colors-bg-subtle)"
Review Comment:
Maybe that?
```suggestion
bg="bg.suble"
```
##########
airflow-core/src/airflow/ui/src/layouts/Details/PanelButtons.tsx:
##########
@@ -236,12 +242,17 @@ export const PanelButtons = ({
}
}}
title={translate("dag:panel.buttons.showGridShortcut")}
- variant={dagView === "grid" ? "solid" : "outline"}
>
<FiGrid />
</IconButton>
<IconButton
+ _hover={{
+ bg: "brand.500",
+ color: "white",
+ }}
Review Comment:
I would remove this. (has no effect on the grid view
##########
airflow-core/src/airflow/ui/src/layouts/Details/PanelButtons.tsx:
##########
@@ -223,11 +223,17 @@ export const PanelButtons = ({
);
return (
- <Box position="absolute" ref={containerRef} top={1} width="100%" zIndex={1}>
- <Flex justifyContent="space-between">
+ <Box position="absolute" px={2} ref={containerRef} top={1} width="100%" zIndex={1}>
+ <Flex justifyContent="space-between" pl={2}>
<ButtonGroup attached size="sm" variant="outline">
<IconButton
+ _hover={{
+ bg: "brand.500",
+ color: "white",
+ }}
aria-label={translate("dag:panel.buttons.showGridShortcut")}
+ bg={dagView === "grid" ? "brand.500" : "var(--chakra-colors-bg-subtle)"}
Review Comment:
bg.subtle here to.
--
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] Fix: Adjust PanelButtons spacing and alignment [airflow]
Posted by "anshuksi282-ksolves (via GitHub)" <gi...@apache.org>.
anshuksi282-ksolves commented on PR #56570:
URL: https://github.com/apache/airflow/pull/56570#issuecomment-3430576638
Hi @bbovenzi, @pierrejeambrun,
Thanks for your suggestions!
I’ve applied your feedback:
_hover removed from PanelButtons as it was unnecessary
bg updated to bg.subtle
All spacing, alignment, and background fixes remain intact. Ready for final review.
--
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] Fix: Adjust PanelButtons spacing and alignment [airflow]
Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun merged PR #56570:
URL: https://github.com/apache/airflow/pull/56570
--
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] Fix: Adjust PanelButtons spacing and alignment [airflow]
Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun commented on code in PR #56570:
URL: https://github.com/apache/airflow/pull/56570#discussion_r2436524883
##########
airflow-core/src/airflow/ui/src/layouts/Details/PanelButtons.tsx:
##########
@@ -223,7 +223,7 @@ export const PanelButtons = ({
);
return (
- <Box position="absolute" ref={containerRef} top={1} width="100%" zIndex={1}>
+ <Box ml="-2px" position="absolute" px={4} ref={containerRef} top={1} width="100%" zIndex={1}>
Review Comment:
Also there's probably a way to get away with that without specifying negative margins which are usually a mess to deal with.
--
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