Loading
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:
- !262798 (merged): feature specs find tooltips by
.gl-tooltip - !262883 (merged): Popover API shim in the Jest DOM shims
- !264610 (merged): all components show and hide tooltips through
~/vue_shared/utils/tooltips
What's left in this MR
~/vue_shared/utils/tooltips: the helpers callshowGlTooltip/hideGlTooltipfrom@gitlab/uiinstead 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_TOOLTIPare deleted; nothing uses them anymore.- The Jest mock of
@gitlab/uigets the two new helpers. - The work items shared example checks the reaction button's title instead of the tooltip element.
package.json/yarn.lockpoint at the@gitlab/uibuild 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
GlTooltipcomponents 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
overflowor 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/boundaryoptions, which the newGlTooltipignores, from the tooltips manager and a fewv-gl-tooltipvalues.
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