diff --git a/src/components/MenuItem.js b/src/components/MenuItem.js index c3e823715a33..070b639c2796 100644 --- a/src/components/MenuItem.js +++ b/src/components/MenuItem.js @@ -70,7 +70,7 @@ const MenuItem = (props) => { const descriptionTextStyle = StyleUtils.combineStyles([ styles.textLabelSupporting, (props.icon ? styles.ml3 : undefined), - styles.breakWord, + styles.breakAll, styles.lineHeightNormal, props.title ? descriptionVerticalMargin : undefined, ]); @@ -95,6 +95,7 @@ const MenuItem = (props) => { props.style, StyleUtils.getButtonBackgroundColorStyle(getButtonState(props.focused || hovered, pressed, props.success, props.disabled, props.interactive), true), ..._.isArray(props.wrapperStyle) ? props.wrapperStyle : [props.wrapperStyle], + styles.popoverMaxWidth, ])} disabled={props.disabled} ref={props.forwardedRef} diff --git a/src/pages/home/report/ContextMenu/ContextMenuActions.js b/src/pages/home/report/ContextMenu/ContextMenuActions.js index 385fee477f7b..b4ad16ce1bf7 100644 --- a/src/pages/home/report/ContextMenu/ContextMenuActions.js +++ b/src/pages/home/report/ContextMenu/ContextMenuActions.js @@ -14,7 +14,6 @@ import CONST from '../../../../CONST'; import getAttachmentDetails from '../../../../libs/fileDownload/getAttachmentDetails'; import fileDownload from '../../../../libs/fileDownload'; import addEncryptedAuthTokenToURL from '../../../../libs/addEncryptedAuthTokenToURL'; -import * as ContextMenuUtils from './ContextMenuUtils'; import * as Environment from '../../../../libs/Environment/Environment'; import Permissions from '../../../../libs/Permissions'; import QuickEmojiReactions from '../../../../components/Reactions/QuickEmojiReactions'; @@ -119,7 +118,7 @@ export default [ Clipboard.setString(selection); hideContextMenu(true, ReportActionComposeFocusManager.focus); }, - getDescription: ContextMenuUtils.getPopoverDescription, + getDescription: selection => selection, }, { textTranslateKey: 'reportActionContextMenu.copyEmailToClipboard', diff --git a/src/pages/home/report/ContextMenu/ContextMenuUtils/index.js b/src/pages/home/report/ContextMenu/ContextMenuUtils/index.js deleted file mode 100644 index f694f413e29a..000000000000 --- a/src/pages/home/report/ContextMenu/ContextMenuUtils/index.js +++ /dev/null @@ -1,17 +0,0 @@ -/* eslint-disable import/prefer-default-export */ - -/** - * The popover description will be an empty string on anything but mobile web - * because we show link in tooltip instead of popover on web - * - * @param {String} selection - * @param {Boolean} isSmallScreenWidth - * @returns {String} - */ -function getPopoverDescription(selection, isSmallScreenWidth) { - return isSmallScreenWidth ? selection : ''; -} - -export { - getPopoverDescription, -}; diff --git a/src/pages/home/report/ContextMenu/ContextMenuUtils/index.native.js b/src/pages/home/report/ContextMenu/ContextMenuUtils/index.native.js deleted file mode 100644 index 3dbf81926098..000000000000 --- a/src/pages/home/report/ContextMenu/ContextMenuUtils/index.native.js +++ /dev/null @@ -1,15 +0,0 @@ -/* eslint-disable import/prefer-default-export */ - -/** - * Always show popover description on native platforms - * - * @param {String} selection - * @returns {String} - */ -function getPopoverDescription(selection) { - return selection; -} - -export { - getPopoverDescription, -}; diff --git a/src/styles/styles.js b/src/styles/styles.js index d01703172852..e1b67e42b2b1 100644 --- a/src/styles/styles.js +++ b/src/styles/styles.js @@ -3135,6 +3135,10 @@ const styles = { width: variables.modalContentMaxWidth, textAlign: 'center', }, + + popoverMaxWidth: { + maxWidth: 375, + }, }; export default styles;