←back to thread

Just use a button

(gomakethings.com)
284 points moebrowne | 1 comments | | HN request time: 0s | source
Show context
Sohcahtoa82 ◴[] No.45775972[source]
tbh, I've started to grow a disdain for front-end developers. It seems their favorite pastime is re-inventing the wheel, and every single time, they destroy something while gaining absolutely nothing.

Stop implementing date pickers when <input type="date"> exists.

Stop implementing smooth scrolling. Browsers already do it on their own, and your implementation will not work. Really, just don't mess with scrolling in general. Don't make scrolling have "momentum". Don't change scroll speed. One site I've been to goes out of its way to change how much a scroll wheel click scrolls the page. For fuck's sake, can someone explain to me why that would be a feature!? Why go out of your way to override a specific user preference!?

All this bullshit changes expected behaviors, reduces accessibility, reduces the performance of your web page (and therefore increases CPU and battery usage)...for no reason whatsoever.

replies(2): >>45776228 #>>45776410 #
al_borland ◴[] No.45776228[source]
> Stop implementing date pickers when <input type="date"> exists.

This still has issues in some browsers. With sites already having other methods from before this existed, there isn’t a good reason to move to it, when they’ll need the custom version for browsers that lack full support.

This is the issue with a lot of newer features.

replies(1): >>45776820 #
Sohcahtoa82 ◴[] No.45776820[source]
> This still has issues in some browsers.

Your knowledge is out of date. <input type="date"> been implemented in nearly every browser since 2018, with the exception of Safari which was slow and didn't put it in until 2021, and Opera Mini which still doesn't have it at all, but who the hell uses Opera Mini?

https://caniuse.com/input-datetime

replies(1): >>45779447 #
1. al_borland ◴[] No.45779447{3}[source]
Safari and Firefox still show partial support. The features that are lacking may or may not be relevant for a particular use case.

I also can’t count on all my users to have the latest version of the browser, and don’t enjoy people messaging me telling my stuff doesn’t work.