feat: Update version to 2.2.4 and enhance loading status handling in MegaMenu

This commit is contained in:
Torsten Brendgen
2026-08-19 20:52:30 +02:00
parent df3df26be9
commit 79b4a8a6c4
7 changed files with 27 additions and 6 deletions
+5 -1
View File
@@ -4,7 +4,7 @@ Zentrale, barrierearme Portalnavigation aus SharePoint Managed Metadata für Sha
| Eigenschaft | Wert | | Eigenschaft | Wert |
|---|---| |---|---|
| Version | 2.2.3 | | Version | 2.2.4 |
| SharePoint Framework | 1.4.1 | | SharePoint Framework | 1.4.1 |
| Node.js für den Build | 8.17.0 | | Node.js für den Build | 8.17.0 |
| Moderne Seiten | SPFx Application Customizer | | Moderne Seiten | SPFx Application Customizer |
@@ -272,6 +272,10 @@ MegaMenu/
## Versionshistorie ## Versionshistorie
### 2.2.4
- Der Ladehinweis wird auch dann zuverlässig entfernt, wenn der Custom-Branding-Host während des asynchronen Ladens erzeugt wird.
### 2.2.1 ### 2.2.1
- Terms mit `_Sys_Nav_ExcludedProviders = GlobalNavigationTaxonomyProvider` werden einschließlich ihres Unterbaums - Terms mit `_Sys_Nav_ExcludedProviders = GlobalNavigationTaxonomyProvider` werden einschließlich ihres Unterbaums
+1 -1
View File
@@ -1,4 +1,4 @@
# MegaMenu – Arbeitsplan Version 2.2.3 # MegaMenu – Arbeitsplan Version 2.2.4
Status: Implementierung abgeschlossen; Ship-Build auf der vorgesehenen Node-8-Buildumgebung ausstehend Status: Implementierung abgeschlossen; Ship-Build auf der vorgesehenen Node-8-Buildumgebung ausstehend
+1 -1
View File
@@ -3,7 +3,7 @@
"solution": { "solution": {
"name": "mega-menu-client-side-solution", "name": "mega-menu-client-side-solution",
"id": "f4660e06-ce08-43ee-bfb7-5c4464e01133", "id": "f4660e06-ce08-43ee-bfb7-5c4464e01133",
"version": "2.2.3.0", "version": "2.2.4.0",
"includeClientSideAssets": true, "includeClientSideAssets": true,
"skipFeatureDeployment": true "skipFeatureDeployment": true
}, },
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "mega-menu", "name": "mega-menu",
"version": "2.2.3", "version": "2.2.4",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "mega-menu", "name": "mega-menu",
"version": "2.2.3", "version": "2.2.4",
"private": true, "private": true,
"main": "lib/index.js", "main": "lib/index.js",
"engines": { "engines": {
@@ -37,13 +37,14 @@ export default class MegaMenuApplicationCustomizer
private _topPlaceholder: PlaceholderContent | undefined; private _topPlaceholder: PlaceholderContent | undefined;
private _menuContainer: HTMLElement | undefined; private _menuContainer: HTMLElement | undefined;
private _renderer: MegaMenuRenderer | undefined; private _renderer: MegaMenuRenderer | undefined;
private _statusElement: HTMLElement | undefined;
@override @override
public onInit(): Promise<void> { public onInit(): Promise<void> {
const debug: boolean = this._isDebugEnabled(); const debug: boolean = this._isDebugEnabled();
debugLog(debug, LOG_SOURCE, 'onInit started.', { debugLog(debug, LOG_SOURCE, 'onInit started.', {
componentId: UserCustomActionMegaMenuId, componentId: UserCustomActionMegaMenuId,
version: '2.2.0', version: '2.2.4',
properties: this.properties || {}, properties: this.properties || {},
pageUrl: window.location.href, pageUrl: window.location.href,
webUrl: this.context.pageContext.web.absoluteUrl, webUrl: this.context.pageContext.web.absoluteUrl,
@@ -132,6 +133,8 @@ export default class MegaMenuApplicationCustomizer
return; return;
} }
this._clearStatus();
if (this._renderer) { if (this._renderer) {
debugLog(debug, LOG_SOURCE, 'Disposing the previous renderer instance.'); debugLog(debug, LOG_SOURCE, 'Disposing the previous renderer instance.');
this._renderer.dispose(); this._renderer.dispose();
@@ -203,6 +206,7 @@ export default class MegaMenuApplicationCustomizer
private _onDispose = (): void => { private _onDispose = (): void => {
this.context.placeholderProvider.changedEvent.remove(this, this._renderPlaceHolders); this.context.placeholderProvider.changedEvent.remove(this, this._renderPlaceHolders);
this._clearStatus();
if (this._renderer) { if (this._renderer) {
this._renderer.dispose(); this._renderer.dispose();
this._renderer = undefined; this._renderer = undefined;
@@ -250,6 +254,7 @@ export default class MegaMenuApplicationCustomizer
if (!this._topPlaceholder) { if (!this._topPlaceholder) {
return; return;
} }
this._clearStatus();
this._menuContainer = this._getOrCreateContainer('CustomHeader', this._topPlaceholder); this._menuContainer = this._getOrCreateContainer('CustomHeader', this._topPlaceholder);
const container: HTMLElement = this._menuContainer || this._topPlaceholder.domElement; const container: HTMLElement = this._menuContainer || this._topPlaceholder.domElement;
container.innerHTML = ''; container.innerHTML = '';
@@ -258,6 +263,14 @@ export default class MegaMenuApplicationCustomizer
status.setAttribute('role', 'status'); status.setAttribute('role', 'status');
status.textContent = message; status.textContent = message;
container.appendChild(status); container.appendChild(status);
this._statusElement = status;
}
private _clearStatus(): void {
if (this._statusElement && this._statusElement.parentNode) {
this._statusElement.parentNode.removeChild(this._statusElement);
}
this._statusElement = undefined;
} }
private _isGuid(value: string): boolean { private _isGuid(value: string): boolean {
+4
View File
@@ -41,6 +41,10 @@ validateStyle('classic/megamenu-classic.css');
validateStyle('src/extensions/megaMenu/MegaMenu.module.scss'); validateStyle('src/extensions/megaMenu/MegaMenu.module.scss');
var modernStyles = read('src/extensions/megaMenu/MegaMenu.module.scss'); var modernStyles = read('src/extensions/megaMenu/MegaMenu.module.scss');
var applicationCustomizer = read('src/extensions/megaMenu/MegaMenuApplicationCustomizer.ts');
assert('modern loading status is cleared before menu render',
applicationCustomizer.indexOf('this._clearStatus();') >= 0 &&
applicationCustomizer.indexOf('private _statusElement: HTMLElement | undefined;') >= 0);
[ [
'white', 'white',
'neutralLighter', 'neutralLighter',