From 416625728389568dbe670d1bc4bf890a52a42229 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Wed, 24 Mar 2021 19:23:16 -0700 Subject: [PATCH] chore: Improved context menu behavior --- app/components/ContextMenu/index.js | 2 +- app/menus/DocumentMenu.js | 7 ++++++- shared/i18n/locales/en_US/translation.json | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/app/components/ContextMenu/index.js b/app/components/ContextMenu/index.js index 88f700c5..9b8c1d4d 100644 --- a/app/components/ContextMenu/index.js +++ b/app/components/ContextMenu/index.js @@ -37,7 +37,7 @@ export default function ContextMenu({ }, [onOpen, onClose, previousVisible, rest.visible]); return ( - + {(props) => ( diff --git a/app/menus/DocumentMenu.js b/app/menus/DocumentMenu.js index f128e0b8..92e53d8e 100644 --- a/app/menus/DocumentMenu.js +++ b/app/menus/DocumentMenu.js @@ -54,7 +54,12 @@ function DocumentMenu({ }: Props) { const team = useCurrentTeam(); const { policies, collections, ui, documents } = useStores(); - const menu = useMenuState({ modal }); + const menu = useMenuState({ + modal, + unstable_preventOverflow: true, + unstable_fixed: true, + unstable_flip: true, + }); const history = useHistory(); const { t } = useTranslation(); const [renderModals, setRenderModals] = React.useState(false); diff --git a/shared/i18n/locales/en_US/translation.json b/shared/i18n/locales/en_US/translation.json index 49f953ba..fa92a55e 100644 --- a/shared/i18n/locales/en_US/translation.json +++ b/shared/i18n/locales/en_US/translation.json @@ -243,9 +243,9 @@ "Collections are for grouping your documents. They work best when organized around a topic or internal team — Product or Engineering for example.": "Collections are for grouping your documents. They work best when organized around a topic or internal team — Product or Engineering for example.", "Creating": "Creating", "Create": "Create", - "Edit {{noun}}": "Edit {{noun}}", "Hide contents": "Hide contents", "Show contents": "Show contents", + "Edit {{noun}}": "Edit {{noun}}", "Archived": "Archived", "Anyone with the link <1>can view this document": "Anyone with the link <1>can view this document", "Share": "Share",