ic-design-system icon indicating copy to clipboard operation
ic-design-system copied to clipboard

[ic-design-system]: Cookies are not added and removed correctly if using the "manage your cookies preferences" switch

Open GCHQ-Developer-112 opened this issue 2 years ago • 0 comments

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

  1. Navigate to the "Cookies Policy" page
  2. Scroll or navigate to the "Manage cookies preferences" section on the page
  3. If you have previously accepted cookies, click the switch to decline cookies. If you have previously declined cookies, click the switch to accept cookies.
  4. Refresh the page
  5. Scroll or navigate to the "Manage cookies preferences" section on the page
  6. 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.

GCHQ-Developer-112 avatar Nov 14 '23 17:11 GCHQ-Developer-112