-
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
[Web] Change tooltip component to accept generic content #15325
[Web] Change tooltip component to accept generic content #15325
Conversation
@s77rt @aldo-expensify 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] |
How is this supposed to handle content change in the render function? |
…no/change-tooltip-accept-generic-content
Hey @s77rt, I just applied your suggestions! For content change in the render function it is expected to recreate the render function which will trigger a re-render of the tooltip, which will thus display the updated content. I updated the storybook entry to reflect that: Screen.Recording.2023-03-05.at.18.35.13.movThis is good for review again! |
Hey @s77rt thx for the second review. I got rid of the duplicated rendering logic. I pushed another solution where we still measure the width. and see if this could be a good solution as well |
@hannojg I'm having trouble applying your without width solution. I'm not sure how will this work if the text content of a tooltip changes. Besides that, let's keep the changes minimal here |
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.
Last commit before was better. We were close. The new changes here are mostly unrelated and not required. Please let carry on from the last commit.
This comment was marked as outdated.
This comment was marked as outdated.
@s77rt Okay, so I reverted back the new comments and started again from the other one you were okay with. The solution now also works without rendering the content twice and I think is so far the cleanest! |
@hannojg Thanks a lot for your collaboration. Reviewing... |
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, just two minor changes.
@hannojg Please mark the previous requests are resolved, and once you resolve those two new minor ones, mark them as resolved as well. |
Alright, cleaned it up as suggested @s77rt |
Reviewer Checklist
Screenshots/VideosWebweb.mp4web2.mp4Mobile Web - ChromeMobile Web - SafariDesktopdesktop.mp4iOSAndroid |
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.
@hannojg Just one question, this is looking good, @stitesExpensify probably can merge once he comes online today
3366b53
to
9863204
Compare
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!
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
Can someone please create a tracking payment issue? |
@s77rt done in the linked issue |
Thank you! @mountiny |
🚀 Deployed to staging by https://github.com/stitesExpensify in version: 1.2.80-0 🚀
|
✋ 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/roryabraham in version: 1.2.80-2 🚀
|
Details
For implementing the reactions feature we will need to show content other than just text in the
<Tooltip />
component.This PR adds support for a
renderTooptipContent
function that can be passed to render any content.Fixed Issues
$ #15126
PROPOSAL: GH_LINK_ISSUE(COMMENT)
Tests
Offline tests
QA Steps
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-02-21.at.20.29.21.mov
Mobile Web - Chrome
N/A
Mobile Web - Safari
N/A
Desktop
Screen.Recording.2023-02-21.at.20.42.32.mov
iOS
N/A
Android
N/A