Skip to content

fix(tooltip): Remove x pad for topright positions

Paul Slaughter requested to merge ps-fix-tooltip-topright-padding into master

What does this MR do?

This MR fixes the topright positioning offset by removing some x padding that is inconsistent with Bootstrap's styles.

It also adds some storyshots for topright and topleft positioning of tooltip.

Before After
Screen_Shot_2020-06-22_at_10.35.40_AM Screen_Shot_2020-06-22_at_10.25.55_AM

Also see Bootstrap's tooltip style:

Screen_Shot_2020-06-22_at_10.36.58_AM__2_

Integration screenshots

gitlab!35184 (comment 367009367)

Note that if offset is set, it looks like top and topright are treated the same which is a good thing 😄

Tooltip with topright and offset Tooltip with top and offset Tooltip with topright no offset
Screen_Shot_2020-06-24_at_10.05.53_AM Screen_Shot_2020-06-24_at_10.07.12_AM Screen_Shot_2020-06-24_at_10.06.46_AM

Does this MR meet the acceptance criteria?

Conformity

  • Code review guidelines.
  • GitLab UI's contributing guidlines.
  • If it changes a Pajamas-compliant component's look & feel, the MR has been reviewed by a UX designer.
  • If it changes GitLab UI's documentation guidelines, the MR has been reviewed by a Technical Writer.
  • If the MR changes a component's API, integration MR(s) have been opened in the following projects to ensure that the @gitlab/ui package can be upgraded quickly after the changes are released:
  • Added the ~"component:*" label(s) if applicable.
Edited by Paul Slaughter

Merge request reports