-
Notifications
You must be signed in to change notification settings - Fork 16
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
IBX-4277: [UDW] Tooltips from left menu aren't visible #642
Conversation
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.
Tooltips are not visible when switching to Bookmark tab. They only appear when you click on an item, see https://recordit.co/fGGmcvo2bO
c4e21b4
to
501673a
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.
I think it would be good to fix it with the use of MutationObserver from
(given there are no downsides 🤔 )
observer.observe(doc.querySelector('body'), observerConfig); |
@@ -35,7 +43,14 @@ const TabSelector = () => { | |||
}); | |||
|
|||
return ( | |||
<div className={className} key={tab.id} onClick={onClick} title={tab.label}> | |||
<div | |||
ref={selectorItemTooltipCallbackRef} |
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.
Probably this would also work 🤔
ref={selectorItemTooltipCallbackRef} | |
ref={ibexa.helpers.tooltips.parse} |
@@ -159,11 +167,13 @@ | |||
bootstrap.Tooltip.getOrCreateInstance(tooltipNode).hide(); | |||
} | |||
}; | |||
|
|||
observer.observe(doc.querySelector('body'), observerConfig); | |||
const observe = (baseElement = doc.querySelector('body')) => { |
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.
Maybe it would be good to have the same default value as in parse? 🤔
const observe = (baseElement = doc.querySelector('body')) => { | |
const observe = (baseElement = doc) => { |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Checklist:
$ composer fix-cs
)