Building Reddit’s Design System on iOS

This page summarizes the projects mentioned and recommended in the original post on /r/RedditEng

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • sourcegraph

    Code AI platform with Code Search & Cody

  • We use Sourcegraph, which is a tool that searches through code in repositories. We leverage this tool in order to understand the adoption curve of our components across all of Reddit. We have a dashboard for each of the platforms to compare the inclusion of RPL components over legacy components. These insights are helpful for us to make informed decisions on how we continue to drive RPL adoption. We love seeing the green line go up and the red line go down!

  • SnapshotTesting

    📸 Delightful Swift snapshot testing.

  • Testing is an integral part of our framework. As we build out components, we leverage unit and snapshot tests to ensure our components look and feel great in any kind of situation. The underlying framework we use is the SnapshotTesting framework. Our components can leverage different themes on top of various appearances, and they can be configured even further with configuration properties. As such, it’s important that we test these various permutations to ensure that our components look great no matter what environment or settings are applied.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • Texture

    Smooth asynchronous user interfaces for iOS apps.

  • Historically, Reddit has used both UIKit and Texture as layout engines to build out the Reddit app. At the time of its adoption, Texture was used as a way to build screens and have the UI update asynchronously, which mitigated frame rate hitches and optimized scroll performance. However, Texture represented a significantly different paradigm for building UI than UIKit, and prior to RPL, we had components built on both layout engines. Reusing components across these frameworks was difficult, and having to juggle two different mental models for these systems made it difficult from a developer’s perspective. As a result, we opted to deprecate and migrate off of Texture.

  • FlexLayout

    FlexLayout adds a nice Swift interface to the highly optimized facebook/yoga flexbox implementation. Concise, intuitive & chainable syntax.

  • We still wanted to leverage a layout engine that could be performant and easy-to-use. After doing some performance testing with native UIKit, Autolayout, and a few other third-party options, we ended up bringing FlexLayout into the mix, which is a Swift implementation of Facebook’s Yoga layout engine. All RPL components utilize FlexLayout in order to lay out content fast and efficiently. While we’ve enjoyed using it, we’ve found a few touch points to be mindful of. There are some rough edges we’ve found, such as utilizing stack views with subviews that use FlexLayout, that often come at odds with both UIKit and FlexLayout’s layout engines.

  • yoga

    Yoga is an embeddable layout engine targeting web standards.

  • We still wanted to leverage a layout engine that could be performant and easy-to-use. After doing some performance testing with native UIKit, Autolayout, and a few other third-party options, we ended up bringing FlexLayout into the mix, which is a Swift implementation of Facebook’s Yoga layout engine. All RPL components utilize FlexLayout in order to lay out content fast and efficiently. While we’ve enjoyed using it, we’ve found a few touch points to be mindful of. There are some rough edges we’ve found, such as utilizing stack views with subviews that use FlexLayout, that often come at odds with both UIKit and FlexLayout’s layout engines.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts