Skip to content

Conversation

carylwyatt
Copy link
Member

@carylwyatt carylwyatt commented Aug 7, 2025

Ange reported something I had noticed: notifications that had been dismissed were opening on every page load. I didn't think much of it, but it is pretty annoying!

After some investigation, I found that when @aelkiss and I refactored the cookie logic in ETT-309, I missed updating the setItem function in the notifications.js. I tested this on dev-3, and removing those parameters from the function fixed the issue.

I found one other setItem function that hadn't been updated in utils.js that sets a cookie for various preferences, so I fixed that, too.

When I was testing, I noticed that expiration dates on the cookies didn't make sense. Turns out we used setMonth instead of setDate method on the Date instance. When I ran that logic in the console, it was setting the expiration date for 90 months from now, in 2033. 🫠 That's fixed now.

- remove extra parameters from notification cookie setItem function
- remove date logic from HT.prefs.set since that's in
  cookies setItem now
- change setMonth to setDate in cookie setItem method
@carylwyatt carylwyatt force-pushed the ETT-498-notification-manager branch from 69fd0d8 to 441bad6 Compare August 7, 2025 19:33
@carylwyatt carylwyatt requested a review from liseli August 7, 2025 19:40
Copy link

@liseli liseli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes looks good to me, but as Caryl mentioned on the Jira ticket I have not way of testing whether it works in the UI. I'll approve, although Ange or Gayathri should test it before merging it.

@carylwyatt
Copy link
Member Author

@giramesh tested the UI flow on this fix and has given approval. Merging.

@carylwyatt carylwyatt merged commit e8b9e5e into main Aug 8, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants