-
Notifications
You must be signed in to change notification settings - Fork 1
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
[MPDX-8393] Make the Helpjuice beacon dismissable #1150
Conversation
Preview branch generated at https://8393-dismiss-beacon.d3dytjb8adxkk5.amplifyapp.com |
Bundle sizes [mpdx-react]Compared against 559211c
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks great, but when I test it on the preview link, the beacon is visible after a refresh
@dr-bizz Good catch! I messed up the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome! Thank you for adding on the x icon when it's open! it adds a lot to the user experience.
84040f0
to
62ca893
Compare
62ca893
to
ba7f9d9
Compare
Description
Make the Helpjuice beacon dismissable. There is a new Hide Beacon link in the beacon widget that dismisses the beacon. Once dismissed, the beacon peeks just barely out from the right side of the screen. Hovering over it causes it to slide out, and clicking on it makes it no longer dismissed.
On most pages, the dismissed preference is saved to a persistent user preference. On login and error pages, we don't have an Apollo client, so the preference can't be persisted, but the beacon can still be temporarily dismissed until the next page load.
I had to jump through some hoops to get this to work, but the complexity is abstracted away into the
Helpjuice
component, and the comments forApolloBeacon
andNoApolloBeacon
should describe what is going on. I chose not to do something like this because although it might technically work, it violates React's rules of hooks that hooks must not be conditionally called.MPDX-8393
Checklist: