luigi
luigi copied to clipboard
History entry for modals
When opening a modal micro frontend and showModalPathInUrl is true (https://docs.luigi-project.io/docs/navigation-parameters-reference/?section=showmodalpathinurl), a browser history entry should be created, so that if the user does a history back, the modal is closed but the main mfe will stay the same.
(extension-manager-189)
need some discussions
Blocked because behavior not yet clarified.
when opening a modal with showModalPathInUrl
, store the history length and create a history entry (i.e. using pushstate). when closing the modal, go back in history to the stored state. Double check "re-visit" behaviour, e.g. after page refresh or deeplink with no history.
tbd: history.go and history.back are async
Add a popState
eventListener when calling history.go() and use the option parameter to use it once
.
- call pushState
- (go forward)