-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show full link when hovering over hyperlink #8815
Changes from 7 commits
88773e0
39aca40
944c171
0b4a4b4
23abac7
0ecc578
bef7588
7f6b4ab
9275559
a822644
3fa69cb
38d0481
cebf65b
941ea62
bc217b0
dda14e9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -11,6 +11,7 @@ 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'; | ||||||
|
||||||
/** | ||||||
* Gets the HTML version of the message in an action. | ||||||
|
@@ -62,6 +63,7 @@ export default [ | |||||
Clipboard.setString(selection); | ||||||
hideContextMenu(true, ReportActionComposeFocusManager.focus); | ||||||
}, | ||||||
getDescription: ({selection, isSmallScreenWidth}) => (ContextMenuUtils.shouldShowDescription(isSmallScreenWidth) ? selection : ''), | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This cleans up really well now and it's just passing a reference |
||||||
}, | ||||||
{ | ||||||
textTranslateKey: 'reportActionContextMenu.copyEmailToClipboard', | ||||||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,15 @@ | ||||||||||||||||||||||||||||||
/* eslint-disable import/prefer-default-export */ | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
/** | ||||||||||||||||||||||||||||||
* We should show popover description only for mWeb | ||||||||||||||||||||||||||||||
* | ||||||||||||||||||||||||||||||
* @param {Boolean} isSmallScreenWidth | ||||||||||||||||||||||||||||||
* @returns {Boolean} | ||||||||||||||||||||||||||||||
*/ | ||||||||||||||||||||||||||||||
function shouldShowDescription(isSmallScreenWidth) { | ||||||||||||||||||||||||||||||
return isSmallScreenWidth; | ||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
export { | ||||||||||||||||||||||||||||||
shouldShowDescription, | ||||||||||||||||||||||||||||||
}; | ||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Change the method name to be more descriptive and perform slightly different logic. |
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,14 @@ | ||||||||||||||||||||||||||||||
/* eslint-disable import/prefer-default-export */ | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
/** | ||||||||||||||||||||||||||||||
* Always show popover description for native platforms | ||||||||||||||||||||||||||||||
* | ||||||||||||||||||||||||||||||
* @returns {Boolean} | ||||||||||||||||||||||||||||||
*/ | ||||||||||||||||||||||||||||||
function shouldShowDescription() { | ||||||||||||||||||||||||||||||
return true; | ||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
export { | ||||||||||||||||||||||||||||||
shouldShowDescription, | ||||||||||||||||||||||||||||||
}; | ||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to pass those arguments as an object.