Aurekai

Saket Narayan

Watch

Writing interactive screenshot tests in Compose UI with Touch Robot

These are some examples of real issues that were happening at Block. Each of them was frustrating because we were regularly shipping broken experiences to customers despite having sufficient test coverage. We had screenshot tests using Paparazzi, but they were mostly static snapshots that verified layout correctness. We had connected device tests, but they…

Saket Narayan saket.me

Named in it

Where they publish

Latest

Generating rich link previews 10x fasterunfurl is one of my favorite open source libraries. Not because it’s clever or complex, but because it’s a tiny kotlin library that does one thing well: generate rich link previews by extracting their social metadata. You can try out its demo on your computer: brew install saket/repo/unfurl unfurl https://dog.ceo If you’ve ever pasted a […] The post…Saket Narayan saket.me Drawing custom text spans in Compose UIWhile exploring how text paragraphs are rendered in Compose UI, I nerd sniped myself into porting squiggly underlines from Sam Ruston’s Buzzkill app. Sam’s animation was implemented using TextView custom spans, but Compose UI does not offer any alternatives for them yet. While our friends at Google are prototyping text modifiers (first, second), I…Saket Narayan saket.me Graduating from View IDsI found an old screen in Cash App today that wasn’t retaining its scroll position across configuration changes. A peek into git history revealed that the author forgot to assign an ID to its scrollable layout for enabling state restoration. And would you even blame them? Sure, View IDs are necessary, but maintaining them manually […] The post Graduating…Saket Narayan saket.me Great teams merge fastOne of the many things I was constantly amazed about during my first few weeks at Square/Cash App was seeing how fast this team shipped code. All members of the Android team (and likely other platforms as well) were merging to the main git branch multiple times every day. This was in stark contrast to […] The post Great teams merge fast appeared first on…Saket Narayan saket.me Avoiding fake italic and bold text on AndroidChanging line heights in Android using LineHeightSpan has this ugly side-effect where the cursor ends up being very tall, extending till the full line height instead of just the text height. I've decided to go to extreme lengths to fix this over the next few days. For science. pic.twitter.com/2tWLvDq1rz — Saket Narayan (@Saketme) November 24, […] The…Saket Narayan saket.me Building a gesture driven Reddit appAn exploratory talk that showcases how Android can deliver a beautiful experience to the user using material design principles and various framework APIs like gestures and spans. This talk walks the user through a collection of concrete examples of custom UI components and their implementations in my gesture driven Reddit app, Dank. Recreating Google…Saket Narayan saket.me Sunsetting DankI’ve been trying to write this post for a while, but I kept throwing my words in the bin in hopes that things will improve. I believe it’s now time to put an end to this. I started building Dank as a side project in January 2017. It was my playground for exploring Android. It […] The post Sunsetting Dank appeared first on Saket Narayan.Saket Narayan saket.me Persistence as the single source of truthSimple is better than complex. Complex is better than complicated. In the world of Android, where all sources of information and user interactions are asynchronous, UI state can become hard to reason about, especially in large apps. This is not only difficult to maintain but also increases complexity with the addition of every new feature. […] The post…Saket Narayan saket.me Band-aiding legacy networking libraries with Retrofit and OkHttpWhen Uncommon was brought in to refactor a big legacy app last year, we found ourselves in a strange situation. Our client was maintaining a common library for handling networking — HTTP, FCM, MQTT — across all apps under their brand. This library (let’s call it SadLibrary) had an API that was badly designed and dated, but not using […] The…Saket Narayan saket.me The lesser known world of spansDo you know what’s common between the blinking cursor, hyperlinks and text highlighting in TextViews? They’re all implemented using spans. Spans are tiny objects that Android uses heavily across the framework. If you’ve worked with text styling such as bold or italics, then you’re already familiar with the basic usages of spans. But they are […]…Saket Narayan saket.me Android Nougat and rate limiting of notification updatesWhile working on a feature for downloading images in my app, I ran into a strange issue where progress notifications were never reaching 100%. Knowing that the framework is usually not wrong, I started suspecting my own skills (as usual). To make matters worse, nobody was able to reproduce the issue in a sample project I shared with other […] The post…Saket Narayan saket.me Displaying HTML tags on TextView the right wayWhile going through the codebase of a former client, I found that I was using four different ways for showing HTML on Android. This made me realize that I didn’t really know what the correct way of showing them is and I’ve always hammered my way using trial & error until the HTML tags have showed up. Embarrassed, I decided to explore how […]…Saket Narayan saket.me