Take a look how long it took to be able to customize <select>.
A hamburger menu or an accordion with proper viewport scrolling should be a couple of lines of html css...
The one in webkit on macOS isn’t quite as good, but is better than the one in firefox if only because firefox closes the picker when you type a year in to move far through time. Good thing firefox is open source.
Sigh. You anonymous code authors are always working to bring the user down, even when there is a 1000000:1 ratio between them and you.
Spoken like someone who's never had to work on a date picker.
You mean your browser's. There is no "the browser".
The date range selector used in Google Flights is a near flawless control. The implementation can be done, it’s just hard.
Congratulations, now your website is a shitty experience for your users. Well done.
The engineers and designers then proceed to do as they're told because they like that nice fat paycheck at the end of the month more than they like the service they're building. Which is fair enough.
One other possible title of this article could just be, don’t break UI conventions. Which is not the same thing.
Instead of trying to download and configure a date time thing (for something app specific like domain specific date ranges) rather than having to rely on the configuration of a larger library, then having to manage all future major version upgrades (and some of these npm libraries have major versions every year!) why not just create your own smaller surface area component? It’ll be literally zero maintenance compared to managing an npm dependency in your app.
I have a personal issue with having a 500KB page load, so a button press can be animated.
I hate how most "modern" websites have MEGABYTES of JavaScript. CSS? Pack it in a js bundle with JSX and object literals. Images? Throw them in too, just make it load on demand.
Hell, just put a <div id=root/> there and let js do the rest. It's not like we have browsers and networks and edge nodes optimized to render websites in other ways.
Bloated sites need to go. Putting makeup on the pig and it’s still a pig.
It looks like you guys are both in alignment.
CSS has advanced to a point, where you can add quite a bit of interactive “bling” to a site, with very little code.
The great things about all these crypto libraries are:
- Minimal to no dependencies
- Coded by security conscious people
- Often externally audited
I wish more libs/deps are crafted like them. Until then the risk of rolling your own vs using a dep isn’t as different as it could be.
OpenSSL ?
LibreSSL, created as a response to the OpenSSL Heartbleed security vulnerability?
Any alternative SSL/TLS library?
Non-SSL/TLS cryptography? NaCL, Libsodium? Post-quantum crypto?
There are many libraries, with different applications, protocol, crypto algorithms. Some implement everything, some implement secure minimum.
Then the question is PKI, who do you trust your keys? Which SSL certificates do you trust?
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 all these actions of the user? We already loaded the page and rendered it - we users must already be free to do with the content as we please
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 cases.
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"".
Your preferences are unusual. Most people either don't care or prefer flashiness over consistency.
It's something I've come to realise about the why the world is the way it is. Yes, to a certain extent it is because of locally maximal power structures and hierarchies propagating - but it is also because, taken as a whole, people are really just like that. A single politician may be corrupt, but that does not mean that most people, if taking their place, would not be as or more corrupt. Management sucks, yes - but that doesn't mean that most engineers who become managers wouldn't act the same way. You and I may prefer consistency over flashiness, but the majority of the world couldn't care less. So flashiness and "experiences" win.
I'd previously found it interesting enough to try out for half a day. I've been back to my regular boring prompt ever since. Humans are attracted to shiny things. I innately understand why stuff like this is popular, even if I don't understand it intellectually / psychologically (I tried it because it looked cool; it didn't stick; what's different? I don't know, but I could talk a lot about it without really having a structured point.)
Yes, we've broken the intent of the browser. I'm sure there are better examples, but for me it was Google Maps. Oh my goodness, have you ever seen such a thing? It had to be impossible, but they did it. And from there, nothing was safe.
I don't think we can put the genie back in the bottle. There are things we can believe shouldn't be allowed in the browser. But breaking them would break things that people rely upon. Only pushing further to native apps (which I actually like on my desktop computer, phone is a walled garden) would make it possible and that's annoying as hell) could make it possible. Rambling. Just woke up. Please forgive.
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-...
Maybe it's not due to differences in the technologies used. I can imagine it's because less people make these games and spend less time per game to optimize it. Years ago there were thousands of flash games of each genre, a lot of them very well made, likely optimized for speed, pure works of art. Now I see the same 100 HTML5 games on all the sites, maybe reskinned a bit. I don't think we'll ever have in terms of quality as what was available on Kongregate or Armor Games.
I might download an old browser with Flash and some games. Years ago there was a collection of a few TB of Flash games, hope it's still around. Maybe some games that required network will not work, but most didn't.
I’m not sure that’s actually the case.
Steve Jobs argued in his “thoughts on Flash” letter that Flash was too buggy, insecure and resource-hungry for mobile platforms. I worked on Chrome around that time and the Flash plugin was definitely one of the biggest sources of problems.
I think all the stuff you’re complaining about is to do with business models and not really anything to do with the technology. I reckon if Flash were still around we’d probably be in much the same place we are now. People would be complaining about restaurant menus being written in Flash instead of plain old HTML, etc etc.
It's still likely that older games had more users so were optimized while newer games for Desktop don't have even 1% of that userbase since most people use a smartphone for simple games.
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.
Pinching/spreading with index and middle finger feels unergonomic. Using my thumb on the trackpad would also feel unnatural, as would putting my 2 index fingers on the trackpad.
2 finger scroll is something you can "fling" such that the zooming motion continues even as your fingers have been lifted off the trackpad. Trying to "fling" a spread-out motion with your index and middle finger is an awkward motion, and of course in a pinching motion, your fingers would just crash into each other, so you'd have to lift before they crash. Pretty awkward.
On the phone, I often prefer tap then drag up/down (i.e. touch, lift, touch, slide) to zoom in/out with a single finger. It allows me to "fling" the zooming motion so it continues after I've lifted my finger. It makes a phone's interface behave like a trackpad's scrolling-zoom.
Panning by swiping feels so natural. That it breaks on a trackpad feels like a major oversight.
does such a browser exist?
I have strong suspicion that it's exactly because of the “document” history why web is so approachable to creators, why there is “view source” and ultimately why you can hop from simple html blog, to CRUD app, to advanced CAD software.
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
Which is what StopTheMadness is and does.
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.
We already have regulations for accessibility and advertising. Yet they're weak in the US and rarely enforced.
That comment places a lot of blame where it doesn’t lie. It’s like calling surgeons extortionists for having the gall to charge for treating you. Yes, ideally that should be free and available to all, and perhaps if those people had the freedom to choose (e.g. having their own needs met so they didn’t have to work) they would do it. But that’s not how the system is setup, and their skills don’t translate to fixing the problem at the root. Not all of us are cut out to be politicians (and as we all know, being well-intentioned as one still doesn’t mean you have the power to enact policy).
FWIW, I don't consider surgeons to be extortionists. That's an absurdity that you are using as illustrative of why I'm wrong to call software developers extortionists when they charge for a privilege that should be a right. There are two issues with the comparison: 1) I did not call software engineers extortionists (but sure, I can see how you drew that conclusion), and 2) people absolutely should have a right to life-saving surgery and should not be denied on the basis of payment.
There is a huge preexisting problem: health care is not a human right [1]. There are other issues with health care that isn't just money. Many life-saving transplant patents are stuck in a wait list, for instance, and many die waiting. I do what I can. I'm a registered organ donor and try not to destroy my liver. I just haven't died yet, and I still need it. But this line of reasoning is off in the weeds, and I won't pursue it further.
Perhaps what it comes down to is that you have a pro-capitalist outlook, and I have They Live sunglasses.
Of course, that’s the point of the comparison. If I thought you thought surgeons were extortionists I wouldn’t have used the example because it wouldn’t have served to illustrate the point.
> But this line of reasoning is off in the weeds, and I won't pursue it further.
Indeed, that strayed completely away from the point. This has nothing to do with healthcare.
> Many life-saving transplant patents are stuck in a wait list, for instance, and many die waiting.
I know. I’ve made that point in a sibling comment hours before your post.
https://news.ycombinator.com/item?id=48259154
> Perhaps what it comes down to is that you have a pro-capitalist outlook
Making assumptions about strangers on the internet tends to be embarrassing, and this is no exception.
https://news.ycombinator.com/item?id=38999857
https://news.ycombinator.com/item?id=46854217
https://news.ycombinator.com/item?id=46853865
https://news.ycombinator.com/item?id=46564646
> and I have They Live sunglasses.
I was going to say the same of you.
Touché.
What do you mean by "should be"? Surgery is free and available to everyone. So why would one accuse surgeons of being extortionists? So I am not sure how the surgeon comparison works. That example supports the parent commenter's point that these extensions should be free.
Of course, there is still the practical question of who will do the work and how they will make a living. We can do what we do for surgeons. Maybe have a nonprofit consortium that people fund, so that it can support the extension developers. Yes, people would be spending money either way, but at least that money would be going toward a larger cause. Just like we pay taxes so the government can fund surgeons, who can then treat people.
I meant “would be”. Not that I think it makes that much difference here.
> Surgery is free and available to everyone.
That’s definitely not true worldwide. I think if you stop for a minute you can come up with at least one country. And even in those where it is free in public hospitals, it’s not uncommon for some to have a waitlist of years to the point you can die before it even happens. Also, did you know there are places where they don’t even have hospitals, let alone surgeons? The world is a big place, lots of disparity.
> So why would one accuse surgeons of being extortionists?
Even given all that, I think if you engage with the argument in good faith and steel man it instead of nitpicking, you’ll understand the point and can come up with your own example to satisfy you. Just pick a job you can’t do and have to pay for someone to fix something which wasn’t your fault or the fault of the other person. I believe you’re a smart person and could surely come up with something with little effort.
> there is still the practical question of who will do the work and how they will make a living.
That’s… The point. Especially for programmers, how many of us would do this shit for free, full time and beyond, for the sole purpose of benefiting others, if we had the opportunity to because we didn’t have to worry about basic needs? A large number. Way less than the number of programmers in the world right now, and that’s a good thing.
> Maybe have a nonprofit consortium that people fund
Fantastic idea. Are you doing it? Can you? Do you know where to start? And if you can’t, is that your fault? Should you be blamed for it? Are you an extortionist? Do you have gall for not doing it?
Re non profit, I do donate to a few nonprofits I like, like those working on fediverse and my favorite langs. But I don't know of anything that does this for extensions. I'd have definitely voted with money if something was there. So, yeah, no, I am not doing anything to start a nonprofit for extensions. You have a good point.
Thank you for the apology. Accepted.
> I do donate to a few nonprofits I like, like those working on fediverse and my favorite langs.
You already do more than most, and I commend you for it.
> So, yeah, no, I am not doing anything to start a nonprofit for extensions. You have a good point.
To clarify, the idea here was in no way to put you on the spot. Rather, what I’m saying is that none of us are doing so and that it’s not really fair to blame anyone for it. Most people don’t know how or don’t have the skills or inclination, and that’s understandable.
Because the alternative is UI/UX Designers and Visionary Managers insisting on keeping Flash and Java Applets and Microsoft Visual Silverlight .Net++ around forever, because you can't do some things in the browser and We Need To Do Them.
Some things have minimal complexity that either lives in the language itself or in libraries. The Web has minimal bells and whistles that are either implemented in the browsers itself or in plugins.
Nope we haven’t. At least not in a web application. At least not since the days Infinite Scrolling was invented. IIRC Twitter, for eg, only renders a partial list depending on the scroll position.
I once wrote a NER tagger, where implementing custom text selection allowed users to not stress about selecting the exact word boundaries when manually tagging 1000s of words per day.
I can probably find legitimate use cases for almost of these things in the list. While I agree with the broader theme of the article, this idea that the user agent should be a dumb display is not valid.
I mean, I'm all for for switching to Lua or smth (which is a slightly different anti-JS camp than yours), but the problem isn't in interactive (or even non-frozen) pages in general - it's in pages reading user actions that user doesn't expect/want to
I don't enjoy needing to "go back" 100 times, once for each page of the book just to return to f.e. search results I opened the book from
That's all there really is to it: Mosaic added image support. Investors got excited and asked if the images could animate, if they could record click data and credit card data, if they could add video and additional presentational elements. Holistic user experiences were secondary.
To move forward we have to accept that most of this wasn't an accident and it needs some breaking changes.
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.
Because on the modern web, the user is the content, sold to the highest bidder.
Unfortunately, it’s 1) difficult to reach consensus 2) difficult to broadcast and 3) difficult to enforce. For example, even when major browsers achieve 1) and (e.g. implement a standard component) 2) and 3) are still huge gaps.
Many eyes are supposed to make bugs shallow. In the webdev space, many eyes on something like React lead to numerous opinionated alternatives, each successful enough to warrant consideration. This doesn’t seem to be slowing down, either.
Meanwhile, vanilla HTML and DOM capabilities have never been stronger.
all providers only document their bloat-spyware-buggy javascript that creates a button and handles all in the client.
then using libraries you are open to attacks in one hundred ways because those implement all the unrealistic things in the spec (including overriding issuer and setting crypto to nothing, via attacker controlled fields). after two days of evaluating i just gave up and wrote my own, server side and handling the singular case everyone uses. 20 lines, which was less then adopting the libraries.
twitter and google and google maps and so many have rolled their own and they completely suck compared to just letting the browser render an img tag. They inevitably fail on some bad multitouch interaction that affects the web page, and the image viewer container. Or they add some slow-as-molasses zooming effect.
No, that's how you end up with a mountain of bad half-assed implementations. You should only roll your own when truly necessary, and only after thoroughly understanding the problem and the existing mature solutions and honestly comparing that against your own ideas to see if you're missing important aspects of the problem.
And even after doing all that, when it comes to implementing custom UI for something that already has a standard approach, you should still usually throw away your custom version because it won't be better by a wide enough margin to justify the effort users will need to invest in re-learning and breaking their existing habits.
Save your UI experimentation for your personal tools, and don't inflict it on innocent users.
agreed, that page decided they needed to write their own scrolling logic and it made the page horrible.
It’s a litmus test I use to see if someone actually glanced over what the AI generated.
A lean website can work just fine on complete trash connections like GPRS or Comcast without incremental loading. Web developers are not incentivized to make lean websites.
SPAs add unnecessary complexity -> increasing page weight -> making finer grained incremental loading more important -> requiring even more code. It's a self-induced problem.
As a corollary, McMaster Carr is often used as an example of a website that didn't fall into the SPA trap, and customers greatly benefit from that [1]. The front page weighs about 14 MB with all of the images, but the loading experience is great even with network throttling simulating a poor connection. There is a good reason the site has this reputation.
Overengineering is the true root of all evil. Web developers cannot learn that fast enough.
Fun fact, this was written shortly after one of the biggest linux vulnerabilities which was caused by a kernel crypto library, presumably to avoid userspaces rewriting their own crypto.
Whatever you do don't teach AI how to do this or there could be a flood of VPN's speaking new but not really new ciphers that code breaking farms won't know what to do with and ciphers that are not known to exist and yet nobody ever really rolled their own.
This concept was conceived whilst interacting with Rubix cube players.
Javascript in the browser was a mistake. And if we had to have it, the suitable scope of it was what we had around 2004.
Google invested tens of billions in it realizing they had a way of owning the browser space simply by making it insanely complex. Just hire all of the web standards people, tell them to go crazy and then also hire thousands of C++ browser developers for decades to implement everything. Boom, a moat!
There are too many words in that sentence. Here are the words that can be removed: "browser", "in" and "the".
You can do terrible things with JS but you can do great things too.
Let’s talk about the economics which permit bad webapps to continue in use. Illogical UI behaviors to be defended as “working as intended”. Or my favorite, UI redesign trend away from compact data dense UI towards open layouts with gobs of empty space (I guess it’s a touch UI compromise, because of “dashboards”). Or the financial incentives to remake the IP of excellent phone apps which end up looking and behaving worse. I suspect some must be tech debt, some reflect development job pool. But the rest? I blame MBAs
No. I don’t mind roll your own. I mind rolling your own crap and defending the indefensible.
However, scrollbars, context menus, modal windows, and date pickers are rendered within the extents of the web page, and get replaced all the time.
It is my opinion that these controls don't need to be styled to match the website, because they're not part of the website. They're part of the browser. Non-diegetic. Outside the fourth wall.
For those not trying to implement the dark patterns that enshittify the web.
If you don't roll your own back button behavior, you've missed the opportunity to show a few more ads.
If you don't make your window full screen on my shitty old tablet browser (yes, I'm looking at you, BBC), then it's far too easy for me to close your window. (Joke's on you, though -- my old Samsung tablet has a physical back button.)
* Don't roll your own standard controls
Seriously. Don't. You want a single-select box? Use a combo box or radio button group. Want an edit box? Use an edit box. Want a list that finds things as you type? That's in the standard too. Don't roll your own.
This "roll our own controls for everything" bothers me to no end as a screen reader user, because practically nobody properly follows ARIA best practices, and that leads to a less accessible internet.