Skip to content

Commit

Permalink
fix(core): 🐛 fix incorrect overflow wrapper class name
Browse files Browse the repository at this point in the history
  • Loading branch information
alistair3149 committed May 27, 2024
1 parent 3cd8d20 commit bc356f9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions resources/skins.citizen.scripts/overflowElements.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ class OverflowElement {
}

/**
* Wraps the element in a div container with the class 'citizen-table-wrapper'.
* Wraps the element in a div container with the class 'citizen-overflow-wrapper'.
* Checks if the element or its parent node is null or undefined, logs an error if so.
* Verifies the existence of $wgCitizenOverflowNowrapClasses in the config and if it is an array, logs an error if not.
* Skips wrapping if the element contains any of the ignored classes specified in $wgCitizenOverflowNowrapClasses.
* Creates a wrapper div element, adds the class 'citizen-table-wrapper' to it.
* Creates a wrapper div element, adds the class 'citizen-overflow-wrapper' to it.
* Filters and adds inherited classes ('floatleft', 'floatright') from the element to the wrapper.
* Inserts the wrapper before the element in the DOM and appends the element to the wrapper.
* Sets the wrapper element as a property of the class instance.
Expand All @@ -98,7 +98,7 @@ class OverflowElement {
!config.wgCitizenOverflowNowrapClasses ||
!Array.isArray( config.wgCitizenOverflowNowrapClasses )
) {
mw.log.error( '[Citizen] Invalid or missing $wgCitizenOverflowNowrapClasses. Cannot proceed with wrapping table.' );
mw.log.error( '[Citizen] Invalid or missing $wgCitizenOverflowNowrapClasses. Cannot proceed with wrapping element.' );
return;
}

Expand All @@ -111,7 +111,7 @@ class OverflowElement {
}

const wrapper = document.createElement( 'div' );
wrapper.className = 'citizen-table-wrapper';
wrapper.className = 'citizen-overflow-wrapper';

const inheritedClasses = [
'floatleft',
Expand Down Expand Up @@ -221,7 +221,7 @@ class OverflowElement {
/**
* Initializes the process of wrapping overflow elements within the given body content.
*
* @param {HTMLElement} bodyContent - The body content element containing tables to be wrapped.
* @param {HTMLElement} bodyContent - The body content element containing elements to be wrapped.
* @return {void}
*/
function init( bodyContent ) {
Expand Down

0 comments on commit bc356f9

Please sign in to comment.