Added the DuoChatCallout component. Attempt 3.
What does this MR do and why?
IMPORTANT NOTE:
This is the THIRD attempt (here are the first and the second) of pushing more or less the same MR as Introduce the Duo Chat callout for the global D... (!137586 - merged) The previous one had to be reverted because of the failed QA specs in
master
. This MR is based on the corresponding update to the QA tests so should not cause issues with the tests.
The MR introduces the DuoChatCallout
component and its integration into the Duo Chat application. The callout gets dismissed whenever user clicks anywhere on the screen, outside of the callout itself. Clicking the "GitLab Duo Chat", or the "Ask GitLab Duo" buttons also opens the Duo Chat in addition to dismissing the calloutl.
Screenshots or screen recordings
Before | |
After |
How to set up and validate locally
- Set up GitLab Duo Chat
- Load any page in the local GDK. There should neither global button, nor the callout, as represented in the screenshots, be presented on the page.
- Enable the global GitLab Duo button:
# rails c
[1] pry(main)> Feature.enable(:tanuki_bot_breadcrumbs_entry_point)
- Open any page and note the callout below the global GitLab Duo Chat button, as presented in the screenshots above
Just dismissing the callout
- Dismiss the callout without opening chat by clicking
❌ in the top right corner of the callout. The callout gets dismissed. Chat should not be opened - Reload the page to make sure the callout is not shown while the button is still rendered
Clicking the "Ask GitLab Duo" button in the callout
- Reset the dismiss of the callout:
# rails c
[2] pry(main)> Users::Callout.duo_chat_callout[0].destroy
- Click the "Ask GitLab Duo" button in the callout. It should open the chat and dismiss the callout
- Reload the page to make sure the callout is not shown while the button is still rendered
Clicking the global Duo Chat button
- Reset the dismiss of the callout:
# rails c
[3] pry(main)> Users::Callout.duo_chat_callout[0].destroy
- Reload the page to make sure the callout is shown again.
- Click the global "GitLab Duo Chat" button. It should open the chat and dismiss the callout
- Reload the page to make sure the callout is not shown while the button is still rendered
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #425954