pierrejeambrun commented on code in PR #53064:
URL: https://github.com/apache/airflow/pull/53064#discussion_r2210635368


##########
airflow-core/src/airflow/ui/src/pages/Dag/Header.tsx:
##########
@@ -108,7 +111,29 @@ export const Header = ({
               />
             )}
             <FavoriteDagButton dagId={dag.dag_id} withText={true} />
-            <ParseDag dagId={dag.dag_id} fileToken={dag.file_token} />
+            <Menu.Root>
+              <Menu.Trigger asChild>
+                <Button aria-label={translate("dag:header.buttons.advanced")} 
variant="outline">
+                  <LuMenu />
+                </Button>
+              </Menu.Trigger>
+              <Portal>
+                <Menu.Positioner>
+                  <Menu.Content>
+                    <Menu.Item value="reparse">
+                      <ParseDag dagId={dag.dag_id} fileToken={dag.file_token} 
/>
+                    </Menu.Item>
+                    <Menu.Item closeOnSelect={false} value="delete">
+                      <DeleteDagButton
+                        dagDisplayName={dag.dag_display_name}
+                        dagId={dag.dag_id}
+                        variant="outline"
+                      />
+                    </Menu.Item>
+                  </Menu.Content>
+                </Menu.Positioner>
+              </Portal>
+            </Menu.Root>

Review Comment:
   I don't think we need a menu, buttons automatically collapse to only display 
the icon if there is not enough space in the page.
   
   Also at the moment there is plenty of space left. (TI and DagRuns have 3 
actions each and it's not an issue)



##########
airflow-core/src/airflow/ui/src/components/DagActions/DeleteDagButton.tsx:
##########
@@ -51,7 +57,7 @@ const DeleteDagButton = ({ dagDisplayName, dagId, withText = 
true }: DeleteDagBu
         icon={<FiTrash2 />}
         onClick={onOpen}
         text={translate("dagActions.delete.button")}
-        variant="solid"
+        variant={variant}

Review Comment:
   You don't need that. If you take a look at the `ActionButton` definition 
you'll see that the variant is `ghost` whenever `withText` is True.
   
   You can take a look at the `FavoriteDagButton`, just specifying `withText` 
should be enough.



-- 
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]

Reply via email to