Skip to content

Conversation

@sarongebre
Copy link
Contributor

Migrated alert component to wdn framework 6. Replaced all jQuery with plain JavaScript. Fixed alert close icon showing after refresh.

Version 2 contains: Saving alert data to a cookie to reduce the number of times the alert JavaScript needs to be loaded. Two new cookie names were created to prevent conflicts with existing WDN5 alert cookies, as some sites will remain on WDN5 for a while before migrating.

Closes #1812
Closes #1757

… on CMS), I’ve removed the logic that sets the unlAlertsData cookie, as it interferes with how WDN5 handles it. I’ll work on new logic for storing alert data in the cookie, which will be deployed once all sites have migrated to WDN6.
… JavaScript needs to be loaded. Two new cookie names were created to prevent conflicts with existing WDN5 alert cookies, as some sites will remain on WDN5 for a while until they migrate. Fixes 1812.
@sarongebre sarongebre requested review from skoolbus39 and tommyneu July 7, 2025 13:56
@sarongebre sarongebre self-assigned this Jul 7, 2025
@sarongebre sarongebre added the 6.0 label Jul 7, 2025
@tommyneu tommyneu changed the base branch from 6.0-WIP to 6.0 August 1, 2025 17:51
@sonarqubecloud
Copy link

sonarqubecloud bot commented Aug 1, 2025

);
}

async #checkIfFetchCallNeeded() {
Copy link
Member

Choose a reason for hiding this comment

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

If I have two tabs open and if there is no data in unlcap.js then both tabs will be fetching the data. If there is data in unlcap.js then it preforms as intended. This is leading to unneeded requests for unlcap.js. If there is no data in unlcap.js then the cookie needs to still be set so that these unneeded requests are not being sent

Copy link
Member

@tommyneu tommyneu left a comment

Choose a reason for hiding this comment

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

Making sure to write this down, the ID unlalert is being used in multiple elements

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate alert component to wdn framework 6 Alert close icon is shown after refresh

3 participants