Skip to content

Fix tooltip rendering in user bar

Mark Florian requested to merge fix-tooltips-user-bar into master

What does this MR do and why?

Fix tooltip rendering in user bar

This moves the GitLab UI configuration call to ~/commons, which both the main.js and super_sidebar.js entrypoints import.

This ensures that GitLab UI is configured before the super sidebar is mounted, so that all tooltips have the gl-tooltip class applied. See https://gitlab.com/gitlab-org/gitlab-ui/-/blob/v66.7.0/src/config.js#L13.

The super sidebar exists in a separate chunk, and it actually executes before the main.js script, even though it's listed later in the HTML document. This is likely due to webpack's runtime managing the execution order of modules. See !114238 (comment 1312900193).

Addresses #424465 (closed).

Changelog: fixed

Screenshots or screen recordings

Before After
before_1 after_1
before_2 after_2
before_3 after_3
before_4
NO CHANGE
after_4
NO CHANGE

Addresses #424465 (closed).

How to set up and validate locally

  1. Hover over the sidebar items as shown in the screenshots
  2. Look at the tooltip "tip"/arrow size

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Mark Florian

Merge request reports