# Bleeding Edge - Medium

We make Clue. - Medium

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Introducing OkSSE -- Kotlin Multiplatform SSE library

DevFeed: [Introducing OkSSE -- Kotlin Multiplatform SSE library](<https://devfeed.tech/articles/introducing-oksse-kotlin-multiplatform-sse-library-24568.md>)

Original publisher: [Read original article](<https://medium.com/bleeding-edge/introducing-oksse-kotlin-multiplatform-sse-library-7e6e804c885b?source=rss----d8ebe85cdc0f---4>)

Author: Akshay Chordiya

Published: 2020-08-31T11:08:59Z

Content type: article

Language: en

Sources: [Bleeding Edge - Medium](<https://devfeed.tech/sources/bleeding-edge-medium.md>)

Topics: [Server-sent events (SSE)](<https://devfeed.tech/topics/server-sent-events-sse.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Library](<https://devfeed.tech/topics/library.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [api](<https://devfeed.tech/tags/api.md>), [app](<https://devfeed.tech/tags/app.md>), [backend](<https://devfeed.tech/tags/backend.md>), [browser](<https://devfeed.tech/tags/browser.md>), [client](<https://devfeed.tech/tags/client.md>), [client-library](<https://devfeed.tech/tags/client-library.md>), [coroutine](<https://devfeed.tech/tags/coroutine.md>), [data](<https://devfeed.tech/tags/data.md>), [http](<https://devfeed.tech/tags/http.md>), [ios](<https://devfeed.tech/tags/ios.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-multiplatform](<https://devfeed.tech/tags/kotlin-multiplatform.md>), [library](<https://devfeed.tech/tags/library.md>), [mobile](<https://devfeed.tech/tags/mobile.md>), [multiplatform](<https://devfeed.tech/tags/multiplatform.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [protocol](<https://devfeed.tech/tags/protocol.md>), [server](<https://devfeed.tech/tags/server.md>), [server-sent-events](<https://devfeed.tech/tags/server-sent-events.md>), [sse](<https://devfeed.tech/tags/sse.md>)

### AI overview

Clue created OkSSE for a backend-driven UI that streams server updates to Android and iOS clients over SSE's unidirectional HTTP connection. The Kotlin Multiplatform library follows the 2015 W3C recommendation and shares SSE business logic across platforms. Its common code uses coroutines; the JVM implementation uses OkHttp. The article says the Android team chose a new generic implementation because available libraries needed modification, were unmaintained, or did not fully meet the specification, while the iOS team initially chose to modify an existing library. At the time described, Android was using OkSSE, but iOS support required Kotlin/Native setup; the current setup's TypeScript API path was noted to affect performance compared with using Kotlin directly. The API streams event states through a coroutine scope, and the library includes logging, exponential backoff retries, and support for a user-provided HTTP client.

### Source excerpt

Introducing OkSSE -- Kotlin Multiplatform SSE librarySharing is caring -- Illustration by Marta Pucci At Clue, we always want to keep finding new solutions as challenges arise. Recently, we needed to build a dynamic UI driven via backend which motivated the entire team 💪🏻 and eventually led to the development of OkSSE library. And today, I'm super excited 🎉 to share OkSSE -- an open source Server sent events client library made with Kotlin multiplatform and Coroutine for the tech community to use and build their amazing use-cases. OkSSE is a client for Server Sent events protocol written in Kotlin Multiplatform. The implementation is written according to W3C Recommendation 03 February 2015 specification 📝 OkSSE is an SSE client that's modern, efficient and provides an easy-to-use API. The aim of this article is to: walk you through our journey 🛣 of why we set out to use SSE protocol, explain why we decided to build our own library, and share how you can use the library for your use-cases Backstory We started with an idea 💡to have a backend driven UI and build an infrastructure for it. That's where we decided to use SSE [Server Sent Events] protocol to talk with the mobile clients [Android & iOS] in order to continuously stream 🌊 the data from the backend to render the UI on clients. Check out the talk below if you are interested in learning more about how we used SSE for Backend Driven UI: https://medium.com/media/3fb46f5e9db8ea9e4fc9a834c19e2d03/hrefWhat's SSE?Server-sent events (SSE) is a server push technology enabling a browser to receive automatic updates from a server via HTTP connection -- Wikipedia In a nutshell 🥜, SSE is built on top of well known HTTP and establishes a unidirectional connection from server -> client. The server continuously pushes data downstream ⬇, which clients can stream until the app or tab [for web] is closed. Reinvent the wheel 🎡 With backend driven UI in mind, both of our client teams (i.e Android and iOS) started searching for the bes

## Build complex screens faster on Android with Epoxy

DevFeed: [Build complex screens faster on Android with Epoxy](<https://devfeed.tech/articles/build-complex-screens-faster-on-android-with-epoxy-24563.md>)

Original publisher: [Read original article](<https://medium.com/bleeding-edge/build-complex-screens-faster-on-android-1773c5a64352?source=rss----d8ebe85cdc0f---4>)

Author: Akshay Chordiya

Published: 2019-12-30T13:31:50Z

Content type: article

Language: en

Sources: [Bleeding Edge - Medium](<https://devfeed.tech/sources/bleeding-edge-medium.md>)

Topics: [User Interfaces](<https://devfeed.tech/topics/user-interfaces.md>), [MVVM](<https://devfeed.tech/topics/mvvm.md>), [User interface design](<https://devfeed.tech/topics/ui-design.md>), [mobile-app-performance](<https://devfeed.tech/topics/mobile-app-performance.md>)

Tags: [adapter](<https://devfeed.tech/tags/adapter.md>), [airbnb](<https://devfeed.tech/tags/airbnb.md>), [all](<https://devfeed.tech/tags/all.md>), [android](<https://devfeed.tech/tags/android.md>), [approach](<https://devfeed.tech/tags/approach.md>), [architecture](<https://devfeed.tech/tags/architecture.md>), [article](<https://devfeed.tech/tags/article.md>), [awesome](<https://devfeed.tech/tags/awesome.md>), [based](<https://devfeed.tech/tags/based.md>), [basics](<https://devfeed.tech/tags/basics.md>), [beautiful](<https://devfeed.tech/tags/beautiful.md>), [build](<https://devfeed.tech/tags/build.md>), [but](<https://devfeed.tech/tags/but.md>), [can](<https://devfeed.tech/tags/can.md>), [complex](<https://devfeed.tech/tags/complex.md>), [component](<https://devfeed.tech/tags/component.md>), [controller](<https://devfeed.tech/tags/controller.md>), [epoxy](<https://devfeed.tech/tags/epoxy.md>), [faster](<https://devfeed.tech/tags/faster.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [recyclerview](<https://devfeed.tech/tags/recyclerview.md>), [ui](<https://devfeed.tech/tags/ui.md>), [with](<https://devfeed.tech/tags/with.md>)

### AI overview

Epoxy lets Android teams compose complex RecyclerView screens from separate models, each tied to a view type and layout. A controller declares the ordered models; data flows through the models to views, while callbacks update state. At Clue, this modularity made view types easier to reuse, develop in parallel, and change as the UI evolved. Epoxy also offers a Kotlin DSL, optional background diffing, and defaults such as LinearLayoutManager. The article says performance should be comparable to plain RecyclerView when its usage rules are followed, and advises configuring model validation for production. Tradeoffs include a learning curve and fewer community resources than RecyclerView, so the author recommends evaluating it in a sample project.

### Source excerpt

Rowing the boat -- Illustration by Marta PucciBuild complex screens faster on Android⚡ -- Our journey with Epoxy RecyclerView is such an important UI component on Android. But using it can get complex and error prone--especially when dealing with different view types and pagination. Moreover, it's hard when working on the same screen within the team. In this article, I'm going to share basics of Epoxy and an overview of the problems it helped us solve. Here's our journey of how we adopted Epoxy at Clue to build our UIs faster in parallel within the team.⚡ Backstory It all started with our users, who wanted a more understandable and interactive view of their historical tracking data. ✨(For Clue users, this is generally their menstrual cycles & symptoms.) So our awesome design team came up with this beautiful intuitive design 😍: Enhanced Analysis screen in Clue app I know what you're thinking already: that's a lot of view types. And we were definitely concerned about the performance and responsiveness of the screen. That's when we decided to see if we could use any third-party library to help us with our goal. Epoxy Epoxy is a library from Airbnb which takes a declarative / composable approach to build the UI--typically, a list. It uses RecyclerView under the hood It simplifies creation of static and dynamic layouts Each item in the list is associated to an epoxy model which defines the item's layout and manages binding the data and releasing the view's resources when it's recycled. Item <-> Epoxy Model <-> Layout resource The order of the items shown on the UI is based on how you add the model to the adapter or controller. Philosophy Epoxy encourages a usage pattern similar to the popular MVVM and MVI architecture where the data flows in one direction (UDF - uni-directional data flow). Flow with Epoxy The data forms the state of the UI then goes to EpoxyModel and to the views on the RecyclerView . The Epoxy Model behaves like a ViewModel and provides the interface betwe

## Creating interactive article content with React and Contentful

DevFeed: [Creating interactive article content with React and Contentful](<https://devfeed.tech/articles/make-it-pop-creating-interactive-content-with-react-and-contentful-24569.md>)

Original publisher: [Read original article](<https://medium.com/bleeding-edge/make-it-pop-creating-interactive-content-with-react-and-contentful-9b2ecac06d3?source=rss----d8ebe85cdc0f---4>)

Author: Jesse Pinho

Published: 2019-06-26T09:37:42Z

Content type: tutorial

Language: en

Sources: [Bleeding Edge - Medium](<https://devfeed.tech/sources/bleeding-edge-medium.md>)

Topics: [Contentful](<https://devfeed.tech/topics/contentful.md>), [React](<https://devfeed.tech/topics/react.md>), [Markdown](<https://devfeed.tech/topics/markdown.md>), [HTML](<https://devfeed.tech/topics/html.md>)

Tags: [contentful](<https://devfeed.tech/tags/contentful.md>), [creative-coding](<https://devfeed.tech/tags/creative-coding.md>), [html](<https://devfeed.tech/tags/html.md>), [interactive-content](<https://devfeed.tech/tags/interactive-content.md>), [markdown](<https://devfeed.tech/tags/markdown.md>), [online-publishing](<https://devfeed.tech/tags/online-publishing.md>), [react](<https://devfeed.tech/tags/react.md>)

### AI overview

Clue describes adding interactive content to Markdown-based articles in Contentful with custom React components. It discusses an initial shortcode approach using HTML comments and identifies its brittleness and hard-coded text as limitations.

### Source excerpt

Coding for the future of online publishingIllustration by Marta Pucci Note: this article was a joint effort between Clue and Contentful. You can find the original version on Contentful's blog here. You can also watch Jesse's talk that inspired this post. A year ago, we relaunched the Clue website as an encyclopedia for women and people with cycles. Clue's first product is a period tracker app, which is used by over 10 million people to track their symptoms and learn about patterns in their reproductive health. With the website relaunch, we put all of our content together in one organized place where people could more easily get the information they want. Here's an example of some of our encyclopedic content. This is one of our most popular articles, which explains what the significance of period blood color is. (Spoiler alert: it's not that significant.) We have a ton of articles like these. Lately, we've been thinking that our readers might be better served by interactive content that does more showing and less telling. Another of our top 10 most popular articles is titled, "What is the clitoris?". The article goes into detail about the anatomical structure of the clitoris, but the entire article was just text. We thought we could do better and asked ourselves: what if, as you scroll through and read about the different parts of the clitoris, an illustration would highlight the parts being discussed so you could really get what you're reading about? In our Contentful setup, we have a content type called "Article" with a Markdown body field. This field contains a bunch of text in the clitoris article, but we wanted to figure out how to get a plain text field to also include interactivity. Our first attempt at this was to extend Markdown's syntax using the concept of "shortcodes." Basically, this means inserting an HTML comment in the middle of the article body, with special syntax inside of it that refers to an interactive piece. Our Markdown renderer would pick up

## Clue's Erasmus Exchange

DevFeed: [Clue's Erasmus Exchange](<https://devfeed.tech/articles/clue-s-erasmus-exchange-24564.md>)

Original publisher: [Read original article](<https://medium.com/bleeding-edge/clues-erasmus-exchange-ba7d25b157e4?source=rss----d8ebe85cdc0f---4>)

Author: Melissa Yung

Published: 2019-05-13T14:51:39Z

Content type: article

Language: en

Sources: [Bleeding Edge - Medium](<https://devfeed.tech/sources/bleeding-edge-medium.md>)

Topics: [software-development](<https://devfeed.tech/topics/software-development.md>), [engineering-culture](<https://devfeed.tech/topics/engineering-culture.md>), [knowledge-management](<https://devfeed.tech/topics/knowledge-management.md>), [meetings](<https://devfeed.tech/topics/meetings.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [backend](<https://devfeed.tech/tags/backend.md>), [collaboration](<https://devfeed.tech/tags/collaboration.md>), [cross-functional-teams](<https://devfeed.tech/tags/cross-functional-teams.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [engineering-culture](<https://devfeed.tech/tags/engineering-culture.md>), [exchange](<https://devfeed.tech/tags/exchange.md>), [ios](<https://devfeed.tech/tags/ios.md>), [knowledge-sharing](<https://devfeed.tech/tags/knowledge-sharing.md>), [learning](<https://devfeed.tech/tags/learning.md>), [qa](<https://devfeed.tech/tags/qa.md>), [startup](<https://devfeed.tech/tags/startup.md>), [understand](<https://devfeed.tech/tags/understand.md>)

### AI overview

Clue's Erasmus Exchange lets engineers spend about two days per month for two months in another engineering chapter to build cross-chapter understanding and collaboration. Visitors join weekly syncs, help with feature planning and design, and contribute code when applicable. An iOS engineer's backend visit brought insight into scalability, stability, security, and monitoring, while sharing practices across chapters and building relationships. The author reports benefits including broader context, less overlapping work, and more cohesive cross-functional teams, while noting that individual experiences vary and that this participant chose discussions and relationship-building over more backend pull requests.

### Source excerpt

We set up a "study abroad" program for our engineers. Here's how it went.Illustration by Marta Pucci Our Erasmus Exchange at Clue was inspired from the European Union's Erasmus Program. You might have heard about it or been lucky to have taken part in it. It is a program that allows students to study in different countries across Europe to learn about their host country, and encourages cultural exchange. Our Erasmus Exchange, in a similar spirit, lets engineers cross their regular chapter borders to learn about different technologies and better understand other chapters. This is in line with our values of sharing, learning and collaborating. Chapters and Cross-Functional Teams At Clue, we work in engineering chapters and cross-functional feature teams. Last year, we concentrated on developing our chapters. We are now focused on improving our cross-functional teams. Chapters: Specific domain teams, such as the Android chapter, backend chapter, iOS chapter, QA chapter, and web chapter. Cross-Functional Teams: Feature teams made up of engineers from multiple chapters, as well as a designer and a product owner. As part of the Erasmus Exchange, a mobile engineer might choose to visit the backend chapter. A dev ops might be curious about QA and make a visit. Or a front end engineer might decide to experience the Android world. The idea is that the Erasmus visitor: Takes part in the host chapter's weekly syncs Assists in feature planning and design Contributes to the code base if applicable The Erasmus Exchange takes the engineer away from their regular chapter for about two days per month for a total of two months. The benefits of an engineer exchange program For one, the Erasmus Exchange fosters collaboration and encourages knowledge sharing to improve the decision making process. Adding a fresh point of view can challenge assumptions and spark creativity when it comes to finding new approaches to technical problems. All this creates a more cohesive cross-functional team

## Architecting an iOS networking layer: Part 2

DevFeed: [Architecting an iOS networking layer: Part 2](<https://devfeed.tech/articles/architecting-an-ios-networking-layer-part-2-24562.md>)

Original publisher: [Read original article](<https://medium.com/bleeding-edge/architecting-an-ios-networking-layer-part-2-fe92a9231995?source=rss----d8ebe85cdc0f---4>)

Author: Melissa Yung

Published: 2019-04-01T10:05:31Z

Content type: article

Language: en

Sources: [Bleeding Edge - Medium](<https://devfeed.tech/sources/bleeding-edge-medium.md>)

Topics: [REST API](<https://devfeed.tech/topics/rest-api.md>), [Network](<https://devfeed.tech/topics/network.md>), [iOS](<https://devfeed.tech/topics/ios.md>), [Test automation](<https://devfeed.tech/topics/test-automation.md>), [modules](<https://devfeed.tech/topics/modules.md>), [Unit testing](<https://devfeed.tech/topics/unit-testing.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [architecture](<https://devfeed.tech/tags/architecture.md>), [clean-code](<https://devfeed.tech/tags/clean-code.md>), [demo](<https://devfeed.tech/tags/demo.md>), [ios](<https://devfeed.tech/tags/ios.md>), [networking](<https://devfeed.tech/tags/networking.md>), [software-development](<https://devfeed.tech/tags/software-development.md>), [swift](<https://devfeed.tech/tags/swift.md>)

### AI overview

The demo shows a networking layer that separates a request from the app's business logic. A view retains the FetchPostsRequest and assembles its RequestConfiguration, HTTPClient, Request, and RequestEventListenerFactory to fetch forum posts from a sample REST API. The request acts as both HTTPClientDelegate and RequestObserving: it constructs the request data, receives success or failure, and uses listeners to report results. HTTPClient and the listener factory are constructor-injected for testability. Unit tests use mocks to check delegate setup, request data and transmission, and listener behavior for valid, nil, malformed, and failed responses. The authors say this structure supports adding or incrementally migrating requests, testing response handling, and isolating networking in a module that could replace its third-party networking library. The supplied text is an excerpt and does not include the full implementation.

### Source excerpt

A sample project including unit tests to demo our clean architectureIllustration by Marta Pucci Welcome to Part 2 of this two part series, where we go through the networking layer we use in our iOS app at Clue. As a follow-up to Part 1, where we went through the main building blocks of our networking architecture, we would like to now show it in action in our demo app. This demo app consists of a simple view with a button that is used to fetch forum posts. Based on the success of the request, the UI is updated to reflect the number of fetched posts. We will use a fake online REST API https://jsonplaceholder.typicode.com/ to achieve this. The View For simplicity's sake, we will only focus on the bit that performs the network request i.e. fetchPosts. https://medium.com/media/62e814391f03e564236862388fcef9c2/href A. The view needs to keep a reference to the fetchPostsRequest instance to ensure that it doesn't get deallocated prematurely. B. The view puts together the required building blocks to make the service call i.e RequestConfiguration, HTTPClient, Request and RequestEventListenerFactory The Request Objecthttps://medium.com/media/11bdd42c97a15f6245aa97fe9ed64bd5/href A.1 and A.3 The request conforms to the HTTPClientDelegate protocol as we want to make a service call and handle its success or failure. A.1 and A.2 The request conforms to the RequestObserving protocol as we have interested listeners that want to be notified of the results once the service call is complete. This means that it has an eventListenerFactory which will provide a list of listeners. B. Both the required HTTPClient and the RequestEventListenerFactory are injected to the constructor to ensure testability. C. We need to set the request to be the delegate of the HTTPClient so that we can be notified when the service call returns. D. The only public interface is the actual call to perform the service call. It is public since this class lives in the networking layer module which is separate from

## Architecting an iOS networking layer: Part 1

DevFeed: [Architecting an iOS networking layer: Part 1](<https://devfeed.tech/articles/architecting-an-ios-networking-layer-part-1-24561.md>)

Original publisher: [Read original article](<https://medium.com/bleeding-edge/architecting-an-ios-networking-layer-part-1-f2ad8417a6ce?source=rss----d8ebe85cdc0f---4>)

Author: Martin Höller

Published: 2019-04-01T10:01:29Z

Content type: article

Language: en

Sources: [Bleeding Edge - Medium](<https://devfeed.tech/sources/bleeding-edge-medium.md>)

Topics: [iOS](<https://devfeed.tech/topics/ios.md>), [Network](<https://devfeed.tech/topics/network.md>), [client library](<https://devfeed.tech/topics/client-library.md>), [Publish-subscribe pattern](<https://devfeed.tech/topics/pubsub.md>), [business logic](<https://devfeed.tech/topics/business-logic.md>)

Tags: [analytics](<https://devfeed.tech/tags/analytics.md>), [api](<https://devfeed.tech/tags/api.md>), [architecture](<https://devfeed.tech/tags/architecture.md>), [backend](<https://devfeed.tech/tags/backend.md>), [business-logic](<https://devfeed.tech/tags/business-logic.md>), [clean-code](<https://devfeed.tech/tags/clean-code.md>), [decoupling](<https://devfeed.tech/tags/decoupling.md>), [event-listeners](<https://devfeed.tech/tags/event-listeners.md>), [ios](<https://devfeed.tech/tags/ios.md>), [modular](<https://devfeed.tech/tags/modular.md>), [networking](<https://devfeed.tech/tags/networking.md>), [protocol](<https://devfeed.tech/tags/protocol.md>), [request](<https://devfeed.tech/tags/request.md>), [server](<https://devfeed.tech/tags/server.md>), [software-development](<https://devfeed.tech/tags/software-development.md>), [swift](<https://devfeed.tech/tags/swift.md>), [test](<https://devfeed.tech/tags/test.md>), [third-party](<https://devfeed.tech/tags/third-party.md>)

### AI overview

Clue replaces a single networking singleton--which assembled requests and handled responses, was hard to test, and was coupled to a third-party library--with a modular design. Each Request owns its endpoint, body parameters and HTTP method, and performs its call through an HTTPClient conforming to HTTPClientProviding; a delegate handles the result. Requests needing response handling use observer-based event listeners, each responsible for one task. For example, separate listeners can handle post-login push-token registration, analytics and profile fetching. The article presents this as a way to improve testability and separate networking from business logic. This excerpt covers the architecture's main building blocks; a demo is reserved for Part 2.

### Source excerpt

Cleaner and more modular building blocksIllustration by Marta Pucci In this two part series, we will go through the networking layer we use in our iOS app at Clue. Part 1 covers how we moved our networking layer to a cleaner more modular architecture 🤓 Part 2 includes a demo project on how we use it to make our network requests 🥳 Let's get started! Our iOS app makes use of a third-party library to handle the finer details of the networking requests to our server. Our interface to this library used to be a singleton class, through which all our service calls would be executed and handled. Whilst this worked and was "okay" for one or two service calls, it very quickly got out of control as our app grew and we needed something better! Let's see why this old implementation was so limiting and what we wanted to achieve with the new architecture. Limitations of the old implementation The singleton class had too many responsibilities. It needed to construct each service call with the endpoint, body and parameters as well as handle the success and failure of each call. It lacked separation of concerns between the networking and the business logic layer. It lacked testability as it required mocking of the backend and extensive test case setups. It was tightly coupled with a third party library, making it harder to replace if needed. Goals of the new architecture Move away from the singleton class anti-pattern. Instead of having a singleton class for all the requests, each request is a class of its own and builds up its networking stack. Improved testability. Increased decoupling between the networking and the business layer by separating the response handling from the network requests implementation. Easy to use interface to create a network request. Let's now go through the main building blocks of the new architecture. HTTPClient The HTTPClient class is responsible for performing the actual network request and conforms to the HTTPClientProviding protocol. We abstract this i

## Keep it contained!

DevFeed: [Keep it contained!](<https://devfeed.tech/articles/keep-it-contained-24565.md>)

Original publisher: [Read original article](<https://medium.com/bleeding-edge/enforcing-an-aspect-ratio-on-an-html-element-in-react-and-css-27a13241c3d4?source=rss----d8ebe85cdc0f---4>)

Author: Jesse Pinho

Published: 2018-11-15T16:15:40Z

Content type: tutorial

Language: en

Sources: [Bleeding Edge - Medium](<https://devfeed.tech/sources/bleeding-edge-medium.md>)

Topics: [CSS Modules](<https://devfeed.tech/topics/css-modules.md>), [Single-page application (SPA)](<https://devfeed.tech/topics/spa.md>), [Tutorial](<https://devfeed.tech/topics/tutorial.md>)

Tags: [aspect](<https://devfeed.tech/tags/aspect.md>), [css](<https://devfeed.tech/tags/css.md>), [css-in-js](<https://devfeed.tech/tags/css-in-js.md>), [react](<https://devfeed.tech/tags/react.md>)

### AI overview

The excerpt shows how to keep a responsive element at a fixed aspect ratio using the fact that percentage vertical padding is calculated from the containing block's width. For 16:9, set width to 100%, height to 0, and padding-bottom to 56.25%. Because the resulting container has zero height, embedded content will overflow or disappear if sized to 100% directly. The example fixes this with a relatively positioned outer container and an absolutely positioned inner wrapper, then sizes the iframe to 100%. A React component using styled-components packages the wrappers and accepts a width-to-height `ratio` prop, inverting it to calculate the padding percentage.

### Source excerpt

Enforcing an aspect ratio on an HTML element in React and CSSIllustration by Marta Pucci Frequently, it's necessary to set an aspect ratio on an element (like a <div> element), so that it will maintain its shape while scaling to any size. For example, you may be displaying a YouTube video in an iframe, and you want to make sure it shows up in 16:9. This is relatively simple to accomplish due to a CSS quirk. Per w3.org, when you set the CSS padding for a box: The percentage is calculated with respect to the width of the generated box's containing block, even for 'padding-top' and 'padding-bottom'. That is, if you have a 200 pixel-wide element and you set its padding-bottom to 50%, the bottom padding will be 100 pixels--regardless of the element's height!¹ We can take advantage of this fact to set an aspect ratio for an element, even as the window scales to any size. All we have to do is divide the height of our aspect ratio by its width, and then use that as the percentage for padding-bottom. For example, to enforce a 16:9 aspect ratio for an element, divide 9 by 16, which is 0.5625. Then, set the padding-bottom to 56.25%. Note that you also have to set the height to 0 to ensure that the padding constitutes the entirety of the element. Here's a full CSS class for a 16:9 container: .aspect-ratio--16x9 { width: 100%; height: 0; padding-bottom: 56.25%; }Working out the quirks One issue you might face here is that, while the 16:9 container takes up the right amount of space on the page, its height is set to 0. While this will work fine for displaying a background image cropped to a specific aspect ratio, it doesn't handle actual content well. Take the YouTube iframe from earlier: if you put an iframe into this container, it won't actually fit into the aspect ratio you've specified. By default, YouTube's embed code includes width and height attributes on the video player iframe, so it will stick out of your container element if it's too big. Meanwhile, if you style it with

## How we conduct user interviews and user tests at Clue: Part Two

DevFeed: [How we conduct user interviews and user tests at Clue: Part Two](<https://devfeed.tech/articles/how-we-conduct-user-interviews-and-user-tests-at-clue-part-two-24567.md>)

Original publisher: [Read original article](<https://medium.com/bleeding-edge/how-we-conduct-user-interviews-and-user-tests-at-clue-part-two-cff94a4a2f97?source=rss----d8ebe85cdc0f---4>)

Author: Caro Hardy

Published: 2018-05-11T13:26:29Z

Content type: article

Language: en

Sources: [Bleeding Edge - Medium](<https://devfeed.tech/sources/bleeding-edge-medium.md>)

Topics: [Business, Industry, Usability, User Experience, User Research, Web Strategy](<https://devfeed.tech/topics/business-industry-usability-user-experience-user-research-web-strategy.md>), [User Experience](<https://devfeed.tech/topics/user-experience.md>), [UI/UX Design](<https://devfeed.tech/topics/ui-ux-design.md>), [User interface design](<https://devfeed.tech/topics/ui-design.md>)

Tags: [alternatives](<https://devfeed.tech/tags/alternatives.md>), [app](<https://devfeed.tech/tags/app.md>), [apps](<https://devfeed.tech/tags/apps.md>), [berlin](<https://devfeed.tech/tags/berlin.md>), [categories](<https://devfeed.tech/tags/categories.md>), [data](<https://devfeed.tech/tags/data.md>), [device](<https://devfeed.tech/tags/device.md>), [insights](<https://devfeed.tech/tags/insights.md>), [interview](<https://devfeed.tech/tags/interview.md>), [interview-questions](<https://devfeed.tech/tags/interview-questions.md>), [interviews](<https://devfeed.tech/tags/interviews.md>), [product-design](<https://devfeed.tech/tags/product-design.md>), [research](<https://devfeed.tech/tags/research.md>), [sessions](<https://devfeed.tech/tags/sessions.md>), [software-development](<https://devfeed.tech/tags/software-development.md>), [tests](<https://devfeed.tech/tags/tests.md>), [user](<https://devfeed.tech/tags/user.md>), [user-interviews](<https://devfeed.tech/tags/user-interviews.md>), [user-research](<https://devfeed.tech/tags/user-research.md>), [user-testing](<https://devfeed.tech/tags/user-testing.md>), [ux](<https://devfeed.tech/tags/ux.md>)

### AI overview

Clue's interview process aims to understand users' lives, why and how they use the app, and what alternatives it replaces. Interviews start with warm-up questions, then cover devices, tracking habits, discovery, switching, and feature use; project-specific questions address a defined product problem, such as improving value for people taking birth control pills. The article recommends open-ended, non-leading questions, asking even seemingly obvious basics, and allowing pauses--especially on sensitive topics. After interviews, the researcher summarizes findings and pain points in a one-page document and turns them into design opportunities. At Clue, researchers and designers work closely, and new team members attend a user session; the author notes that short interview videos can help teams understand findings, though Clue was not then using them. The excerpt says regular access to a diverse range of users is difficult but valuable.

### Source excerpt

To learn about our process, read Part One. Illustration by Marta PucciInterview sessions Once we have someone in the office, on the phone or on Google Hangouts, how do we carry out user interviews? Ideally, an interview will teach us one or more of the following things: Teach me something about people. Who are they? What's important to them? What's their story? Teach me something about how and why people use Clue. When do they starting thinking about it? What motivates them to look for something like it? Do they do research? Who do they ask? Teach me something about competing alternatives. What does Clue replace? How is it perceived against what they were doing before? How do people weigh up different options? The typical questions we ask I break the interview questions down into three categories. Introductory questions I'll start off with some super basic questions to get people warmed up. Some people find the experience a little weird at first, so this is an opportunity to get them used to the process. Questions: Tell me about yourself? What do you do for a living? How long have you lived in Berlin? The standards questions After the breaking the ice, I'll move onto some questions to get baseline insights from them. To give examples, they include questions such as: Which device do you use? How long are you using Clue? What do you use Clue for? What categories do you track in Clue? How often do you track? I'll ask questions about how they searched for such solutions: How did you hear about Clue? Do you currently use other female health apps? What for and why? Did you switch from another app to Clue? Which one? Why did you switch? And I'll ask questions about usage: Beside your period, do you track any other options? Which ones? Why? Have you entered anything into Clue today? When do you usually do it? At what time of the day? Where? (I want to know if they mostly do instant data entry or a posteriori tracking) Can you show me how you do it? (and I would about look w

## How we conduct user interviews and user tests at Clue: Part One

DevFeed: [How we conduct user interviews and user tests at Clue: Part One](<https://devfeed.tech/articles/how-we-conduct-user-interviews-and-user-tests-at-clue-part-one-24566.md>)

Original publisher: [Read original article](<https://medium.com/bleeding-edge/how-we-conduct-user-interviews-and-user-tests-at-clue-part-one-1e4ba424d91d?source=rss----d8ebe85cdc0f---4>)

Author: Caro Hardy

Published: 2018-05-11T13:25:25Z

Content type: tutorial

Language: en

Sources: [Bleeding Edge - Medium](<https://devfeed.tech/sources/bleeding-edge-medium.md>)

Topics: [Business, Industry, Usability, User Experience, User Research, Web Strategy](<https://devfeed.tech/topics/business-industry-usability-user-experience-user-research-web-strategy.md>), [Software Testing](<https://devfeed.tech/topics/software-testing.md>), [human centric design](<https://devfeed.tech/topics/human-centric-design.md>), [inclusive design](<https://devfeed.tech/topics/inclusive-design.md>), [User interface design](<https://devfeed.tech/topics/ui-design.md>)

Tags: [interviews](<https://devfeed.tech/tags/interviews.md>), [process](<https://devfeed.tech/tags/process.md>), [product-design](<https://devfeed.tech/tags/product-design.md>), [research](<https://devfeed.tech/tags/research.md>), [testing](<https://devfeed.tech/tags/testing.md>), [tests](<https://devfeed.tech/tags/tests.md>), [user-interviews](<https://devfeed.tech/tags/user-interviews.md>), [user-research](<https://devfeed.tech/tags/user-research.md>), [user-testing](<https://devfeed.tech/tags/user-testing.md>), [ux](<https://devfeed.tech/tags/ux.md>)

### AI overview

Clue's research process combines user input throughout design with scientific review by its researchers and data scientists. Interviews explore unmet needs before a feature exists or investigate pain points around a proposed feature; prototype tests use contextual activities and typically involve 3-5 people per round, while existing features are tested for improvement ideas. Clue uses surveys for quantitative results, staged releases and feature flags for early feedback and A/B testing. It recruits mainly through its newsletter and follow-up surveys about participant experience and background, sometimes using an agency to reach non-users. Remote sessions broaden geographic and cultural reach and reduce participant travel, but can obscure body language and face technical problems; Marvel with Lookback.io has been used to record sessions and reactions. Monthly Calendly invitations and reminder emails support recurring sessions.

### Source excerpt

Illustration by Marta Pucci I find it fun to see exactly how other organizations handle certain design processes. It's the small the little details that I find interesting. So, I thought I'd lay out exactly how we do work with users for research and testing purposes at Clue. Clue is a female health tracking app based in Berlin. We're now at the stage of about 50 employees, and we've raised over $30 million from VC firms such as Union Square Ventures. More than 10 million people use Clue. The reason I give these details is that I think your organization's stage will have a big impact on your approach to user research and user testing. To give a quick example, we're not at the stage where we test a single flow with hundreds of users to get quantitative data on the usability. But we are well beyond the stage where offering free coffee in Starbucks in return for chatting to us for 10 minutes is enough for our research and testing processes. In this two-part article, I'm going to focus on the practical, step-by-step process we use for talking to users, week-in, week out. The design process Our design process at Clue focuses both on designing a product that is scientifically-valid -- our app lets people know when they can expect their period and other menstrual cycle symptoms and stages -- and responds to the needs of the people using it. That means that the two product designers at Clue work closely with scientific researchers and data scientists. This is how we make sure that the product meets rigorous scientific standards. We also talk to the users at pretty much every point across the design process. Here's how I'd break up the stages of talking to users: Blank page interviews Even when we don't have a particular feature idea in mind, we'll carry out some user interviews. At this point we're just looking for interesting problems to dig into that could be the basis of future feature ideas. Feature research interviews When we have a feature idea, we'll kick off a round of

## Screenshot testing with React and Storybook

DevFeed: [Screenshot testing with React and Storybook](<https://devfeed.tech/articles/screenshot-testing-with-react-and-storybook-24570.md>)

Original publisher: [Read original article](<https://medium.com/bleeding-edge/screenshot-testing-with-react-and-storybook-19ab7e49ec92?source=rss----d8ebe85cdc0f---4>)

Author: Jesse Pinho

Published: 2018-03-19T09:18:02Z

Content type: tutorial

Language: en

Sources: [Bleeding Edge - Medium](<https://devfeed.tech/sources/bleeding-edge-medium.md>)

Topics: [screenshot-testing](<https://devfeed.tech/topics/screenshot-testing.md>), [Storybook](<https://devfeed.tech/topics/storybook.md>), [React](<https://devfeed.tech/topics/react.md>), [Software Testing](<https://devfeed.tech/topics/software-testing.md>), [styled-components](<https://devfeed.tech/topics/styled-components.md>), [Selenium](<https://devfeed.tech/topics/selenium.md>)

Tags: [continuous-integration](<https://devfeed.tech/tags/continuous-integration.md>), [react](<https://devfeed.tech/tags/react.md>), [screenshot-testing](<https://devfeed.tech/tags/screenshot-testing.md>), [selenium](<https://devfeed.tech/tags/selenium.md>), [storybook](<https://devfeed.tech/tags/storybook.md>), [styled-components](<https://devfeed.tech/tags/styled-components.md>), [testing](<https://devfeed.tech/tags/testing.md>), [visual-regression-testing](<https://devfeed.tech/tags/visual-regression-testing.md>)

### AI overview

The article explains why end-to-end UI tests can miss visual regressions and explores screenshot testing with React and Storybook to check component appearance across different states.

### Source excerpt

Visual regression testing for fun, profit, and peace of mind Illustration by Marta Pucci A friend of mine recently related a scary story about the lack of automated visual regression testing where he works--a huge international tech firm that you've heard of and probably use. He'd added a CSS class to an element to hide it from the user. Unbeknownst to him, and despite using BEM-style naming for CSS classes, this class name was already being used for an important checkbox in the user settings screen of his company's web app. The result? Users could no longer change the setting represented by the checkbox, because it was invisible! I asked him why that hadn't been caught by automated tests. He explained that, although they did have end-to-end tests in place that went through the UI and tested its functionality, the tests didn't catch the bug. Selenium was still able to check the original checkbox via its selector, so its visibility had no effect on the outcome of the test. The only way this could have been caught is via visual regression testing -- or, as it is sometimes called, screenshot testing. 💅 Switching to styled-components I recalled this story recently while working on a sizable project at Clue: converting all of our "native" CSS to use styled-components. The new helloclue.com website consists of dozens of components. An article page, for example, contains at least ten different React components, all of which have accompanying CSS files. Converting all of this CSS to styled-components means there's an enormous risk of bugs exactly like the one my friend experienced. So before the project began, I investigated setting up screenshot testing for the site. 📕 Enter Storybook (Note: if you're already familiar with Storybook and @storybook/react, feel free to skip to the next section.) We use Storybook when developing simple presentational components. This way, we can test them in every possible state, without having to reproduce all the logic and so forth required t