From 6be91e0d04e35988c655fdd573c971caaa075626 Mon Sep 17 00:00:00 2001 From: rohan Date: Wed, 1 Jul 2026 16:48:16 +0530 Subject: [PATCH 1/2] fix: anchor secret row hover menus to input top edge to prevent sub-pixel gap --- frontend/components/environments/secrets/SecretRow.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/frontend/components/environments/secrets/SecretRow.tsx b/frontend/components/environments/secrets/SecretRow.tsx index 15205489d..4a75c164a 100644 --- a/frontend/components/environments/secrets/SecretRow.tsx +++ b/frontend/components/environments/secrets/SecretRow.tsx @@ -228,7 +228,10 @@ function SecretRow(props: { className={clsx( 'flex gap-1 items-center pt-1 px-1 rounded-t-lg', 'bg-zinc-200 dark:bg-zinc-700', - 'z-10 group-hover:z-10 group-focus-within:z-10 absolute right-0 -top-9 translate-y-9 group-hover:translate-y-0 group-focus-within:translate-y-0 opacity-0 group-hover:opacity-100 group-focus-within:opacity-100', + // Anchor by the bottom edge (bottom-full) so the menu is always flush with the + // input's top edge regardless of its own height — a fixed -top offset leaves a + // sub-pixel gap once the menu is shorter than that offset at smaller text sizes. + 'z-10 group-hover:z-10 group-focus-within:z-10 absolute right-0 bottom-full translate-y-full group-hover:translate-y-0 group-focus-within:translate-y-0 opacity-0 group-hover:opacity-100 group-focus-within:opacity-100', 'transition ease' )} > @@ -277,7 +280,10 @@ function SecretRow(props: { className={clsx( 'flex gap-1 items-start pt-1 rounded-t-lg right-0 px-1 transition ease', 'bg-zinc-200 dark:bg-zinc-700', - 'z-10 absolute -top-9 opacity-0 group-hover:opacity-100 group-focus-within:opacity-100 translate-y-9 group-hover:translate-y-0 group-focus-within:translate-y-0' + // Anchor by the bottom edge (bottom-full) so the menu is always flush with the + // input's top edge regardless of its own height — a fixed -top offset leaves a + // sub-pixel gap once the menu is shorter than that offset at smaller text sizes. + 'z-10 absolute bottom-full opacity-0 group-hover:opacity-100 group-focus-within:opacity-100 translate-y-full group-hover:translate-y-0 group-focus-within:translate-y-0' )} > {isMultiLine && ( From 5f6f3c2cee2d6baa4b28fd16967b8a941270c9bc Mon Sep 17 00:00:00 2001 From: rohan Date: Wed, 1 Jul 2026 19:03:32 +0530 Subject: [PATCH 2/2] fix: refine secret row hover menu focus states, responsive sizing, and comment truncation --- frontend/components/common/GenericDialog.tsx | 5 ++- .../environments/secrets/CommentDialog.tsx | 11 +++-- .../environments/secrets/HistoryDialog.tsx | 7 +--- .../environments/secrets/OverrideDialog.tsx | 2 +- .../environments/secrets/SecretRow.tsx | 40 ++++++++++++------- .../secrets/ShareSecretDialog.tsx | 2 +- .../environments/secrets/TagsDialog.tsx | 5 ++- .../environments/secrets/TypeSelector.tsx | 19 +++++++-- 8 files changed, 60 insertions(+), 31 deletions(-) diff --git a/frontend/components/common/GenericDialog.tsx b/frontend/components/common/GenericDialog.tsx index 1d11dfba5..df319a559 100644 --- a/frontend/components/common/GenericDialog.tsx +++ b/frontend/components/common/GenericDialog.tsx @@ -29,6 +29,8 @@ interface GenericDialogProps { initialFocus?: MutableRefObject isStatic?: boolean buttonProps?: ButtonProps + /** Extra classes for the trigger button's wrapper — e.g. `min-w-0` to let it shrink in a flex row. */ + buttonWrapperClass?: string } const GenericDialog = forwardRef( @@ -46,6 +48,7 @@ const GenericDialog = forwardRef( initialFocus, isStatic = false, buttonProps, + buttonWrapperClass, }: GenericDialogProps, ref ) => { @@ -79,7 +82,7 @@ const GenericDialog = forwardRef( return ( <> {buttonContent && ( -
+
+ } - buttonProps={{ tabIndex: -1 }} + buttonProps={{ tabIndex: -1, classString: 'min-w-0' }} + buttonWrapperClass="min-w-0" >