Tuesday, December 24
Web Tricks

8 Effective Design Tips for Offline Applications

With the seeming massive adoption of web applications, design systems to support this adoption get better. While the internet is abound in certain areas, connectivity could be limited or non-existent in other areas or cases, this notion has influenced the design of applications on both web and mobile platforms. Poor connectivity influenced the development and speedy adoption of progressive web applications. Progressive web apps are applications which look and function like mobile applications. Caching techniques, service workers, manifest files and design are certain elements considered when designing for offline applications. In this post, we shall be discussing 8 tips for effective design of applications required to function offline. Application States All digital products (for the most ...
Vue + TypeScript: A Match Made in Your Code Editor
CSS Tricks

Vue + TypeScript: A Match Made in Your Code Editor

Vue is so hot right now and I’ve been thinking of doing a serious project with it since quite a while, so when the opportunity popped up, I hopped in. But there was a little problem — one of the requirements of the project was to write it in TypeScript. At first, I was super stressed about how I was going to ever get started on this combo, but vue-cli made it so easy. I’d be lying if I said this ride was super smooth. There were frustrations, hours of staring at the screen and some fistbumps with my table but after working with Vue + TypeScript for over a month now, I can say it was worth it — and if I had to code another app with Vue, I wouldn’t do it without TypeScript. Prerequisites This article is about pairing Vue and TypeScript and assumes some basic knowledge of both. If you haven’...
GoDaddy Changes its Logo (Again), Loses its Daddy
Web Tricks

GoDaddy Changes its Logo (Again), Loses its Daddy

Once upon a time in the long lost world of the 1997 (more or less), a little boy was growing up watching Hercules: the Legendary Journeys, and Xena: Warrior Princess on the weekends. He got a Hotmail account because all of his siblings had one; but he didn’t really know anyone else who had email. Still, the spark was struck, and his interest in the Internet was born. Around the same time, GoDaddy was born; born into a world of wondrous possibility, creativity, and hope for a technocratic utopia that we were all sure would be made possible by the Internet. Well, that didn’t work out so well, but GoDaddy, at least, would go on to become the largest ICANN-approved domain registrar by 2005, and was the first place that little boy ever bought a domain name. In that time, it was common for Inte...
Web Tricks

Everything You Need To Know About Transactional Email But Didn’t Know To Ask

Everything You Need To Know About Transactional Email But Didn’t Know To AskEverything You Need To Know About Transactional Email But Didn’t Know To Ask Garrett Dimon 2018-06-27T12:30:49+02:00 2018-07-10T16:18:00+00:00 Any application with user-authentication can’t exist without email, yet, email doesn’t always get the attention it deserves. With modern email service providers, it’s easier than ever to create a first-class transactional email experience for your users, but, for most of us, the challenge lies in the fact that you don’t know what you don’t know. We’re going to dive into an end-to-end analysis of everything you need to bring your transactional ema...
CSS Tricks

Better rendering for variable fonts

I was messing around with a variable font the other day and noticed this weird rendering issue in the latest version of Chrome where certain parts of letterforms were clipping into each other in a really weird way. Thankfully, though, Stephen Nixon has come to the rescue with a temporary hack to fix the issue which using a text-shadow on the text that’s using the variable font: .variable-font { text-shadow: 0 0 0 #000; /* text color goes last here */ } Once you do that, you shouldn’t be able to see those weird clip marks in the letterforms anymore. Yeah, it feels pretty hacky but I’m sure this rendering bug will be fixed relatively soon. It doesn’t look like it affects other browsers, as far as I can tell. Direct Link to Article — PermalinkThe post Better rendering for variable fonts ap...
Web Tricks

How to use Error Boundaries in React 16

Have you seen these in your console? Cannot read property ‘getHostNode’ of null ? TypeError: Cannot read property ‘_currentElement’ of null ? If you maintain a React application, you know that this class of error messages can be among the most frustrating and difficult to resolve. Typical symptoms include stack traces that thread through dark regions of the React internals, devoid of hope or references to even a single line of your own code: TypeError: Cannot read property 'getHostNode' of null ? at getHostNode(~/react/lib/ReactReconciler.js:64:0) at getHostNode(~/react/lib/ReactCompositeComponent.js:383:0) ? at getHostNode(~/react/lib/ReactReconciler.js:64:0) at getHostNode(~/react/lib/ReactChildReconciler.js:114:0)? at updateChildren(~/react/lib/ReactMultiChild.js:215:0) at _...
Server-side Optimization with Nginx and pm-static
PHP

Server-side Optimization with Nginx and pm-static

This article is part of a series on building a sample application --- a multi-image gallery blog --- for performance benchmarking and optimizations. (View the repo here.) Let's continue optimizing our app. We're starting with on-the-fly thumbnail generation that takes 28 seconds per request, depending on the platform running your demo app (in my case it was a slow filesystem integration between host OS and Vagrant), and bring it down to a pretty acceptable 0.7 seconds. Admittedly, this 28 seconds should only happen on initial load. After the tuning, we were able to achieve production-ready times: Troubleshooting It is assumed that you've gone through the bootstrapping process and have the app running on your machine --- either virtual or real. Note: if you're hosting the Homestead Improv...
Web Tricks

5 Most Common Dropdown Use Cases Solved with React Downshift

Downshift is a library that helps you build simple, flexible, WAI-ARIA compliant enhanced input React components. Its major use case is for building autocomplete components but it can also be used to build dropdown components. In this post, we’ll walk through some common use cases solved with Downshift. Prerequisites To follow this tutorial, you need Node and NPM installed on your machine. A basic understanding of React will help you get the most out of this tutorial. If you don’t have Node.js installed, go to the Node website and install the recommended version for your operating system. Setting up the application We’ll make use of Create React App to create a simple React app with no build configuration. If you don’t have Create React App installed, run npm i create-react-app in your ter...
Handling Errors with Error Boundary
CSS Tricks

Handling Errors with Error Boundary

Thinking and building in React involves approaching application design in chunks, or components. Each part of your application that performs an action can and should be treated as a component. In fact, React is component-based and, as Tomas Eglinkas recently wrote, we should leverage that concept and err on the side of splitting any large chunking into smaller components. Splitting inevitably introduces component hierarchies, which are good because they bloated components and architecture. However, things can begin to get complicated when an error occurs in a child component. What happens when the whole application crashes?! Seriously, React, why do the parent and sibling components have to pay for the sins of another component? Why? Error Boundaries React 16 came with a lot of goodies, o...
CSS Tricks

​Add real-time comments to a Gatsby blog

(This is a sponsored post.)This tutorial will show you how to add realtime comments to a Gatsby blog. You will use Node and Express to create a simple backend, allowing users to add and view comments instantly. Direct Link to Article — PermalinkThe post ​Add real-time comments to a Gatsby blog appeared first on CSS-Tricks. Source: CSS-tricks.com
How To Get To Know Your Users
Web Tricks

How To Get To Know Your Users

How To Get To Know Your UsersHow To Get To Know Your Users Lyndon Cerejo 2018-06-26T13:50:41+02:00 2018-07-10T16:18:00+00:00 (This article is kindly sponsored by Adobe.) Users are at the heart of User-Centered Design (UCD), with designers focusing on actual users and their needs throughout the design process. The goal is to design interfaces and products that work for those users. As much as we would like to think that our users are like us, they are not. Anyone involved in the creation of a product or an interactive experience, be it a site, system, or an app, is not a typical user — and that includes all the business stakeholders, designers, and developers. ...
How To Design The Perfect Gradient
Web Tricks

How To Design The Perfect Gradient

When you work for a user experience design company for as long as I have, you start to notice the cyclical nature of industry trends. Just like fashion or art, what goes out of style inevitably resurfaces a few years down the road, only to become adopted by the mainstream, and fade into obsoletion once again. In the digital design world, there’s maybe no better example of this than the rise and fall (and rise) of the gradient. Considered a lynchpin of interface design in the nineties (how many geocities sites had a gradient WordArt header?), the trend likely dates back even farther. Consider this iconic logo: ‘Back To The Future’ is a fitting example for a design trend that has just recently resurfaced today, perhaps most notably in Instagram’s logo redesign in 2016 and Spotify’s dual to...
Using Background Processing to Speed Up Page Load Times
PHP

Using Background Processing to Speed Up Page Load Times

This article is part of a series on building a sample application --- a multi-image gallery blog --- for performance benchmarking and optimizations. (View the repo here.) In a previous article, we've added on-demand image resizing. Images are resized on the first request and cached for later use. By doing this, we've added some overhead to the first load; the system has to render thumbnails on the fly and is "blocking" the first user's page render until image rendering is done. The optimized approach would be to render thumbnails after a gallery is created. You may be thinking, "Okay, but we'll then block the user who is creating the gallery?" Not only would it be a bad user experience, but it also isn't a scalable solution. The user would get confused about long loading times or, even wor...
CSS Tricks

Resilient, Declarative, Contextual

Keith J. Grant: I want to look at three key characteristics of CSS that set it apart from conventional programming languages: it’s resilient; it’s declarative; and it’s contextual. Understanding these aspects of the language, I think, is key to becoming proficient in CSS. Like HTML, unknown or slightly broken CSS doesn't stop a site in its tracks. You write something you want to happen in CSS, it happens, and a bunch of related things may happen to. I like Keith's example with font-size. Increase it, and the container will also grow in height without you having to tell it to. You can't understand what CSS is going to do without understanding the DOM structure it is paired with and the other styles at play. And it’s my suspicion that developers who embrace these things, and have fully inter...
Web Tricks

Debugging Node Code in VS Code

Visual Studio Code has an amazing amount of functionality built in, including support for debugging applications. Although the functionality is there, it took me several tries to figure out how to get things configured to debug Node applications. It became even more tricky when using Nodemon, so I figured it was worth it to share the various configurations I've learned. This article will not dive deep into inspecting variables, call stack, etc. but will focus more on the actual configurations. If you are looking for an article more focused on applied debuggging concepts, check out Debugging JavaScript in Chrome and Visual Studio Code. Watch on YouTube TLDR - Debugging Node in Visual Studio Code Download Debugger for Chrome extension Create Debug configuration from one of the 4 below Launc...