-
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 Email tooltip of the user avatar in the chat report page is incorrectly positioned #16370
Conversation
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA |
recheck |
@yuwenmemon @aimane-chnaif One of you needs to 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] |
@@ -58,6 +58,10 @@ function computeHorizontalShift(windowWidth, xOffset, componentWidth, tooltipWid | |||
* @returns {Boolean} | |||
*/ | |||
function isOverlappingAtTop(xOffset, yOffset) { | |||
if (typeof document.elementFromPoint !== 'function') { |
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.
my bad without check this one. 99.1% supported browser is a high number. According to screenshot above, some very old browsers don't support it, but small percent.
btw, do you mean from this comment is we need to check document.elementFromPoint
is exist before use?
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.
I actually meant this check which you already did:
const element = document.elementFromPoint(xOffset, yOffset);
if (!element) {
return false;
}
Not elementFromPoint
function itself
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.
btw, let's leave as it is now
Co-authored-by: Aimane Chnaif <96077027+aimane-chnaif@users.noreply.github.com>
Reviewer Checklist
Screenshots/VideosWebweb.movDesktopdesktop.mov |
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 element = document.elementFromPoint(xOffset, yOffset); | ||
|
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.
Nab: uneccessary blank space
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
Thank you so much for reviewing this PR @aimane-chnaif @yuwenmemon |
Of course @hoangzinh! Thanks for making Expensify a little bit better! ❤️ |
🚀 Deployed to staging by https://github.com/yuwenmemon in version: 1.2.89-0 🚀
|
🚀 Deployed to production by https://github.com/luacmartins in version: 1.2.89-0 🚀
|
// we'll display it beneath its wrapped component rather than above it as usual. | ||
const shouldShowBelow = (yOffset - tooltipHeight) < GUTTER_WIDTH; | ||
const shouldShowBelow = (yOffset - tooltipHeight) < GUTTER_WIDTH || isOverlappingAtTop(xOffset, yOffset); |
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.
This line introduced an edge case regression in #17844 , more context here #17844 (comment)
Details
Fixed Issues
$ #15586
PROPOSAL: #15586 (comment)
Tests
Before we jump into steps, just wanna ensure we're on same page:
a report item is a chat message
Offline tests
This feature doesn't change or is impacted by offline mode.
QA Steps
Same as above
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)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)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.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
Web
Screen.Recording.2023-03-22.at.06.21.30-1080.mp4
Mobile Web - Chrome
Mobile Web - Safari
Desktop
Screen.Recording.2023-03-22.at.06.35.23-1080.mp4
iOS
Android