-
Notifications
You must be signed in to change notification settings - Fork 180
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
Bug 1879792 - Add a cookie banner to BMO #2306
base: master
Are you sure you want to change the base?
Conversation
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.
Mostly LGTM, just have a few questions and want to make sure that JSON.parse
removal is expected.
…s. This doesn't require authenticated sessions. - Added a cookie settings link to the user drop down below preferences and also a cookie settings link on the home page.
if (key.match(/^bug-modal-saved-comment-/)) { | ||
let value = JSON.parse(localStorage.getItem(key)); | ||
let value = Bugzilla.Storage.get(key); |
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.
Out-of-scope nit: I don't really love the implicit JSON handling, it would be better to have a get_json
method that handles JSON values instead.
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.
Not sure why this is an issue as the Bugzilla.Storage class is handling the JSON parsing and stringification behind the scenes now. So the caller will use Bugzilla.Storage.get and the value returned will be a valid JSON object or a single value. So the caller will just need to check of value is typeof object if it is not sure. Bugzilla.Storage.set looks to see if the value passed is and object and if so, it will stringify it as JSON before storing.
From bug:
We should include a Cookie Banner on BMO to reduce our exposure to legal risks from changes in EU and US privacy law of the last several years.
BMO has a number of non-essential cookies that improve the UX of the site. Even though these non-essential cookies are not used for tracking purposes, Legal have advised that a cookie banner is still warranted.
Let me know if you have any questions