luigi icon indicating copy to clipboard operation
luigi copied to clipboard

History entry for modals

Open hardl opened this issue 2 years ago • 4 comments

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)

hardl avatar Jul 06 '22 07:07 hardl

need some discussions

JohannesDoberer avatar Jul 06 '22 09:07 JohannesDoberer

Blocked because behavior not yet clarified.

JohannesDoberer avatar Jul 18 '22 12:07 JohannesDoberer

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.

hardl avatar Sep 13 '22 07:09 hardl

tbd: history.go and history.back are async

JohannesDoberer avatar Oct 03 '22 18:10 JohannesDoberer

Add a popState eventListener when calling history.go() and use the option parameter to use it once.

  • call pushState
  • (go forward)

JohannesDoberer avatar Oct 11 '22 07:10 JohannesDoberer