Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: persist cta dismissal and change survey trigger #33

Merged
merged 1 commit into from
Oct 20, 2023

Conversation

alangsto
Copy link
Member

MST-2156

If a user dismisses the CTA, that dismissal should be persisted. Additionally, we would only like to trigger the survey after a user has interacted with the learning assistant, so the hotjar event should only be triggered after a user sends and receives a message.

@@ -94,7 +95,7 @@ const ToggleXpert = ({
${contentToolsEnabled ? 'chat-content-tools-margin' : ''}`
}
>
{!hasDismissed && (
{(!localStorage.getItem('dismissedLearningAssistantCallToAction') && !hasDismissed) && (
Copy link
Member Author

@alangsto alangsto Oct 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need both local storage and state change in order to re-render the page when the call to action is dismissed (as state change will trigger a re-render)

@codecov
Copy link

codecov bot commented Oct 19, 2023

Codecov Report

Merging #33 (a1b6291) into main (5e2c482) will increase coverage by 0.06%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #33      +/-   ##
==========================================
+ Coverage   87.06%   87.12%   +0.06%     
==========================================
  Files          13       13              
  Lines         201      202       +1     
  Branches       26       26              
==========================================
+ Hits          175      176       +1     
  Misses         26       26              
Files Coverage Δ
src/components/Sidebar/index.jsx 71.79% <100.00%> (ø)
src/components/ToggleXpertButton/index.jsx 85.71% <100.00%> (+0.42%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@alangsto alangsto merged commit 285a6bf into main Oct 20, 2023
6 checks passed
@alangsto alangsto deleted the alangsto/update_ui branch October 20, 2023 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants