From 824d4df49fa8f9902b42fed61c421e438a81af5e Mon Sep 17 00:00:00 2001 From: Jonathan Sick Date: Wed, 3 Jul 2024 15:08:44 -0400 Subject: [PATCH 1/2] Fix capitalization of account settings button Switch from title case to sentence case for consistency across UI. --- .../GafaelfawrUserMenu/GafaelfawrUserMenu.stories.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/squared/src/components/GafaelfawrUserMenu/GafaelfawrUserMenu.stories.tsx b/packages/squared/src/components/GafaelfawrUserMenu/GafaelfawrUserMenu.stories.tsx index ad032cc9..018bae48 100644 --- a/packages/squared/src/components/GafaelfawrUserMenu/GafaelfawrUserMenu.stories.tsx +++ b/packages/squared/src/components/GafaelfawrUserMenu/GafaelfawrUserMenu.stories.tsx @@ -73,7 +73,7 @@ export const Default: Story = { new Map() }}> - Account Settings + Account settings Security tokens From f403ffd461983a579614d1ae4aa2c4b42537c294 Mon Sep 17 00:00:00 2001 From: Jonathan Sick Date: Wed, 3 Jul 2024 16:05:14 -0400 Subject: [PATCH 2/2] Disable opening menu on hover This disables opening the navigation menu on hover, and instead requires the user to click on the trigger to open it. This is generally a better UX because it means that the menu stays open without the user needing to have precise mousing. --- .changeset/many-moles-join.md | 5 +++++ .../src/components/GafaelfawrUserMenu/Menu.tsx | 17 ++++++++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 .changeset/many-moles-join.md diff --git a/.changeset/many-moles-join.md b/.changeset/many-moles-join.md new file mode 100644 index 00000000..338fa46b --- /dev/null +++ b/.changeset/many-moles-join.md @@ -0,0 +1,5 @@ +--- +'@lsst-sqre/squared': minor +--- + +Disable opening and closing the GafaelfawrUserMenu on hover. This is a better UX because it allows for less precise mousing when using the menu. diff --git a/packages/squared/src/components/GafaelfawrUserMenu/Menu.tsx b/packages/squared/src/components/GafaelfawrUserMenu/Menu.tsx index 65e9e852..bd8b36fd 100644 --- a/packages/squared/src/components/GafaelfawrUserMenu/Menu.tsx +++ b/packages/squared/src/components/GafaelfawrUserMenu/Menu.tsx @@ -21,17 +21,28 @@ export const Menu = ({ children, logoutHref, username }: MenuProps) => { - + event.preventDefault()} + onPointerEnter={(event) => event.preventDefault()} + onPointerLeave={(event) => event.preventDefault()} + > {username} - + event.preventDefault()} + onPointerEnter={(event) => event.preventDefault()} + onPointerLeave={(event) => event.preventDefault()} + > {children} Log out - + event.preventDefault()} + onPointerLeave={(event) => event.preventDefault()} + /> );