jscheffl commented on code in PR #45908:
URL: https://github.com/apache/airflow/pull/45908#discussion_r1927187293


##########
airflow/ui/src/components/SearchDags/SearchDagsButton.tsx:
##########
@@ -31,10 +32,19 @@ export const SearchDagsButton = () => {
     setIsOpen(false);
   };
 
+  useHotkeys(
+    "mod+k",
+    () => {
+      setIsOpen(true);
+    },
+    [isOpen],
+    { preventDefault: true },
+  );
+
   return (
     <Box>
       <Button justifyContent="flex-start" onClick={() => setIsOpen(true)} 
variant="subtle" w={200}>
-        <MdSearch /> Search Dags
+        <MdSearch /> Search Dags <Kbd size="lg">⌘K</Kbd>

Review Comment:
   Aaah, my bad I was looking at the "wrong" dialog, the DAG list view. The new 
control is on the DAG detail view. Can report... the problem was roughly 50cm 
in front of the keyboard. Function is working.
   
   Will you add the same to DAG list view in another PR or can you make it 
consistent within the same PR?



##########
airflow/ui/src/components/SearchDags/SearchDagsButton.tsx:
##########
@@ -31,10 +32,19 @@ export const SearchDagsButton = () => {
     setIsOpen(false);
   };
 
+  useHotkeys(
+    "mod+k",
+    () => {
+      setIsOpen(true);
+    },
+    [isOpen],
+    { preventDefault: true },
+  );
+
   return (
     <Box>
       <Button justifyContent="flex-start" onClick={() => setIsOpen(true)} 
variant="subtle" w={200}>
-        <MdSearch /> Search Dags
+        <MdSearch /> Search Dags <Kbd size="lg">⌘K</Kbd>

Review Comment:
   Aaah, my bad I was looking at the "wrong" dialog, the DAG list view. The new 
control is on the DAG detail view. Can report... the problem was roughly 50cm 
in front of the keyboard. Function is working.
   
   Will you add the same to DAG list view in another PR or can you make it 
consistent within the same PR?



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