From 4ba1ad75e0a0a7a1e52662bc943dd4af3d4cc0a4 Mon Sep 17 00:00:00 2001 From: diondiondion Date: Mon, 22 Sep 2025 13:54:06 +0200 Subject: [PATCH] [Glitch] Left-align boost/quote menu to prevent shift based on descriptions Port 66afc13b7f8e6c22cdb356d0578caf3f967b371b to glitch-soc Signed-off-by: Claire --- app/javascript/flavours/glitch/components/dropdown_menu.tsx | 3 ++- .../flavours/glitch/components/status/boost_button.tsx | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/javascript/flavours/glitch/components/dropdown_menu.tsx b/app/javascript/flavours/glitch/components/dropdown_menu.tsx index 069316efd4..9549016ce9 100644 --- a/app/javascript/flavours/glitch/components/dropdown_menu.tsx +++ b/app/javascript/flavours/glitch/components/dropdown_menu.tsx @@ -333,6 +333,7 @@ interface DropdownProps { disabled?: boolean; scrollable?: boolean; placement?: Placement; + offset?: OffsetValue; /** * Prevent the `ScrollableList` with this scrollKey * from being scrolled while the dropdown is open @@ -348,7 +349,6 @@ interface DropdownProps { onItemClick?: ItemClickFn; } -const offset = [5, 5] as OffsetValue; const popperConfig = { strategy: 'fixed' } as UsePopperOptions; export const Dropdown = ({ @@ -361,6 +361,7 @@ export const Dropdown = ({ disabled, scrollable, placement = 'bottom', + offset = [5, 5], status, forceDropdown = false, renderItem, diff --git a/app/javascript/flavours/glitch/components/status/boost_button.tsx b/app/javascript/flavours/glitch/components/status/boost_button.tsx index fa49b4c930..7d6580d52d 100644 --- a/app/javascript/flavours/glitch/components/status/boost_button.tsx +++ b/app/javascript/flavours/glitch/components/status/boost_button.tsx @@ -134,6 +134,8 @@ export const StatusBoostButton: FC = ({ return (