Skip to content

Commit

Permalink
Merge pull request #17321 from allroundexperts/fix-16521
Browse files Browse the repository at this point in the history
feat: added descriptive text for tooltips
  • Loading branch information
cead22 authored Apr 18, 2023
2 parents 2bacd2b + 5599026 commit 8864416
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 35 deletions.
3 changes: 2 additions & 1 deletion src/components/MenuItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
]);
Expand All @@ -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}
Expand Down
3 changes: 1 addition & 2 deletions src/pages/home/report/ContextMenu/ContextMenuActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -119,7 +118,7 @@ export default [
Clipboard.setString(selection);
hideContextMenu(true, ReportActionComposeFocusManager.focus);
},
getDescription: ContextMenuUtils.getPopoverDescription,
getDescription: selection => selection,
},
{
textTranslateKey: 'reportActionContextMenu.copyEmailToClipboard',
Expand Down
17 changes: 0 additions & 17 deletions src/pages/home/report/ContextMenu/ContextMenuUtils/index.js

This file was deleted.

15 changes: 0 additions & 15 deletions src/pages/home/report/ContextMenu/ContextMenuUtils/index.native.js

This file was deleted.

4 changes: 4 additions & 0 deletions src/styles/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -3135,6 +3135,10 @@ const styles = {
width: variables.modalContentMaxWidth,
textAlign: 'center',
},

popoverMaxWidth: {
maxWidth: 375,
},
};

export default styles;

0 comments on commit 8864416

Please sign in to comment.