-
Notifications
You must be signed in to change notification settings - Fork 30
add iPad detection and device class cookie setting #15035
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
base: main
Are you sure you want to change the base?
Conversation
|
Hello 👋! When you're ready to run Chromatic, please apply the You will need to reapply the label each time you want to run Chromatic. |
| // Set device class cookie for iPadOS detection (runs immediately, before any SDC requests) | ||
| setDeviceClassCookie(); |
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.
I'm not sure if this is the best place to call this function.
|
Hi @juabara. I haven't looked at the code change too closely, but it would be useful to know why we need to detect that the user is browsing on an iPad. Also, if we're dropping a new cookie, it would also be reassuring to know that @guardian/identity are aware and that it has been cleared from a data privacy perspective. Could you add a bit more info to the PR? Alternatively I'll be happy to chat if it's easier. Thanks so much! |
Hi @juabara , on this, as Simon has mentioned, any new cookies need to be documented and confirmed as essential by the Data Privacy team, please fill out this form and let me know when you have done so to kick off the process. Thank you. |
What does this change?
Implements client-side iPad detection to set a device_class cookie for proper backend targeting. Detects both older iPads (iOS 12 and earlier via navigator.platform) and newer iPads (iPadOS 13+ which report as MacIntel but have touch support). The cookie is set early in the client startup process before SDC requests are made.