Description
When a custom MFE is rendered inside the user settings dialog (via viewUrl), it can send a custom message with id: 'luigi.updateUserSettings' to update settings data without requiring the user to click "Save". This is not handled in the UI5 library.
How it works in Luigi Core (old)
In core/src/UserSettingsDialog.svelte and core/src/App.svelte, a custom message listener is registered for the key luigi.updateUserSettings. When received, the internal user settings state is updated with the message data.
Current behavior in UI5 library
Core-modular (container) already dispatches custom-message events when an MFE calls LuigiClient.sendCustomMessage(...). However, the UI5 library's UserSettingsDialog.svelte does not listen for this event on the luigi-container it mounts for viewUrl groups.
Expected behavior
The library should:
- Listen on the
custom-message event from luigi-container instances mounted in user settings MFE groups
- Check if
event.detail.id === 'luigi.updateUserSettings'
- Merge
event.detail.data into the internal storedUserSettings state
Where to implement
src/components/userSettings/UserSettingsDialog.svelte — in the mountMfeContainers() function where luigi-container elements are created via renderMicroFrontendContainer.
Original test reference
luigirepo/test/e2e-test-application/cypress/e2e/tests/1-angular/user_settings_dialog.cy.js — test: "Ctx update after storing user settings data using custom messages"
Description
When a custom MFE is rendered inside the user settings dialog (via
viewUrl), it can send a custom message withid: 'luigi.updateUserSettings'to update settings data without requiring the user to click "Save". This is not handled in the UI5 library.How it works in Luigi Core (old)
In
core/src/UserSettingsDialog.svelteandcore/src/App.svelte, a custom message listener is registered for the keyluigi.updateUserSettings. When received, the internal user settings state is updated with the message data.Current behavior in UI5 library
Core-modular (container) already dispatches
custom-messageevents when an MFE callsLuigiClient.sendCustomMessage(...). However, the UI5 library'sUserSettingsDialog.sveltedoes not listen for this event on theluigi-containerit mounts for viewUrl groups.Expected behavior
The library should:
custom-messageevent fromluigi-containerinstances mounted in user settings MFE groupsevent.detail.id === 'luigi.updateUserSettings'event.detail.datainto the internalstoredUserSettingsstateWhere to implement
src/components/userSettings/UserSettingsDialog.svelte— in themountMfeContainers()function whereluigi-containerelements are created viarenderMicroFrontendContainer.Original test reference
luigirepo/test/e2e-test-application/cypress/e2e/tests/1-angular/user_settings_dialog.cy.js— test: "Ctx update after storing user settings data using custom messages"