-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Fix tooltip extra space when status text is empty #33332
Conversation
@shubham1206agra Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
@@ -150,7 +150,7 @@ function OptionRowLHN(props) { | |||
const statusText = lodashGet(optionItem, 'status.text', ''); | |||
const statusClearAfterDate = lodashGet(optionItem, 'status.clearAfter', ''); | |||
const formattedDate = DateUtils.getStatusUntilDate(statusClearAfterDate); | |||
const statusContent = formattedDate ? `${statusText} (${formattedDate})` : statusText; | |||
const statusContent = formattedDate ? (statusText ? `${statusText} (${formattedDate})` : `(${formattedDate})`) : statusText; |
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.
const statusContent = formattedDate ? (statusText ? `${statusText} (${formattedDate})` : `(${formattedDate})`) : statusText; | |
const statusContent = formattedDate ? `${statusText ? `${statusText} ` : ''}(${formattedDate})` : statusText; |
as lint complains: Do not nest ternary expressions
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.
Thanks for reviewing @mkhutornyi
@@ -206,7 +206,7 @@ function ReportActionItemSingle(props) { | |||
const hasEmojiStatus = !displayAllActors && status && status.emojiCode; | |||
const formattedDate = DateUtils.getStatusUntilDate(lodashGet(status, 'clearAfter')); | |||
const statusText = lodashGet(status, 'text', ''); | |||
const statusTooltipText = formattedDate ? `${statusText} (${formattedDate})` : statusText; | |||
const statusTooltipText = formattedDate ? (statusText ? `${statusText} (${formattedDate})` : `(${formattedDate})`) : statusText; |
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.
Same here:
const statusTooltipText = formattedDate ? (statusText ? `${statusText} (${formattedDate})` : `(${formattedDate})`) : statusText; | |
const statusTooltipText = formattedDate ? `${statusText ? `${statusText} ` : ''}(${formattedDate})` : statusText; |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb Safari |
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.
LGTM!
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.
Looks good and tests well
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to production by https://github.com/mountiny in version: 1.4.18-8 🚀
|
Details
Fix tooltip's extra space when status text is empty
Fixed Issues
$ #33228
Tests
(Until tomorrow)
should not contain any extra space(Until tomorrow)
should not contain any extra spaceOffline tests
QA Steps
Same as in tests
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Report chat
LHN
MacOS: Desktop