Description
The getCurrentRoute() API on linkManager() (including fromClosestContext(), fromContext(), fromParent(), and fromVirtualTreeRoot() variants) does not work in the UI5 library.
Root Cause
The Luigi Container dispatches a GET_CURRENT_ROUTE_REQUEST event on the container element when a micro frontend calls LuigiClient.linkManager().getCurrentRoute(). However, no addEventListener for this event is registered in the library's container setup code (unlike other events like NAVIGATION_REQUEST, ALERT_REQUEST, etc. which are all handled).
The Promise returned by getCurrentRoute() never resolves.
Expected Behavior
The library should handle the GET_CURRENT_ROUTE_REQUEST event and respond with the current route, similar to how it's handled in the original Luigi framework.
Steps to Reproduce
- Configure a WC node with
webcomponent: true and a navigationContext
- Inside the WC, call
this.LuigiClient.linkManager().fromClosestContext().getCurrentRoute()
- The returned Promise never resolves
Description
The
getCurrentRoute()API onlinkManager()(includingfromClosestContext(),fromContext(),fromParent(), andfromVirtualTreeRoot()variants) does not work in the UI5 library.Root Cause
The Luigi Container dispatches a
GET_CURRENT_ROUTE_REQUESTevent on the container element when a micro frontend callsLuigiClient.linkManager().getCurrentRoute(). However, noaddEventListenerfor this event is registered in the library's container setup code (unlike other events likeNAVIGATION_REQUEST,ALERT_REQUEST, etc. which are all handled).The Promise returned by
getCurrentRoute()never resolves.Expected Behavior
The library should handle the
GET_CURRENT_ROUTE_REQUESTevent and respond with the current route, similar to how it's handled in the original Luigi framework.Steps to Reproduce
webcomponent: trueand anavigationContextthis.LuigiClient.linkManager().fromClosestContext().getCurrentRoute()