ic-design-system
ic-design-system copied to clipboard
[ic-design-system]: Cookies are not added and removed correctly if using the "manage your cookies preferences" switch
Summary of the bug
The switch used to manage your cookies preferences on the "Cookies Policy" page doesn't remember state across different pages and so the new preference is not applied.
🪜 How to reproduce
- Navigate to the "Cookies Policy" page
- Scroll or navigate to the "Manage cookies preferences" section on the page
- If you have previously accepted cookies, click the switch to decline cookies. If you have previously declined cookies, click the switch to accept cookies.
- Refresh the page
- Scroll or navigate to the "Manage cookies preferences" section on the page
- See that the switch has reverted back to your original cookies preference. Observe the cookies using the "Application" tab in DevTools to see there has been no changes to the cookies
📸 Screenshots or code
The video shows what happens if you previously declined cookies and now try to accept cookies. https://github.com/mi6/ic-design-system/assets/113986285/382a2434-f954-47da-95bd-fdc2a23ac90c
🖥 📱 Device
- Type: Desktop
- Device: MacBook
- Browser version: Chrome 119
- ICDS version: 2.6.0
🧐 Expected behaviour
Expect the switch to remember state across refresh and across different pages. Expect cookies to be added or removed as a result.