[Web] Change tooltip component to accept generic content#15325
[Web] Change tooltip component to accept generic content#15325stitesExpensify merged 16 commits into
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 |
s77rt
left a comment
There was a problem hiding this comment.
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... |
s77rt
left a comment
There was a problem hiding this comment.
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 |
mountiny
left a comment
There was a problem hiding this comment.
@hannojg Just one question, this is looking good, @stitesExpensify probably can merge once he comes online today
3366b53 to
9863204
Compare
|
✋ 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
renderTooptipContentfunction 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 Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)Avataris modified, I verified thatAvataris working as expected in all cases)ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.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