-
Notifications
You must be signed in to change notification settings - Fork 363
[EPIC] Feature discoverability - Beamer #3515
Conversation
* feat: Add whats new button in sidebar, include beamer script * Use src branch dependency and continue customizing beamer * style: notifications badge * Load Beamer from the CookieBanner preferences * update beamer config object on close * chore: Bump version on components package * chore: Add beamer type to global window type and remove ts-nocheck * fix: useRef for beamer script tag to remove * fix: Add Beamer params and methods type definitions * refactor: Pass generic to loadFromCookie * fix: pass value as Generic instead of the whole Record<string, T> type * fix: PR feedback Co-authored-by: Usame Algan <usame.algan@gnosis.pm>
CLA Assistant Lite All Contributors have signed the CLA. |
ESLint Summary View Full Report
Report generated by eslint-plus-action |
E2E Tests Failed Failed tests:
|
* feat: link Beamer with the analytics cookies. Display different CookieBanner warning messages. * refactor: extract to an object cookie warning messages * refactor: clean up cookies reducer Co-authored-by: Aaron Cook <iamacook@users.noreply.github.com> * fix: update Beamer cookie alert copy * fix: handle Beamer with update cookies Co-authored-by: Aaron Cook <iamacook@users.noreply.github.com>
c32acb2
to
e38ef2f
Compare
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.
Loving the TypeScript 😉
It won't let me comment on it as it's legacy, but on line 258 in src/components/CookiesBanner/index.tsx
you can simplify it to `onClick={closeCookiesBannerHandler}.
const handleClick = async () => { | ||
const cookiesState = await loadFromCookie<BannerCookiesType>(COOKIES_KEY) | ||
if (!cookiesState) { | ||
dispatch(openCookieBanner({ cookieBannerOpen: true })) |
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.
It's possible to simplify this action even more. If openCookieBanner
is dispatched, you need not send { cookieBannerOpen: true }
in the payload at all.
<StyledListItemText>What's new</StyledListItemText> | ||
</StyledListItem> | ||
|
||
<HelpCenterLink href="https://help.gnosis-safe.io/en/" target="_blank" title="Help Center of Gnosis Safe"> |
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.
Probably out of scope, but have we considered treating links as CONSTANTS
and/or centralising them? Would help in the future if need to update any. Maybe worth creating a new issue? cc @katspaugh
@@ -156,55 +158,57 @@ const CookiesBanner = (): ReactElement => { | |||
} | |||
} | |||
fetchCookiesFromStorage() | |||
}, [showAnalytics, showIntercom]) | |||
}, [dispatch, showAnalytics, showIntercom]) | |||
|
|||
const acceptCookiesHandler = async () => { | |||
const newState = { |
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.
You could add the types to these newState
objects. Not necessary though.
The last commit aims to allow QA to test the production styles. Will be reverted after testing. |
* fix: Remove Beamer cookies on consent withdraw, extract removeCookies function * refactor: Rename domain variable
ESLint Summary View Full Report
Report generated by eslint-plus-action |
606b723
to
3d51fd0
Compare
I'll report this here since the 3610 was already merged, but this issue also happens in the 3610. There is 1 beamer cookie that is not being removed when you withdraw consent on the settings preferences. Just check the checkbox in the preferences and reload the page to see all the cookies, Then uncheck the checkbox, reload the page and you will see that there is 1 cookie that is not going away |
This should be covered by #3615. |
* Refactor CookieBanner * Hide What's New in desktop app * Remove unrelated test from footer tests
Yeah, the 3615 was merged and solves the issue with that cookie. Looks good |
What it solves
Part of Problem Statement safe-global/safe-pm#26
Resolves #3413
Related tasks
How this PR fixes it
Integrates Beamer as a 3rd party solution
How to test it
Analytics changes
Screenshots