Live data from Hacker News

Don't Roll Your Own

susam.net

71–80 of 128 posts

Re: Don't Roll Your Own

#71

> Don't roll your own page scrolling. browser should not even let the page see this action > Don't roll your own link navigation. browser should not even let the page see this action > Don't roll your own text selection. browser should not even let the page see this action > Don't roll your own copy and paste. browser should not even let the page see this action I'm serious. WHY javascript code is even allowed to see…

> WHY javascript code is even allowed to see all these actions of the user? scrolling: used by games, maps, image viewers link navigation: used for client-side routing (youtube/twitch, any website with a chat window) text selection and copy/paste: word processors, spreadsheet editors, forum software, etc. I'm not sure if your question was sincere or if you were trying to say that the web should not support these use…

Yes, you get to the heart of the problem - we turned what started of as a document viewer into a general purpose application platform.

Features paramount in a document viewer (broadly, "respect the user's local document viewing preferences") aren't desirable in a general purpose application platform.

A large number of companies/web developers don't think of themselves as offering the user a document to view on their own terms, but rather an "experience" that they want full control over (which means, most of the time: show ads and record user behavior).

If you're offering me a game, fair enough. But if you're showing me my hotel reservation or electric bill, I want a document, not an ""experience"".

Re: Don't Roll Your Own

#72

> Don't roll your own page scrolling. browser should not even let the page see this action > Don't roll your own link navigation. browser should not even let the page see this action > Don't roll your own text selection. browser should not even let the page see this action > Don't roll your own copy and paste. browser should not even let the page see this action I'm serious. WHY javascript code is even allowed to see…

> WHY javascript code is even allowed to see all these actions of the user? scrolling: used by games, maps, image viewers link navigation: used for client-side routing (youtube/twitch, any website with a chat window) text selection and copy/paste: word processors, spreadsheet editors, forum software, etc. I'm not sure if your question was sincere or if you were trying to say that the web should not support these use…

On the extreme end, a web app can do all of its own rendering in a canvas with WebGL/WebGPU. Some apps do exactly this: Figma, Google Maps, Google Docs. Just to name a few. (edit: Earlier I claimed PDFjs uses canvas, but it does not. I was confusing it with Google Docs [1].)

It's a thing you can do. But it is very bad for extensions and extension developers for the same reasons that Java applets, Flash, and Shockwave were bad for the web. These apps are difficult for end users to customize. It's a real bane to tinkerers. And it's a shame that "view source" has slowly grown completely useless over the decades.

[1]: https://workspaceupdates.googleblog.com/2021/05/Google-Docs-...

Re: Don't Roll Your Own

#73

I find that most datepickers are better than the browser's default. It's a shame that they can't be styled more

I agree.

The date range selector used in Google Flights is a near flawless control. The implementation can be done, it’s just hard.

Re: Don't Roll Your Own

#74

> Don't roll your own page scrolling. browser should not even let the page see this action > Don't roll your own link navigation. browser should not even let the page see this action > Don't roll your own text selection. browser should not even let the page see this action > Don't roll your own copy and paste. browser should not even let the page see this action I'm serious. WHY javascript code is even allowed to see…

> WHY javascript code is even allowed to see all these actions of the user? scrolling: used by games, maps, image viewers link navigation: used for client-side routing (youtube/twitch, any website with a chat window) text selection and copy/paste: word processors, spreadsheet editors, forum software, etc. I'm not sure if your question was sincere or if you were trying to say that the web should not support these use…

> scrolling: used by games, maps, image viewers

Out of curiosity, does anyone like the way Google Maps hijacks scrolling? I use a trackpad. When I scroll, I'd want it to pan around on the map, not zoom in and out (which always feels awful as a scroll action and never stops where I want it to).

Click-drag to pan doesn't feel nice.

It doesn't really matter anymore, since 99% of maps use is on mobile now, but this was always a small pain point to me in the past.

Re: Don't Roll Your Own

#75
post #69

Earlier quoted context omitted.

> Sold separately aaaand you lost my interest the moment money got involved all these things are already fixable by browser extensions - what is lacking is exposing that in browser options and even making it the default

Do you not believe developers should be paid for the work they do? And if not, what do you think the majority of people on this forum do?

Not the GP, but to me this case feels like extortion.

I have the same problem with paying for extensions like Dark Reader, DeArrow, and any ad blockers. None of these apps should exist in the first place. They were created because the default state of the web is barbaric. And some developers have the gall to charge for the luxury of making the experience tolerable?

And yet, I've paid for every one of these.

Re: Don't Roll Your Own

#76

> Don't roll your own page scrolling. browser should not even let the page see this action > Don't roll your own link navigation. browser should not even let the page see this action > Don't roll your own text selection. browser should not even let the page see this action > Don't roll your own copy and paste. browser should not even let the page see this action I'm serious. WHY javascript code is even allowed to see…

Applications like Google Docs would be impossible without each of the four things you listed being available. We had Google Docs that didn’t roll-your-own for each of the items in that list and it was called Writely and it was absolute dogshit (but super cool for its time) because those limitations were too extreme. And by extension it wouldn’t make sense to have Chromebooks as a category of hardware, because web sof…

> Applications like Google Docs would be impossible without each of the four things you listed being available.

I was already in favor of banning it. You don't have to keep trying to convince me.

Okay, snark off. But as someone who dislikes the proliferation of "web apps", I'd be perfectly happy to see Google Docs and others die off if it meant we moved back to real, locally run applications.

Re: Don't Roll Your Own

#77

Earlier quoted context omitted.

Applications like Google Docs would be impossible without each of the four things you listed being available. We had Google Docs that didn’t roll-your-own for each of the items in that list and it was called Writely and it was absolute dogshit (but super cool for its time) because those limitations were too extreme. And by extension it wouldn’t make sense to have Chromebooks as a category of hardware, because web sof…

Seems like exactly the kind of thing permissions are for.

That is indeed how things like copy/paste through the menus already work; you install an extension to get the clipboard permission or the browser limits you to keyboard shortcuts

Re: Don't Roll Your Own

#78
The problem with Don't Roll Your Own is that Other People's Code gets more and more grotesque with each passing year. More bloat, more random dependencies, more churn. Other People are a headache in any industry; with Other People's code you have Other People problems by proxy.

Re: Don't Roll Your Own

#79

> Don't roll your own page scrolling. browser should not even let the page see this action > Don't roll your own link navigation. browser should not even let the page see this action > Don't roll your own text selection. browser should not even let the page see this action > Don't roll your own copy and paste. browser should not even let the page see this action I'm serious. WHY javascript code is even allowed to see…

Desktop envy: so you could create certain desktop-like interactions.

Re: Don't Roll Your Own

#80

Earlier quoted context omitted.

> WHY javascript code is even allowed to see all these actions of the user? scrolling: used by games, maps, image viewers link navigation: used for client-side routing (youtube/twitch, any website with a chat window) text selection and copy/paste: word processors, spreadsheet editors, forum software, etc. I'm not sure if your question was sincere or if you were trying to say that the web should not support these use…

> scrolling: used by games, maps, image viewers Out of curiosity, does anyone like the way Google Maps hijacks scrolling? I use a trackpad. When I scroll, I'd want it to pan around on the map, not zoom in and out (which always feels awful as a scroll action and never stops where I want it to). Click-drag to pan doesn't feel nice. It doesn't really matter anymore, since 99% of maps use is on mobile now, but this was a…

I never liked it either.

Panning by swiping feels so natural. That it breaks on a trackpad feels like a major oversight.

Post reply on HN