How do I do a routable modal from an Entity Action...
# package-development
w
After some advice with doing modals with routable URLs/deep links
I am trying to turn my modal that was opened from an entity action to be a modal that is opened that has a routable URL. So that the modal can be deep linked to. What part of the puzzle am I missing here?
Any pointers please from the usual suspects... @Niels Lyngsø @Jacob Overgaard @Markus Johansson or @Kevin Jump ?
j
w
Didn’t see this…
Off for a read to see what part of the puzzle I have missed
Hmm so uses UmbRoutes and maps a route pattern to a component
But not sure I see the connection to this and a modal
n
Yes, this is not for Routable Modals, also Yaris articles should specifically for Sections be updated with the knowledge that there is a specific extension point for that called ‘sectionRoute’ The Routable Modals is a working concept but not a nice developer experience so for the given date I would find a case in the source code that fits your case and then be inspired by that. In the future we will polish the DX and write a proper article about it. I hope that will work for you
w
Yeh need to find a routable modal that is from an entity action. All seem to be from buttons or anchor links to open/invoke so far.
I suggest you leave a reply on Yaris blog post so they are aware and can either update their post
Struggling to find an example with entity action and a routable modal, @Niels Lyngsø are you aware of one for me to compare with?
n
Yeah, Well no, not that combination. I Think that specific case might not be plausible. Because the steps to get to a Routable Modal must be Routable as well.
w
Ok, is there anyway for me to have a deep link to achieve this at all?
ie an entity action to open a modal that is specific to a document/content node
Just thought it would be a good use case to share a documents examine index entry. For now I will park this idea unless you can think of a solution Niels?
n
Well, its depends on what you like to achieve by this link... cause opening a Modal, means opening a modal on top of something and that something would have to be the base of your path and that UI the host for your Modal. But this sounds like something coming from the tree, meaning what is beneath/where your at, does not matter. And that is not really possible. The routable paths should be seen as a tree structure. As they belong in a specific place in your URL, and it sounds like this modal could appear on top of any location, so not a valid case. — I understand I'm not describe the case very well here, maybe one day I will be able to describe why that is. But in contrast navigating to a specific Block, means navigating to a specific place in the UI — I hope that as a constrast make the difference clear 🙂
w
Well the modal and the document entity action and its modal is unique to each document. So it does make sense in this tree structure you are talking about IMO.
But as you can get to an entity action by right clicking on a tree node without first navigating to it in that case it may not make sense. For now I have parked this
n
I only allow my self to dive into this topic because it you Warren, and its not a pretty story but we cant always have pretty stories, so here you go: 🤗 I guess my point is, where should the main view be at when this Modal is open. In this case is does not matter if you are on the Content tab or the Info Tab. or some other extension Tab. And in this way there will be a clash of where the Modal Path should build from, what the full path should be, and if its not full, we will have resolving paths(redirects) that closes the modal.. aka if your path does not go to a specific variant/tab of the Document, then it would take you to the first one aka. closing the modal as the modal was not originating from within that.... You could see that as a limitation of the system.. In other words, in this case the origin of the modal would have to be from something coming from the main view and not the sidebar.
w
hahaha you know you love me really & miss my oh so annoying questions 😛
3 Views