Draft: GitLab integration test for gitlab-org/gitlab-services/design.gitlab.com!6294

What does this MR do and why?

Integration test for the Popover API based GlTooltip in @gitlab/ui: gitlab-org/gitlab-services/design.gitlab.com!6294 (merged)

The new GlTooltip no longer uses bootstrap-vue, so it doesn't listen to the bv::show::tooltip / bv::hide::tooltip root events anymore. @gitlab/ui exports showGlTooltip and hideGlTooltip instead.

Earlier MRs prepared for this, so that this one stays small:

What's left in this MR

  • ~/vue_shared/utils/tooltips: the helpers call showGlTooltip / hideGlTooltip from @gitlab/ui instead of emitting the root events. Their component argument isn't needed anymore; a follow-up removes it from the call sites.
  • BV_SHOW_TOOLTIP / BV_HIDE_TOOLTIP are deleted; nothing uses them anymore.
  • The Jest mock of @gitlab/ui gets the two new helpers.
  • The work items shared example checks the reaction button's title instead of the tooltip element.
  • package.json / yarn.lock point at the @gitlab/ui build of gitlab-org/gitlab-services/design.gitlab.com!6294 (merged).

Behavior changes

  • Without an id, the helpers now act on every tooltip on the page. The root events only reached the tooltips of the caller's own Vue app.
  • They now also show and hide GlTooltip components under Vue 3, which bootstrap-vue's root events did not.
  • Tooltips render in the browser's top layer, so they're no longer clipped by overflow or covered by other content.

Follow-ups

  • Drop the component argument from the 20 call sites, import the helpers from @gitlab/ui, and remove ~/vue_shared/utils/tooltips.
  • Remove the container / boundary options, which the new GlTooltip ignores, from the tooltips manager and a few v-gl-tooltip values.

How to set up and validate locally

Check out this branch, run yarn install, and try tooltips that are shown or hidden from code, for example:

  • Copy buttons (commit SHA): "Copied" appears and goes away.
  • MR diffs: tooltips close when scrolling.
  • Pipeline graph: job tooltips close when opening an action.
  • Environments: the stop button's tooltip closes when the modal opens.

untamper-my-lockfile always fails for integration branches, because yarn.lock points at a CI package URL.

Edited by Thomas Hutterer

Merge request reports

Loading
Loading