Problem/Motivation

.tooltip class name is pretty common. And current styles not working for example in Bootstrap theme.

Proposed resolution

Rename .tooltip to .toolbar-tooltip

Issue fork navigation-3402596

Command icon 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

finnsky created an issue. See original summary.

kostyashupenko made their first commit to this issue’s fork.

kostyashupenko’s picture

Status: Active » Needs review
ckrina’s picture

Status: Needs review » Needs work

Good idea @kostyashupenko! But we've been using toolbar on all components so let's use toolbar-tooltip instead. Also, remember to rename the file and library :)

ckrina’s picture

Issue summary: View changes

Updated the issue summary accordingly.

ckrina’s picture

Title: Rename .tooltip CSS to .navigation-tooltip » Rename .tooltip CSS to .toolbar-tooltip

Updating issue title.

jwilson3’s picture

Apologies I cant be more active here, but I remember seeing someone wanted to genericize tooltip in a previous issue, so it could be leveraged throughout Drupal UIs. I agree it seems like a good idea.

From issue summary on: #3393067: Added tooltip component

We see that in the future such a component will appear in the core of the administrative theme:

#3197758: Create a new component: Toggletip

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

So one suggestion for expediency might be to rename it something like .drupal-tooltip (to namespace it and avoid collisions from other design systems) and then, if required, have specific style overrides for use in the toolbar using BEM, with .drupal-tooltip--toolbar.

On the other hand, that namespacing and BEM refactor could be pushed to a follow-up at a point in time when the navigation tooltip is combined with #3197758: Create a new component: Toggletip.

finnsky’s picture

Yes you are right! It is designed to be later merged with core component. But for now we need small fix to make it work with Bootstrap based themes.

ckrina’s picture

Thanks @jwilson3! We're talking about 2 different components: Tooltip and Toggletip. Their behavior is different: mainly, one appears in hover and the other on click.

Either way, can't be sure the one used here will be moved to its own component in core outside the navigation, so I would keep using the internal naming until this is really the case.

AkshayAdhav made their first commit to this issue’s fork.

akshayadhav’s picture

Status: Needs work » Needs review

As per the updated IS, changed .tooltip to .toolbar-tooltip. Created separate branch and MR to avoid confusion.

ckrina changed the visibility of the branch 3402596-rename-tooltip-to-toolbar-tooltip to hidden.

ckrina changed the visibility of the branch 3402596-rename-tooltip-to-toolbar-tooltip to active.

  • e50b4807 committed on 1.x
    Issue #3402596: Rename .tooltip CSS to .toolbar-tooltip
    
ckrina’s picture

Status: Needs review » Fixed

Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.