Introducing a new view for likes on mobile web!
Toggle it on in the top right corner of the “Likes” page.
See more posts like this on Tumblr
#computer #squares #grids #rows #etcIf you’re an avid user of Tumblr on mobile web, then you might’ve noticed some improvements we made. Bigger font sizes and higher contrast text? Your screen reader actually reads what you hope it would? You’ve guessed it, we’re making Tumblr ✨accessible✨.
Since we’re rewriting the web, we wanted to make sure we did so with accessibility in mind. I could give you a long description why, but plenty of articles explain better than I can. Put simply: the web should be made useable for everyone.
We began with using the accessibility auditing tool in Google Lighthouse to check the improvements that could be made. Initially, our score wasn’t that great: 62. If you factored in areas that need to be manually checked then our score would have been abysmal. However, we’ve made great strides since then and are on our way to achieving that coveted 💯
We had inaccessible menus and poorly described elements, among other things. Using a tool like VoiceOver or TalkBalk you can see what experiencing Tumblr on mobile web with a screen reader was like. Here’s a gif showing what the mobile web experience on Tumblr was like prior to the changes.
Some of the more noticeable improvements we made were introducing design changes to increase readability and making improvements following WAI-ARIA guidelines. We’ll walk through a few other changes we made using React.
Visual order on the page follows DOM order
One of the larger changes we made was to revamp modals and popovers (e.g., the post activity screen). Originally we used React Portals but it isn’t always the most friendly for accessibility. Ideally you want to have elements appear in logical DOM order and Portals provides a way to circumvent that. So, no more Portals!
The user’s focus is directed to new content added to the page
Next step was to provide a way to manage focus. We want to a) direct focus to the modal when it’s opened and b) return focus to the element that opened the fullscreen modal. Using React’s lifecycle methods and refs, this is simple enough to implement. In your modal component:
public targetEl: HTMLElement; // The element used to open the modal
public buttonEl: HTMLElement;
public componentDidMount() {
// We add an event listener to get the element that opened the modal
document.addEventListener(‘focus’, this.setOriginalTargetEl, true);
// We set focus to some element inside your modal
this.buttonEl.focus();
}
public componentWillUnmount() {
// Return focus to the element that opened the modal
if (this.targetEl) {
this.targetEl.focus();
}
}
public setOriginalTargetEl = event => {
// Only set it once to get the initial target
if (!this.targetEl) {
this.targetEl = event.relatedTarget;
document.removeEventListener('focus’, this.setOriginalTargetEl, true);
}
};
public render() {
return (
<div>
<button ref={(el) => this.buttonEl = el}>
Back
</button>
<div>Your content</div>
</div>
);
}
This can make navigation a lot easier.
Of course, we’re still fine-tuning different elements of the site since accessibility is more than just a number. A lot of these changes will be even more noticeable when the new Tumblr dashboard comes to your desktop. There’s still more to come, so keep your eyes open!
Think there’s a way to make Tumblr more accessible? Hit us up at tumblr.com/jobs and come work with us!
- Nora Mohamed / @nomo
We rebuilt another piece of the site with React
A few months ago my colleague Robbie wrote a post about how the Core Web team is introducing a new web stack built on Docker, Node, and React. It is a beautiful vision, but we had only launched one tiny page on that infrastructure. This spring, we used that new stack to rebuild the mobile web dashboard from the ground up. And then we launched it.
We decided on building the mobile dashboard next for a few reasons. First, the dashboard is one of the most important parts of Tumblr—for many people it is their primary window into the content here. Because of that, most things that we develop inevitably touch the dashboard. It was time to raise the stakes.
The desktop dashboard and the mobile apps have been moving forward at a blistering pace, but have you seen the mobile web dashboard? It was stuck in 2015. Nobody ever made features for it because it was a completely separate codebase. We avoided that issue with the rewrite. Since the new version we’re building is responsive, our new mobile web dashboard will eventually also power the desktop web dashboard experience. This’ll make it much easier to maintain feature parity between the desktop and mobile web experiences.
Finally, we wanted to make something a little bit more complex than the image page, and the mobile web dashboard seemed like a good next step. It allowed us to start making authenticated API calls and figuring out how to pass cookies through our new server to and from our API; to think about laying the groundwork for a totally responsive dashboard, so we can eventually launch this for the desktop; to make a testing ground for progressive web app features like web app manifests; to start rendering posts that are backed by the new post format; and to figure out how to slowly roll out the new stack to a consistent, small set of users. We also had a pretty bad performance bug and learned a whole lot about profiling Node. (We plan on writing more in-depth posts about some of these topics soon.)
And the rewrite turned out really well. Even with more features like pull-to-refresh, a new activity popover, and modern audio and video players, we sped up our DOM content loaded time by 35%! The new page has a lot of modern web standards in it too like srcsets, flexbox, asynchronous bundle loading, and a web app manifest. You can install the mobile web dashboard as a standalone app now. It was also way faster and simpler to write using React than it was on our old PHP/Backbone stack.
We’re really proud of the new mobile web dashboard. We look forward to bringing even more new features to it in the near future, and launching even more pages on our new web infrastructure.
If you think this is cool too, come work with us!
– Paul Rehkugler (@blistering-pree)
Hi! You may have noticed recently that blog archives look a little different. Spruced up a bit: smoother, faster, fancier. Squarer! You can mix and match filters in a way you never could before. Go ahead! Pick a month and a post type. You deserve it!
You can even filter the archive by tag now.
It’s pretty good! And it’s all possible because the archive has joined the honored ranks of pages running on our new web stack, just like the mobile web dashboard.
And we’re not stopping here! As Tina Turner once said, big wheel keep on turnin’. Come be a part of that wheel.
- Robbie Dawson (@idiot)
Naturally, the heaviest strain on the network comes from the content - filled with heavy gifs and other content. However, we also load embarrassingly large amounts of JavaScript. There is one particularly heavy JavaScript file that contains our vendor libraries (e.g., jQuery, Backbone, etc), which we call the vendor bundle.
It was loaded right on the top of the page, significantly adding to the critical rendering path. But we don’t need it there, being one of the first things user loads. Moving the vendor bundle down the page might result in performance gains and a more responsive page load time - all are great goals that Tumblr’s Core Web team is set on accomplishing.
After a few months of patching ancient, legacy inline scripts, and running performance tests, the script is finally moved to the bottom of the page! Even more, with this effort we decided to really dig into performance - we conducted A/B testing of that move (establishing performance split testing framework along the way) to see what exactly what effect the move would have on our site’s performance.
Starry eyed and excited to see improvements across the board (that file exists on nearly every page of tumblr, after all) we jumped head on into the data to find ourselves amused and slightly disappointed.
Turns out, the performance gains that we expected to see from moving a heavy file out of a critical rendering path were not there. The 75th percentile of page load times across the board remained the same. We suspected that analyzing on a more granular would reveal performance gains on certain pages or even certain browsers - but results were pretty uniform. See for yourself - below are boxplots for performance on the dashboard:
Was our approach to taking measurements incorrect? We revisited numbers again and again. We looked into finer detail at various pages. We excluded IE9 after hypothesizing that it might skewing our results. We measured across several metrics that we had at our disposal (we sample actual navigation timings from actual users). Results remained the same.
As much as we were disappointed, we were also glad that we ended up knowing precisely what effect we had on the performance. Oftentimes we take blind faith that best practices will lead to best results, and fail to realize that myriads of factors weigh in on actual outcomes.
If anything - we learned a lot from this experience. We gained better insight into our codebase and established an approach to measuring performance in future experiments!
Hi there! Your friendly neighborhood Tumblr web developer here. You may have recently noticed that we’re making some changes around the site. Some of you might have even gotten the chance to play around with a beta version of our site on desktop. We may be biased, but we think it’s pretty neat!
However, we know that a lot of you don’t just use Tumblr—especially on your non-mobile devices. You use Tumblr and something. Tumblr and XKit, Tumblr and Tumblr Savior, Tumblr and all kinds of things, all of them made and maintained by passionate Tumblr users. We don’t want that to go away when we roll out the new changes to everybody.
We’ll be rolling out these changes within the next couple of months, aiming to be fully out by the end of March. So, consider this an olive branch–we don’t want this to surprise anyone, and we want to help everyone be ready.
Some of you are already digging into the beta site, poking at its gears, and trying to make it play along nicely with browser extensions. We want to make that at least somewhat easier. We’ve already built in one hook that lets you access consistent and meaningful CSS class names. Hopefully, that’s enough to enable some DOM manipulation and restyling. You can take a look at some documentation for it here.
It might not be enough for everything, though. If it’s not, we want to know. You can let us know via this very blog if you wish. Or drop by our docs on Github and leave an issue. We can’t make any guarantees, except that we’re listening.
All the best,
The Core Web Team @ Tumblr
In the ten years that Tumblr’s been around, a lot has changed in web technology. We’ve kept up, of course, but it’s always been a process of addition, layering one new technology on top of another. And what we were working with—a custom framework built on top of Backbone, messily entangled with a PHP backend and its associated templates—was becoming unmanageable. Our piecemeal conversions to new technologies meant we had thousands of ways posts were rendered (only a moderate exaggeration). And each of those had to be updated individually to support new features or design changes.
It was time to step back, survey the world of web technology, and clean house in a big way. That we could finally test some of the new tech we’ve been itching to use was just a little bonus.
We started by laying out our goals:
With those goals in mind, we spent the beginning of the year on research - figuring out what kinds of things people were building web apps with these days, tooling around with them ourselves, and trying to assess if they would be right for Tumblr. We landed, eventually, on React, with a Node server (running Express) to make isomorphism as easy as possible. On top of that, we’re using Cosmos for developing components, React Router for routing, and TypeScript to make our lives better in general. (My colleague Paul already wrote about what went into our decision to use TypeScript here.)
As if writing an entirely new stack wasn’t enough, we realized along the way that this was our perfect chance to start deploying containerized applications with Kubernetes, a first for Tumblr. We had never previously deployed a node application to production here, and didn’t have the infrastructure for it, so it was a perfect green field on which to build another new and exciting thing. There’ll be more to come later on Kubernetes.
So where are we now? Well, we’ve launched one page powered by this new app - image pages, like this - with more to come very soon.
Though it may seem simple, there’s a whole new technological world between you clicking that link and seeing that page. There’s a ton more exciting stuff happening now and still to happen in the future, and we’re looking forward to sharing it here. Wanna get in on the action yourself? Come work with us: https://www.tumblr.com/jobs.
- Robbie Dawson / @idiot
Over the past couple of weeks, we have slowly rolled out a spiffy new version of Tumblr on the web. Here’s a smattering of goodies in the update:
Some of these visual changes are obvious, but the biggest transformation is the one you can’t see. This wasn’t just a facelift, we completely updated the web interface. The old one was outdated—over a decade old. Adding features to it wasn’t always easy, fixing bugs wasn’t always quick. It was clear that we needed to update the whole dang thing. So update the whole dang thing we did. The result? A faster Tumblr. The experience is smoother, it’s easier to add new features, and we’re able to squash any pesky bugs quicker than before.
This kind of web interface change means that some of your Tumblr browser extensions may not work. We understand how important these extensions are to those of you who want to customize your Tumblr experience as much as possible. Throughout this process, we’ve stayed in close communication with the people over at @new-xkit-extension to make sure our update was one that they could work with. We provided them with APIs they needed to begin moving over to this new platform. This also gave us the opportunity to discuss the benefits their extension brings to the community. Having their input on what makes their service valuable to the people who use it has been a true treat, and one we are grateful for. While XKit isn’t an official Tumblr tool, it’s one we know is dear to many of you, and we don’t take that lightly. If you have any concerns, we encourage you to read more about what they have to say over here. Be sure to follow them to stay updated on their process!
Yeah, you. When we first began testing this new interface with a small selection of you, we received some really useful feedback. We want to make sure that continues, so we created a survey. While we always read the reblogs on our announcement posts, this survey is the best way to let us know exactly how you feel about this update. And don’t worry—it’s anonymous. We won’t know who you are unless you make it your business to tell us so. Head on over there and share your thoughts now.
Hey! Look at that! We changed the website.
Hello Tumblr—your friendly neighborhood Tumblr web developers here. It’s been a while!
Remember the official JavaScript client library for the Tumblr API? tumblr.js? Well, we’ve picked it up, brushed it off, and released a new version of tumblr.js for you.
Having an official JavaScript client library for the Tumblr API means that you can interact with Tumblr in wild and wonderful ways. And we know as well as anybody how important it is to foster that kind of creativity.
Moving forward, this kind of creativity is something we’re committed to supporting. We’d love to hear about how you’re using it to build cool stuff here on Tumblr!
Some highlights:
Intrigued? Have a look at the changelog or read on for more details.