WDRL — Edition 254: Better To Top Buttons, Competing in Jobs, Houdini And Accomplishing More.
Publikováno: 18.1.2019
Hey,
What’s better to start the new year with new experiments? Today I figured it was time to rethink JavaScript tooling in one of my projects. And since we wrote everything in plain ECMAScript modules already, I thought it would be easy to serve them natively now and remove all the build and transpilation steps. Until I realized that although most code was written by ourselves, we have a couple of third-party dependencies in there and, of course, not all of them are ECMAScript modules. So for now I have to give up my plans to remove all the build steps and still have to bundle and transpile things but I’ll try to figure out a better solution to modernize and simplify our tooling setup while providing a smaller bundle to our users.
And just a few weeks ago I had to build a simple “go to top of the page” button for a website and while I used requestAnimationFrame and similar stuff to optimize Event handling, today I found a way nicer and more efficient solution that uses IntersectionObserver to toggle the button on the viewport. You will find that article in the JavaScript section of the letter today but I wanted to share these stories as I believe it’s most important to review all our own habits and current solutions and see whether there are better, newer, simpler ideas that improve a product. Keep playing, keep researching, rethink existing systems from time to time.
Web Performance
- Jack Lenox sums up how performance of websites heavily affects our planet’s climate and what we can easily do to improve performance on websites and which impact this has beyond a faster load time for your visitors.
JavaScript
- How do we provide a back to top button? Well… here’s a new one including a very performance-oriented, efficient way by using an Intersection Observer to show and hide the button in the interface.
- Ackermann Yuriy describes in a long but extensive article how we can use FIDO2 and the Web Authentication API for logging in users without passwords.
CSS
- Fresh in, Chris Coyier collected a 2019 CSS Wishlist with many useful features, selectors, properties and values that we still miss in CSS. And as Chris mentions at the beginning of the article, a lot of these things aren’t particularly new requests. Instead, developers have been asking for them since years and even I could trace a couple of things in the list that I tried to discuss at browser vendor level, at WHATWG or W3C CSSWG level years ago. I hope that we will get many of these requests built into CSS and that browser vendors stop focusing on the countless JavaScript APIs for just a small moment and try to implement one of these CSS features instead.
- Una Kravets wrote a great piece on using Houdini and the Paint API for CSS by the example of a customized text-decoration underline style that usually wouldn’t be available in normal CSS but via this new API we can add such custom styling on our own.
Work & Life
- Lisa Evans on the importance of reframing reality each day. Beating up on yourself because you think you could have accomplished more can dent your confidence and self-esteem and leave you feeling depleted at the end of the day and she shares what we can do to avoid falling into that trap.
- Itamar Turner-Trauring shares thoughts on how to get a job with a good work-life balance when you’re competing against people willing to work long hours.
- Is it a good idea to provide digital healthcare, treatment, based on digital products like apps? And if so, what are the requirements, the standards for this? How can we ensure this is done ethically correct? How do we set the limits, the privacy boundaries, how far do we allow companies to go with experiments here? Would personalized content be fine? Is it okay to share data collected from our devices with healthcare providers or insurances? These are questions we will have to ask ourselves, these are the challenges that we should all have an individual answer for.
Go beyond…
- There are words, and then there are words. Many of us know how harmful “just” can be as a word, how prescriptive, how passively aggressive it is. Tobias Tom challenges whether “should” is a useful word by examining the implicits and the results of using it in our daily language. Why “should” can harmful to you and what you want to achieve.
- “We all know what we stand for. The trick is to state our values clearly — and to stand by them,” says Ben Werdmuller and how important it is to think about your very own red line, where you find it unacceptable to go further, to do something, regardless of external pressure you might face or money you would get for it.
—Anselm