Skip to content

web: `HoverOverlay` redesign

Warren Gifford requested to merge vb/code-intel-hovers into main

Created by: valerybugakov

Changes

  • Updated line-height for a couple of global classes and elements to match the latest mockups and to be Pixel Perfect HoverOverlay component. Broader inspection of this rule will be done in a separate PR: https://github.com/sourcegraph/sourcegraph/issues/21324.
  • Updated .alert-link styles.
  • Update .badge and .btn paddings and font-size.
  • Fixed strange Safari issue related to the sticky close button in the HoverOverlay.
  • Added redesign styles for the HoverOverlay component.
Screenshot 2021-05-27 at 18 12 04

Notes

  • In a couple of places, new classes were added. i.e. additionally to .hover-overlay__hover-error new .hover-overlay__hover-error-redesign is added. It's done because it's easier to omit all the current version styles and add new ones for the redesign theme. After the redesign release, we will keep only one class.
  • For the redesign styles color CSS variables are used which might not be defined on every code host. I see that we practice that in other components. It looks fine because if the color variable is not present the element will use another color defined for the containing element.
  • In the current implementation, badges are aligned between different content entries. It means that in the first content entry, the margin between the close icon and badge is smaller than in the mockups. Screenshots: left — mockups, right — implementation. @sourcegraph/design, let me know if want to change this.

Screenshot 2021-05-22 at 09 13 50         Screenshot 2021-05-26 at 19 57 42

  • Additional padding-top and border-top were added in the implementation to the alerts container to separate it from the scrollable content. Otherwise, text scrolls right from the alert border which doesn't look good. @sourcegraph/design, let me know if want to change this.

Screenshot 2021-05-27 at 08 40 28         Screenshot 2021-05-27 at 08 39 12

Github issue: https://github.com/sourcegraph/sourcegraph/issues/19633. Figma mockups.

Merge request reports

Loading