Ian McNally

Ian McNally

Hey, I'm Ian. I build websites and write about what I learn as I go. Follow me on Twitter.

A tool for team rotations

January 17, 2020

The team I work on wanted to create a weekly rotation for people to facilitate meetings, so I made an automatic one on glitch! Check it out…

Copy to clipboard in Devtools

October 28, 2019

I found myself wanting to copy an object in Chrome’s devtools onto my clipboard today. Lo and behold, there’s an API for that: . Nice!

Branching off another branch in git

January 15, 2019

A git workflow problem recently surfaced on my team. We branched (let’s call it branch B) off a branch (branch A) to keep working before A…

Url search params in Javascript

September 23, 2018

I was looking for a way to get a URL parameter in Javascript , and came across Dave Walsh’s post on the URLSearchParams interface. When you…

Lessons learned building a UI library

January 24, 2018

I’m off boarding this week from my current job, and I wanted to write up the technical directions and learnings I’d acquired building the…

Flex values in IE11

December 18, 2017

Today I Learned:IE11 doesn’t handle values in the same way that newer browsers do. Normally the value is a shorthand for . But in IE1…

Feature support in browsers

December 06, 2017

If you find yourself needing to test feature support in browsers, Dive Into HTML5 has a complete list of checks you can run.In my case, can…

I was on a podcast

December 06, 2017

I was on a podcast about CSS recently, and the transcript just launched. Here are some edited (for clarity) excerpts of my answers:How is…

Fancy list numbering with CSS

November 09, 2017

It’s not every day that I’m styling a list like:My fancy numbered listBut today was. So I came across a wonderful piece on CSS Tricks that…

I'm on a podcast talking about css

October 31, 2017

Fresh off the podcast presses: I joined Stride’s Rabbit Hole to talk about css and contemporary approaches to using it in Javascript.The…

Link: practical flexibility in systems

October 30, 2017

Harry at CSS Wizardy writes (below) about building in safe guards to a system, versus excluding “forbidden” use cases. It resonated a lot…

CSS grid auto placement in IE11

October 19, 2017

I found out the hard way that IE11’s implementation of CSS Grid (the old spec) doesn’t support auto placement. It was the one feature my…

Knowing when an element is in view

October 17, 2017

I started working on a lazy image loading component today. There are several pre-existing solutions on the internet, but nothing I found…

Getting input values in a dynamic form

June 30, 2016

Today I was experimenting with how to get all the values in a form. The form was dynamic, so I didn’t know the input and textareas that…

Native form validation in browsers

May 26, 2016

Today I stumbled on the DOM APIs `document.forms`, which holds a collection of all the forms on a given page. You can access individual…

14 tips for better front end testing

May 20, 2016

Today Stride published a set of tips I put together for testing your front end code. I had some fun with it, by turning it into a Buzzfeed…

Repeating keys in vim on OSX

February 20, 2016

In vim, holding down a key can save you a lot of repeated effort. In newer versions of osx, holding down a key was disabled, to allow for a…

Deciding on new technologies

February 09, 2016

In my day to day as a software consultant, I often help evaluate new technologies (be it a framework, library, language). Over time, I…

Variables in npm scripts

February 04, 2016

Did you know you can have variables in your package.json? They can be very handy, especially when using npm scripts. Consider the following…

PhantomJS 2 in Travis CI

December 30, 2015

I was continuing work on my web boilerplate (note: now moved under the stride-nyc org) when I decided to add Travis CI integration for…

2016 web boilerplate

December 22, 2015

I was about to start a new side project, when I realized the crazy amount of setup I’d have to do to get up and running. I wanted to use my…

Migrating a legacy node project to Babel

November 25, 2015

I’m working on a node project that has a mix of legacy and new code. The new code is written in ES2015 (a.k.a. ES6). The legacy code is your…

Q&A on front end tech

October 22, 2015

Today, I participated in a live Q&A about front end technology. In it, I gave a 10 minute presentation on the evolution of javascript…

Friend with aspergers getting into tech

September 16, 2015

About five years ago, I made the switch from music to software. I was fortunate enough to land a great opportunity, which allowed me to…

Karma tests running twice on change

September 03, 2015

My current project’s been plagued with duplicate test runs on a single file change. We’re using webpack and karma, and it’s a documented…

My es lint configuration

August 22, 2015

I started using ESLint on a project recently. It took me some time to get over JSHint, but I’m really enjoying ESLint’s plugins, especially…

Event pooling in React

August 18, 2015

I’ve been writing a lookahead/autocomplete component in React, with a debounced onChange. I started to notice that my value changes would be…

Autocomplete in React

August 10, 2015

I was looking over some autocomplete/lookahead solutions, and I couldn’t find anything that could fit well into a React project.First off…

