Live data from Hacker News

Fullscreen mobile modal: how hard can it be?

github.com

41–45 of 45 posts

Re: Fullscreen mobile modal: how hard can it be?

#41

Earlier quoted context omitted.

In a native app, such modal would be pushed on the activity stack (on Android; I assume iOS has a similar pattern). It would essentially be a native equivalent of a new page. Modern web developers are, for some reason, more afraid of having multiple pages than they are of black death.

iOS does not push modals onto the navigation stack by default.

To be fair, iOS doesn't have a universal 'back' button, so you wouldn't reach for it to exit a modal anyway.

Re: Fullscreen mobile modal: how hard can it be?

#42

What use case would this ever have?

It’s basically a way to have stack navigation on the web, so you can keep the context behind the content it spawned. This is used all the time in native apps, so why not on web?

It seems so basic but it’s not straight forward at all to implement in a consistent way across browsers. After trying for a while myself, and not wanting to sink days into it, I’ve given up on finding the perfect solution for now. Going to try the 4th step here, but I believe there’s always a new modal bug waiting to be discovered.

Re: Fullscreen mobile modal: how hard can it be?

#43

Earlier quoted context omitted.

iOS does not push modals onto the navigation stack by default.

To be fair, iOS doesn't have a universal 'back' button, so you wouldn't reach for it to exit a modal anyway.

Sure, but the general guideline for modals is to have a "Cancel" or "Done" bar button item somewhere to exit. This is a different action than popping a view controller off the navigation stack.

Re: Fullscreen mobile modal: how hard can it be?

#44

What use case would this ever have?

It’s basically a way to have stack navigation on the web, so you can keep the context behind the content it spawned. This is used all the time in native apps, so why not on web? It seems so basic but it’s not straight forward at all to implement in a consistent way across browsers. After trying for a while myself, and not wanting to sink days into it, I’ve given up on finding the perfect solution for now. Going to tr…

I guess I just don’t understand the full screen part. I get why modules can be good but even in a native app you have some reference that you’re still on the same screen. Maybe I’m missing something still...

Re: Fullscreen mobile modal: how hard can it be?

#45
post #23

I wish this full-screen modal feature would disappear. I've lost track on the number of times I pressed back to close a modal on mobile because I thought it was a new page. Please make it clear that a dialog is a dialog.

Thanks for this response, this is very helpful. I will update post with this concern
Post reply on HN