Skip to content

Commit

Permalink
[#2965] Clean Siteimprove logs and rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
jiromaykin committed Feb 4, 2025
1 parent 4a81936 commit 6ed3241
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 19 deletions.
28 changes: 14 additions & 14 deletions src/open_inwoner/js/components/siteimprove/error-tracking.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
* Note: users can upload multiple faulty files with their respective errors, and can delete them one by one,
* Tracking should only happen on newly added errors, not the entire occurring set.
*/
if (typeof _sz === 'undefined') {
/** Mock SiteImprove `_sz` object for testing - only used during development */
var _sz = {
push: function (data) {
try {
console.log('Event pushed to _sz:', data)
} catch (error) {
console.error('Error occurred while pushing event data:', error)
}
},
}
}
// if (typeof _sz === 'undefined') {
// /** Mock SiteImprove `_sz` object for testing - only used during development */
// var _sz = {
// push: function (data) {
// try {
// console.log('Event pushed to _sz:', data)
// } catch (error) {
// console.error('Error occurred while pushing event data:', error)
// }
// },
// }
// }

/**
* Class that handles the transaction between file errors and SiteImprove.
Expand Down Expand Up @@ -62,7 +62,7 @@ class DynamicFileInputErrors {
)

currentErrors.forEach((message, id) => {
if (!this.previousErrorState.has(id))
if (!this.previousErrorState.has(id) && typeof _sz !== 'undefined')
_sz.push(['event', 'Mijn Aanvragen', 'Error', message])
})

Expand All @@ -71,7 +71,7 @@ class DynamicFileInputErrors {
}

/**
* The predefined (dutch) error messages
* The predefined (Dutch) error messages
* @private
*/
get #ERROR_MAP() {
Expand Down
3 changes: 1 addition & 2 deletions src/open_inwoner/js/components/siteimprove/tracking.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
* in order to organize them for the Siteimprove Dashboard where they are grouped by category
*/

// Mock _sz object for testing
// if (typeof _sz === 'undefined') {
// /** Mock SiteImprove `_sz` object for testing - only used during development */
// var _sz = {
// push: function (data) {
// try {
Expand Down Expand Up @@ -247,7 +247,6 @@ const specificClickSelectors = {
['event', 'Aanvraag detail', 'Click', 'Upload documenten'],
'#document-upload > .form__control.file-input > .form__actions.form__actions--fullwidth > button span':
['event', 'Aanvraag detail', 'Click', 'Upload documenten'],

// Accessibility header
'.accessibility-header > ul > li > a[aria-label="Lees voor"] > .link__text': [
'event',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,6 @@
padding: 0 var(--spacing-medium);
}
}
#selectButton .close-icon {
pointer-events: all;
}

#selectButton .close-icon {
border-radius: var(--border-radius);
Expand Down

0 comments on commit 6ed3241

Please sign in to comment.