-
-
Notifications
You must be signed in to change notification settings - Fork 313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stack based Modal Navigation #1034
Comments
One suggested approach is to change And for showing multiple modals at once, we can replace: {#if $modalStore.length > 0}
{#key $modalStore} in {#each $modalStore as store, index (index)} Happy to create a PR if approach is approved. |
I would love to have overlapping modals. This is super useful if you want to alert the user when closing a modal, incase their work may be lost. Examples... Placement would be important too. You want to anchor to the top of existing modal or center, or even be outside in it's own global space. To not introduce a breaking chance, could there be a way to add a setting between creating a queued modal, and overlapping modal? Default would be queued, so no breaking change. |
I also need to trigger stacked Modals as described here. Would the following work? // Original function pushes
/*
modalStore.trigger({
type: 'component',
component: {
ref: DocumentComponent,
}
});
*/
// Use the underlaying method update to manually put the new modal to the front?
modalStore.update(modals => [{
type: 'component',
component: {
ref: DocumentComponent,
}},
...modals
]) Is seems to open the new modal and temporary close the old one. So it's not yet a real stacking. |
It would not be a breaking change if it was implemented in a way that the que system was still the default, and a prop option to choose "stacked" would be available. Although I personally think stacking them should be the default, as having multiple modals lined up in a que kind of seems like a situation you would never want to put your end-user in anyways. I can't imagine a website that kept popping up modals when I tried to exit them - that would be pretty frustrating. |
Yeah for anyone wondering, I'm still brainstorming this. We would have to find a way that doesn't cause layout issues (lots of modals on a small screen) and doesn't frustrate the user as described above. It sometimes takes a while to circle back to this, but it has remained in our queue because we plan to revisit at some point in the future. |
Very requested feature. Simple use case: Delete button inside modal which should show a Prompt modal over it (or instead, but reopen previous if needed) PS. For now I'll use this workaround #1034 (comment), but state of previous modal was resetting. |
In an effort to prepare for Skeleton v3, we're consolidate some related issues down to a single ticket. This will ensure that we can see the full context of requests when the time comes to refactor and update this feature going forward. If you wish to add additional feedback or suggestions, please so here: |
Describe what feature you'd like. Pseudo-code, mockups, or screenshots of similar solutions are encouraged!
Currently, the Modal system is based on Queue (FIFO) principle. But in terms of navigation, a Stack (LIFO) is more commonly used.
Also, with the current system, a currently showing modal can't show another modal unless it has been closed and all the modals have been called/triggered beforehand:
Transitioning to Stack based allows more control and customization, like:
What type of pull request would this be?
Enhancement
Any links to similar examples or other references we should review?
No response
The text was updated successfully, but these errors were encountered: