Live data from Hacker News

Fullscreen mobile modal: how hard can it be?

github.com

11–20 of 45 posts

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

#11
post #5

I miss the days when a form was just a form, and as a user I could decide its font size, I could zoom in on it, and I could scroll it as I wished.

...but you were on a desktop machine then. You could press hot keys to zoom the fonts up a size and whizz up and down with a scroll wheel. On mobile it is different.

Yeah - on mobile you pinch your fingers together and spread out as a gesture to zoom out. You can go up and down by flicking your finger on the screen. It's still the same. The input methods are different but they have equivalents that are more or less standardized by now.

I feel like mobile design has slowly become "do it the designer's way or you're wrong" and give it another 5-10 years before it swings back around to "Oh god, what were we doing taking away the user's choice for all those years?"

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

#13
post #5

I miss the days when a form was just a form, and as a user I could decide its font size, I could zoom in on it, and I could scroll it as I wished.

I miss the days when a form was just a form, and as a user I could decide its font size, I could zoom in on it, and I could scroll it as I wished.

I am blessed to work for a company where web standards, accessibility, and page load speed are considered more important than the whims of my millennial boss, or the marketing department.

That's not to say I don't have my share of "I want this to look like a web site that I would want to visit" and "Can you do this cool thing like TMZ?" moments. I remind them that we don't make web sites for them or me, but for our visitors.

If that doesn't work, I pull out the memos showing that the legal department is on my side, and somehow groks the whole web bloat problem.

Can't wait to finally deploy the new site and replace the old JS/SPA + library + framework + polyfill + jquery + ... + ... + ... site the last guy built.

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

#15
My feeling is that it's only hard because the author tried to create a solution that fits his needs by piling more and more external code on top of each other.

I would expect that when you tinker a bit with plain CSS, you will find a simple solution.

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

#16
post #14

What about just removing what you can't see from the DOM entirely, and load it in again when the dialog closes? Wouldn't be too hard with React or Vue. Just make it so either the page content or the modal is loaded.

Or just throw in a CSS rule that says 'Everything not in the modal is display: none'. You don't need React or Vue for that. Just a line of CSS.

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

#19
Oh come on. This task isn't hard of itself, the author just seems to lack experience with the web platform. A responsive modal that goes full-screen on mobile isn't really complex. Just set vertical overflow on the main content element to hidden and auto on the modal container, so the user can only scroll that when its open. Then, focus the first input in the modal if any, or listen to keyup if you really messed with the tabindex. I've implemented this in a few projects, two of them with Vue. That sort of stuff isn't magic, just frontend work.

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

#20
post #19

Oh come on. This task isn't hard of itself, the author just seems to lack experience with the web platform. A responsive modal that goes full-screen on mobile isn't really complex. Just set vertical overflow on the main content element to hidden and auto on the modal container, so the user can only scroll that when its open. Then, focus the first input in the modal if any, or listen to keyup if you really messed with…

Any chance you can share a link to a pen?
Post reply on HN