bbovenzi commented on code in PR #45908:
URL: https://github.com/apache/airflow/pull/45908#discussion_r1934188023
##########
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:
Well we don't need to know every OS. We only need to detect a Mac. And since
this is only to change between displaying cmd vs ctrl. I think just checking if
the UserAgent string includes "Mac" is sufficient. Accidentally showing ctrl is
pretty low risk.
--
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]