Image Carousel in React

July 30, 2015

I’ve been having some fun today planning out a carousel in React.One feature request was that any slide could be the next slide, and the…

React component change testing works!

July 22, 2015

Since I’ve been using React, there’s been a bug in TestUtils.Simulate.change. I don’t want to drag you down with the specifics of the bug…

Code reviewing CSS

July 06, 2015

Here’s a great list of dos while reviewing CSS, by Geoff at CSS Tricks.It boils down to:It worksStyle and consistencyCompatible on supported…

Celebrating equality on the web

June 26, 2015

I joined in the web development community’s celebration of the US ruling for marriage equality by adding a rainbow to Farely today…

Input validity in the HTML spec

June 25, 2015

Last night, while staving off insomnia, I started working on an enhancement to react-currency-masked-input.I wanted an empty input value (i…

Front end best practices

June 23, 2015

I recently did an Tech Talk with Stride on Front End Best Practices. This interview originally appeared Stride’s blog.When a new technology…

Choosing a javascript framework

June 03, 2015

I gave a talk recently on why a client might want to adopt a javascript framework. They were writing their own presentation layer, and were…

Currency masking in React

June 01, 2015

I just open sourced a currency masker for React!Check it out: An input that is getting masked (really, re-evaluated) as currency. It takes a…

Slick carousels

June 01, 2015

A Bill Murray carousel with Slick Came across a fantastic carousel library called Slick. It’s extremely flexible, comes with some helper…

Making BEM easier in Sass

May 26, 2015

I came across a great way to start writing BEM in Sass.Say you have the following markup:To make the full-width and the header text pink…

box-shadow for an overlay

May 21, 2015

Box shadow overlay exampleToday, I used box-shadow to create an overlay!Notice the lookahead list (bags, baby bags). It’s a .On that I put…

Testing input change in React

May 06, 2015

Today I was adding tests to Farely. I wanted to test that when you input a new value, it updates the state.According to React’s testing…

Animating drawers in CSS

April 30, 2015

I set about testing drawer sliding animations, hot off the heels of a browser rendering class.I put together a demo, where you can switch…

CSS Triggers...

April 22, 2015

CSS Triggers is a reference for CSS properties and what they trigger - paint, layout, composite.Transform and opacity are the best…

JSCS configuration file

April 13, 2015

JSCS is an awesome new style checker for Javascript. Plugins are available for all the major editors, IDEs and build tools (my faves…

Morphing placeholder

April 10, 2015

Morphing placeholder and input label Placeholders always leave you (when you start typing). Labels just don’t do enough on their own…

Testing API calls regardless of domains

April 09, 2015

To test an API call in Angular (with jasmine), you inject $httpBackend, having it expect a method & URL call, then verify there aren’t any…

Font sizing with rem - Snook.ca

April 06, 2015

Summarizing REMs for CSS units, and how to get your measure to convert nicely between pixels and REMs.tl;dr -1px is .1rem

PropertyUnits rule in SCSS Lint

April 06, 2015

Feeling proud about my latest open source contribution. This time, it’ to SCSS Lint.I added a rule that enforces the units used on element(s…

Equality of shallow javascript arrays

April 02, 2015

Today, I was working on a UI bit where you click on a modal to add or remove some items from a list. I wanted the modal to have a shallow…

bindToController in tests

March 26, 2015

In an Angular directive, you can use the property to set your $scope injections on the controller instance. It all works great, but things…

The Terrible Technical Interview

March 25, 2015

My favorite interviews are ones that aren’t traditional technical interviews. I could talk all day about projects I’ve built, and I’d be…

Angular providers

March 17, 2015

I got a taste of what it’s like to write a provider in Angular. The biggest reason to write one is to have a service configurable in a…

fatlinesofcode/ngDraggable

March 06, 2015

Really digging this drag and drop library, for Angular. Items snap back on an unsuccessful drops, and dragging items are properly in the…

Coming to React from Angular

March 05, 2015

Note: This article was originally published on Stride’s blog.My friends started using it, Stride clients started asking for it, and it’s…

Farely

February 26, 2015

Just released a new version of Farely, completely re-written in React!Source

Grid layouts in flex box

February 26, 2015

Some colleagues brought up layouts today. The team just started using flex box instead of Bootstrap’s grid (yey!), and someone mentioned…

ng-repeat list alias

February 26, 2015

In Angular, say you’ve got an ng-repeat, where you want to use the filtered list somewhere outside of the list, like:Note: this would not…

imcnally/react-es6-gulp-playground

February 14, 2015

I couldn’t find any good information on building a project with React and ES6 on the internet, so I built my own! I used gulp to compile…

Position:fixed and z-index

January 09, 2015

A Safari bug came my way recently. A progress bar with was hidden behind an element. I first tried to solve it with , but that wasn’t…

Tooltips with templates

December 17, 2014

I’m working on an Angular project that uses Angular UI Bootstrap, and I wanted to improve the experience of the using the directive. To…

Redacted text with React

December 14, 2014

My humble beginnings with React, featuring something like redacted text.Generally, I find React odd. You have to directly inject HTML into…

type your buttons

December 10, 2014

Today I learned the hard way to put types on my buttons. On a form, I had a cancel buttonWhich was accidentally being submitted on pressing…

Browser window with Polymer

November 22, 2014

I wrote a faux browser window, using Polymer to make it a reusable component.Pretty neat, huh?

Responsible Responsive Design

November 19, 2014

Scott Jehl just released a book on responsive design that I’ve been eagerly anticipating for a while!

Float everything!

November 03, 2014

Today I learned that if you want a fluid layout and you can’t use flex box, float everything!When all your elements are floated left, you…

Testing deferred objects in Angular

October 29, 2014

Consider the two code blocks below. They’re unit testing an asynchronous function , that returns an initial promise, to be resolved at a…

Xcode for Yosemite

October 19, 2014

A little tip from homebrew to me, to you:Xcode 6.1 is required on Yosemite to compile anything (6.0.1 does not include the 10.10 SDK). Apple…

ES6 Angular

October 17, 2014

After reading that CodePen supported traceur, the ES6 compiler, I set out to demo ES6 classes in Angular controllers. Worked like a charm.

A silent web

October 09, 2014

The loss of audio on the web. I’m not sold on sound on interfaces in general, but I’d like to see an audio renaissance.

Sanitizing HTML in Angular

October 07, 2014

If your Angular app is pulling down a string of HTML to display, and you want to use it as a model:Then use angular-sanitize. It’ll clean up…

<a> in Angular

September 29, 2014

Today, I was working on making a Rails & Angular project HTML 5 URL compatible. I arrived at a snag, where my anchor tags weren’t causing a…

Upgrading bash

September 25, 2014

FYI: there’s a security flaw in bash and you should use this answer to check and/or upgrade it.

The Manual Everywhere

September 11, 2014

The Manual publishes research, personal, long-looking articles on the web and web design. They’ve released their work free of charge, and if…

imcnally/keypress-click

September 03, 2014

Just released the first version of an Angular directive to perform clicks on keypress.Could it be any simpler?Available on bower: keypress…

SASS @extends for icon fonts

August 20, 2014

In a project, I use icon fonts, generated from SVGs, for icons instead of images. So, for a down arrow, I can do something like this:And get…

Flexplorer

August 15, 2014

An interactive flex box guide

Git push to a different remote branch

August 08, 2014

If you want to push a local branch to a differently named remote branch:i.e., if I wanted to push my local branch named to I would:Props

transition syntax

August 06, 2014

I use Dash, and it’s great. But you know what doc is wrong? The CSS transition one! It’s pulled from the Mozilla docs, and it’s not up to…

My advice for Angular and SASS

August 01, 2014

On a recent project, I was coming up with a style guide. I included these as tips, since they’re really just a collection of best practices…

A centered modal with a backdrop

July 31, 2014

If you want a centered modal with a backdrop, your markup should look like:And your style looks like:The relation between top, left, and…

Modals in Angular

July 31, 2014

If you find yourself needing a modal library in your Angular app, check out btford’s angular-modal. It’s got a great API and has a lot of…

SASS Invalid US-ASCII character

July 28, 2014

Yikes! Today, I was getting a SASS error:For using:At the top of where I used it (_toggle.sass), I added:And compilation is working again…

Compound media queries

July 26, 2014

Today I learned you can make compound media queries, say if you wanted to make a full height when the screen is both tall and wide enough…

Partial object matching

July 24, 2014

Oh UnderscoreJS, you’ve done it again. I was looking to test partial matching from objects, i.e.,Is in Turns out with you can do:From the…

Resizable column with flexbox

July 23, 2014

I’ve been using Flexbox extensively on a new project, and I wanted to make a resizable column. I started with the jQuery UI’s resizable, and…

Grunt environment configurations

July 21, 2014

The plugins for grunt environment configurations aren’t great for what I wanted to do. It had to do two things for me:Expose environment…

nameit

July 16, 2014

If you’re stuck naming a project, module, etc., etc., check out nameit. It’s a random name generator with the right balance of silly and…

Design for the Real World

July 09, 2014

I’m really excited to receive my copy of Design of the Real World by Victor Papanek.Mike Monteiro talked about Papanek’s philosophy at An…

Chrome dev tool$

July 07, 2014

Ain’t this nifty. In chrome developer tools, and are aliases for and , respectively.Props.

Reading about Swift

June 29, 2014

The more I read about Swift, Apple’s new programming language, the more excited I get about it. It takes some heavy cues from Javascript…

Simple. Friendly. Smart.

June 27, 2014

oscarhealth:simple friendly smartOscar Head of Product Eddie Segel outlines the strategies we’ve deployed to deliver a unique brand of…

My git workflow

June 23, 2014

When starting a story, bug fix, etc., create a branch of master:Make small, incremental commits on your topic branch, i.e.:Rebase master…

Absolute control is relative

June 19, 2014

Pro-tip from CSS tricks:A page element with relative positioning gives you the control to absolutely position children elements inside of it…

Vertical width

June 12, 2014

Today I used the CSS viewport unit vw to scale the size of a header’s text based on window size:Isn’t that great? It saved me a bunch of…

Alfred workflows

June 11, 2014

A great repository of Alfred workflows for developers.

Sleep display from the command line

June 11, 2014

I like putting my display to sleep when I walk away from the computer. It saves energy, prompts for a password on return and is faster than…

Subclasses in Javascript

June 10, 2014

If you aren’t spoiled by Coffeescript or a framework like Backbone, subclassing in Javascript isn’t straight forward. Check this out:

Angular Promises 0.2.0

June 06, 2014

I’ve just updated my library for deferred objects in Angular. Now you can wait for all your asynchronous tasks to be complete before…

New Coffeelint rules

June 06, 2014

I checked out the latest version of CoffeeLint today, and was excited for some of the new rules, including:No unnecessary double quotesNo…

--rebase

May 30, 2014

I helped a co-worker resolve a botched git rebase today. My advice for it was as follows:If you’ve got a topic branch you’ve already merged…

Bye Bye, Passwords

May 29, 2014

Shop It To Me successfully removed password. I think they read my mind.

box-sizing: border-box

May 28, 2014

A good tip for keeping your div sizing sane is to set all elements box-sizing to border-box.

Vertical rhythm generator

May 28, 2014

Establishing a vertical rhythm in CSS is one of the first things I do for a project. Drewish made a great generator to make it quick and…

Disabling file drag to upload in IE9

May 22, 2014

On the project I’m working on, the worst browser we have to support is IE9. It’s not a bad problem to have since there are worse. Still, we…

Modernizr in Angular templates

May 22, 2014

Want to use Modernizr in your templates? It’s pretty handy:Attach Modernizr to $rootScope:And you’re good to go.

A part of everything

May 21, 2014

I’ve spent the last year or two specializing in front end development. Apart from being the most rewarding and creative outlet for…

ID selectors are so yesterday

May 21, 2014

I’ve got no use for ID selectors anymore. They’re too specific, not reusable, and dare I say — ugly. Pseudo selectors substitute rather…

$window.open

May 21, 2014

If you’re doing a $window.open in Angular and getting the error:Turns out you might be returning your $window.open call (especially if you…

Get that div all the way down

May 20, 2014

Say your want a div (i.e., .container) to extend all the way down the page, until about 20px before the bottom. Check it out:Demo here.

Vertical alignment

May 19, 2014

Vertical alignment in CSS is as obtuse as its reputation suggests. I’m a huge fan of Flexbox, and I’m excited that it’s in the latest round…

Finding files fast in OS X

May 18, 2014

If you’re using the command to search for files via the command line on OS X, might I suggest ?Your normal search:takes 1.872 secondsWhere…

Making it easy

May 18, 2014

The other day I received the best compliment I could receive as a software developer:“Ian made it really easy to [modify some code]”Because…

dragleave

May 14, 2014

I had an element that was listening for and . Turns out would be fired even if you hadn’t left the element. When a drag reached the…

TIL $injector

May 12, 2014

I’d been programmatically injecting dependencies in an angular app by creating a new injector instance:But it turns out you can inject…

'defaultPrevented' of undefined

May 07, 2014

Stuck on this today, with Angular:Turns out someone had an errant jasmine spy on $rootScope.$broadcast. Just put on the spy, and bam…

RIP Nav arrow

May 07, 2014

Before I lay this piece of code to rest, an arrow around the current navigation selection, here it is:

<li> inline-block margin

May 06, 2014

I noticed a funny thing the other day.If you set a group of elements to , you get an awkward 4px-or-so margin on either side. The best…

My Gitlab

April 26, 2014

Just moved all my projects from Github to Gitlab.com and never looking back!

Guess who's back

April 24, 2014

After brief forays into both self-made portfolio and open source blogging platforms, I’m back to tumblr with a vengeance. Sadly, I’ve lost…