Problem/Motivation
Currently, the tooltip is tightly linked to the entire sidebar script. Although in fact it is a completely independent component, and all it needs is just a few attributes and focus and a CSS hoover. And there is no need to clone the tooltip for it to work.
We see that in the future such a component will appear in the core of the administrative theme:
https://www.drupal.org/project/drupal/issues/3197758
Thus, we must take it out of the general script and styles and keep in mind that it will be used independently. So that later we can easily combine them.
Pros: Obvious simplicity, reusability and independence
Issue fork navigation-3393067
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
finnsky commentedComment #4
finnsky commentedComment #5
ckrinaThis is not the same component: the one being proposed to core is a Toggletip. The difference is that a tooltip is exposed on Hover (or Focus) while a toggletip is used on Click or Enter.
I tried the submenus on Tugboat and seem to work fine: what am I missing?
Comment #6
finnsky commentedRE: `This is not the same component: the one being proposed to core is a Toggletip. The difference is that a tooltip is exposed on Hover (or Focus) while a toggletip is used on Click or Enter.`
I think it is related to component flexibility, `data-toggle-on="hover/click"` etc.
Regression fixed. Temporary for now.
Comment #7
finnsky commented- Rebased on current 1.x
- Added resize observer for trigger.
- Added temporary fix to close cloned flyouts
Comment #8
finnsky commentedComment #9
nod_Comment #10
nod_Left some comments, not 100% sure about the data-tooltip attribute. the naming is very generic so we might run into problems later, in core we've been prefixing things with drupal, so `data-drupal-tooltip` maybe?
Comment #11
finnsky commentedComment #12
nod_Great, thanks!