-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Add popover anchor tooltip #30150
Add popover anchor tooltip #30150
Conversation
@@ -31,6 +31,9 @@ const propTypes = { | |||
|
|||
/** passes this down to Hoverable component to decide whether to handle the scroll behaviour to show hover once the scroll ends */ | |||
shouldHandleScroll: PropTypes.bool, | |||
|
|||
/** Reference to the tooltip container */ | |||
tooltipRef: PropTypes.any, |
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.
We can use existing refPropTypes
defined in /components
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.
Handled!
@@ -1,4 +1,5 @@ | |||
import PropTypes from 'prop-types'; | |||
import refPropType from '../refPropTypes'; |
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.
import refPropType from '../refPropTypes'; | |
import refPropTypes from '../refPropTypes'; |
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.
Handled
@@ -33,7 +34,7 @@ const propTypes = { | |||
shouldHandleScroll: PropTypes.bool, | |||
|
|||
/** Reference to the tooltip container */ | |||
tooltipRef: PropTypes.any, | |||
tooltipRef: refPropType, |
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.
tooltipRef: refPropType, | |
tooltipRef: refPropTypes, |
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.
Handled
Reviewer Checklist
Screenshots/VideosWebweb.movMobile Web - Chromemchrome.movMobile Web - Safarimsafari.movDesktopdesktop.moviOSios.movAndroidandroid.mov |
✋ 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 staging by https://github.com/luacmartins in version: 1.3.90-0 🚀
|
🚀 Deployed to production by https://github.com/marcaaron in version: 1.3.90-2 🚀
|
🚀 Deployed to staging by https://github.com/luacmartins in version: 1.3.91-0 🚀
|
🚀 Deployed to production by https://github.com/marcaaron in version: 1.3.91-8 🚀
|
if (!shouldRender || isPopoverRelatedToTooltipOpen) { | ||
return children; | ||
} |
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 conditional render caused regression.
More details: #31155 (comment)
Details
This PR creates a new PopoverAnchorTooltip component that shows the tooltip around popover anchor buttons only when popover is hidden.
Fixed Issues
$ #24296
PROPOSAL: #24296 (comment)
Tests
Verify that the tooltip is not shown for the popover that is visible.
Offline tests
N/A
QA Steps
Verify that the tooltip is not shown for the popover that is visible.
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
Android: Native
Screen.Recording.2023-10-23.at.1.05.00.AM.mov
Android: mWeb Chrome
Screen.Recording.2023-10-23.at.1.05.38.AM.mov
iOS: Native
Screen.Recording.2023-10-23.at.1.26.56.AM.mov
iOS: mWeb Safari
Screen.Recording.2023-10-23.at.1.03.17.AM.mov
MacOS: Chrome / Safari
Screen.Recording.2023-10-23.at.12.56.09.AM.mov
MacOS: Desktop
Screen.Recording.2023-10-23.at.1.01.24.AM.mov