Skip to content

Fixed the margin on the banner in GitLab chat

Denys Mishunov requested to merge dmishunov-fix-chat into master

What does this MR do and why?

The MR changes the two things in GitLab chat:

  1. DRY change: moved the legal warning into AiGenieChat component instead of supplying it via a slot in every chat implementation.
  2. Style change: the MR fixes the visual bug where "Responses generated by AI" legal warning had an unnecessary margin on the right side (see the Before screenshots)

Screenshots or screen recordings

Before After
GitLab chat Screenshot_2023-05-26_at_11.13.15 Screenshot_2023-05-26_at_10.40.34
Explain Code Screenshot_2023-05-26_at_11.11.21 Screenshot_2023-05-26_at_10.40.52

How to set up and validate locally

  1. Follow the instructions to enable the AI features in your local GDK

To test the GitLab chat:

  1. Follow the instructions on setting up the GitLab chat locally
  2. Enable the :super_sidebar_nav feature flag (Feature.enable(:anthropic_experimentation) in your rails console
  3. Enable the new super sidebar in your settings via the web interface: Screenshot_2023-05-26_at_11.20.04
  4. Open the GitLab chat in Help -> Ask GitLab Chat
  5. Make sure the "Responses generated by AI" legal warning is rendered as provided on the "After" screenshot

To test the Explain Code:

  1. Go to a code file (/flightjs/Flight/-/blob/master/index.js, for example)
  2. Select some code and click the icon in the gutter on the left side of the selected code
  3. Check that the shown "Code Explanation" drawer looks like presented on the "After" screenshot

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 Denys Mishunov

Merge request reports