Skip to content
CAI
Software that uses CAICheck a score

facebook/litho

53.4

Weak · 25 September 2026

180.6k

lines of production code

Kotlin

with Java

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is the Litho UI framework for Android, providing a declarative, component-based architecture for building complex and performant user interfaces. It manages layout through the Yoga engine, handles rendering via a specialized mount system, and offers extensive tooling including a Kotlin compiler plugin, IntelliJ IDE integration, and a suite of educational codelabs. The codebase also includes supporting modules for image loading, animations, state management, and debugging, all unified under a modernized build and testing infrastructure.

How it got here

2017 — Kotlin migration and Sections release

58 changes.

The project underwent a major migration of its core libraries and samples from Java to Kotlin, while simultaneously refactoring the build system to Skylark and standardizing on Apache-2.0 licensing. This period culminated in the initial open-source release of the Litho Sections framework, introducing dedicated modules for section-based list management and their corresponding annotation processors.

2018–2020 — RenderCore extraction and IntelliJ plugin expansion

64 changes.

This period focused on extracting the core rendering engine into the standalone RenderCore library and integrating it with Yoga, transitions, and incremental mounting. Simultaneously, the Litho IntelliJ plugin was significantly enhanced with comprehensive code completion, navigation, and debugging features, while extensive integration and instrumentation tests were added to verify TreeProp propagation and error handling.

2021–2024 — RenderCore architecture and Kotlin migration

78 changes.

This period focused on establishing the RenderCore framework as a lightweight, framework-agnostic foundation for UI components, introducing primitives for layout, canvas drawing, and image rendering. Concurrently, the Litho codebase underwent a comprehensive migration to Kotlin, modernizing core utilities, configuration, and the compiler plugin to support the K2 frontend. The work also expanded the framework's capabilities with new hooks for coroutines and LiveData, alongside significant enhancements to debugging, accessibility, and testing infrastructure.

2025 — Compiler testing and thread utilities

7 changes.

This period focused on enhancing the Litho compiler plugin with robust test utilities and validation for hook usage, alongside adding integration tests for state tracking and layout effects. It also introduced the rendercore-thread-utils library to manage thread priorities and refactored editor model classes into Kotlin data classes.

Features

Add BUCK build rules for Robolectric shadow JARs

The lib/fb/android-all directory now includes a BUCK file that defines build targets for Robolectric shadow libraries. It introduces fb\_java\_library targets (shadows-prebuilt-core-v3 and shadows-prebuilt-core-v4) which depend on prebuilt JARs (shadows-core-16-jar and shadows-framework-41-jar) packaged via fb\_prebuilt\_jar. This allows downstream projects like lib/robolectric3 and lib/robolectric4 to consume these shadow dependencies through the build system.

lib/fb/android-all · high confidence

Add DefaultTextNode and AndroidManifest to rendercore-default-text-node

The rendercore-default-text-node module now includes an AndroidManifest targeting SDK 33 and a new DefaultTextNode implementation. This node handles text layout by delegating to TextMeasurementUtils, accepting text content, style, and render unit parameters to produce layout results.

litho-rendercore-default-text-node · high confidence

Add Events codelab demonstrating Litho event handling

This change introduces a new codelab application in the \codelabs/events\ directory that teaches how to declare, bind, and react to events in Litho. The sample app includes a \RootComponentSpec\ that manages state for a list of color boxes and status text, handling \ClickEvent\ to add or remove colors, and a custom \BoxItemChangedEvent\ to propagate updates from child components. It also features a \ColorBoxCollectionSpec\ that listens for \VisibleEvent\, \InvisibleEvent\, and \LongClickEvent\ on individual items, demonstrating how to use \@Param\ and \@FromEvent\ annotations to pass data through the event system.

codelabs/events · high confidence

Add Kotlin API for Fresco Vito image components

Users can now use a new Kotlin extension function, FrescoVitoImage, to create Fresco Vito image components within Litho. This function wraps the underlying FrescoVitoImage2 component, allowing developers to specify image source, options, caller context, and aspect ratio directly in Kotlin. A corresponding BUCK build configuration has also been added to support this new Kotlin module.

litho-fresco-kotlin/src/main/kotlin · high confidence

Add Litho Props codelab starter project

This change introduces the initial structure for the 'Props' codelab, providing a complete Android application scaffold. It includes the necessary build configuration (Gradle wrapper), application manifest, and resource files (themes, icons, strings). Functionally, it sets up a Litho-based activity that demonstrates how to define and use a custom prop: the \RootComponentSpec\ declares a \name\ prop, which is passed from \MainActivity\ (hardcoded as "Jane") and rendered by a \Text\ component.

codelabs/props · high confidence

Add Litho Spec Structure panel to the IntelliJ tool window

The Litho IntelliJ plugin now includes a dedicated Structure panel that displays the hierarchical composition of Litho ComponentSpec files. This new view, integrated into the existing tool window, presents a tree of Props, States, Lifecycle Methods, Events, Triggers, State Updates, and Working Ranges for LayoutSpec, MountSpec, and SectionSpec files. The panel updates dynamically as you switch between files or when the underlying spec model changes, providing a quick navigation aid for spec structure within the IDE.

litho-intellij-plugin/src/main/java/com/facebook/litho/intellij/toolwindows · high confidence

Add Litho codelab demonstrating a multi-timezone clock layout

This change introduces a new codelab application that demonstrates Litho's layout and mounting capabilities. It includes a custom \ClockDrawable\ and \ClockSpec\ to render an analog clock, and a \TimeConverterSpec\ that displays synchronized clocks for London, New York, and San Francisco alongside their respective labels. The entry also adds the necessary Android application scaffolding, including the \AndroidManifest\, \MainActivity\, and \LithoApp\ initialization.

codelabs/layout-spec · high confidence

Add Litho codelab demonstrating horizontal scroll height strategies

This change introduces a new codelab application that demonstrates three distinct approaches for managing the height of horizontal scrolling lists in Litho. The app includes a fixed-height list, a list that sizes itself based on the first item using \CrossAxisWrapMode.MatchFirstChild\, and a list that dynamically adapts to the tallest item using \CrossAxisWrapMode.Dynamic\ via \RecyclerBinderConfig\. It also features an expandable component to illustrate interactive height changes within the scroll container.

codelabs/hscroll-height · high confidence

Add Litho state management codelab

This location introduces the 'state' codelab, providing a complete Android application and documentation that demonstrates how to manage component state in Litho. The included \RootComponentSpec\ implements a counter UI with increment/decrement buttons and a configurable step size, illustrating both immediate state updates via \@OnUpdateState\ and lazy state updates using \@State(canUpdateLazily = true)\ to defer re-renders for non-critical inputs like text changes. The entry also includes the necessary project scaffolding, such as the \AndroidManifest\, \MainActivity\, and resource files, to run this example.

codelabs/state · high confidence

Add LithoLab sample codelab with Fresco and Sections integration

The sample-codelab module is introduced, providing a complete interactive tutorial for learning Litho. The sample initializes Fresco and FrescoVito for image loading, defines a multi-activity structure (Begin, Middle, End, Examples), and includes a comprehensive set of LayoutSpecs covering core concepts such as containers, props, click events, state management, and RecyclerBinder usage. The end-state demonstration integrates Litho Sections with DataDiffSection to render a scrollable list of story cards.

sample-codelab · high confidence

Add MountSpec codelab with animated clock component

The codelabs/mount-spec directory now includes a complete Litho codelab application that demonstrates creating a custom mount spec. The example features a ClockSpec component that renders an animated clock using a custom ClockDrawable, showing how to handle mounting, measuring, and prop updates in Litho.

codelabs/mount-spec · high confidence

Add ProGuard configuration for Litho annotations

A new BUCK build file and ProGuard rules file have been added to the litho-annotations module. The build file defines the \annotations\ target using the \litho\_android\_library\ rule, explicitly setting the language to JAVA and linking to the new ProGuard configuration. The \proguard\_annotations.pro\ file ensures that the \@DoNotStrip\ and \@KeepGettersAndSetters\ annotation interfaces and their associated class members are preserved during code shrinking, preventing them from being removed or obfuscated in release builds.

litho-annotations/src/main/java/com/facebook/proguard · high confidence

Add TextInput Keyboard codelab with multi-timezone clock UI

Introduces a new codelab application that demonstrates Litho component creation and keyboard interaction. The app features a custom \ClockDrawable\ and \ClockSpec\ to render analog clocks, displaying synchronized times for London, New York, and San Francisco. It includes a \TextInput\ component configured with \TYPE\_CLASS\_DATETIME\ and a visible event handler to automatically request focus, allowing users to input time values that update the clock displays.

codelabs/textinput-keyboard · high confidence

Add build targets and documentation for litho-core

The litho-core module now includes a BUCK build configuration that exports the library as an Android Archive (AAR) and defines resource handling via fb\_android\_resource, alongside a new module-docs.md file providing initial documentation for the core classes used by both Kotlin and Java Spec APIs.

litho-core · high confidence

Add open-source Flipper support via BUCK build rules

The lib/flipper module now includes BUCK build definitions that integrate the open-source Flipper library. This change introduces build targets for the core Flipper library and the Litho plugin, fetching them as prebuilt AARs from Maven (version 0.30.2) and exposing them for use within the project's build system.

lib/flipper · high confidence

Add setting to automatically resolve red symbols

The Litho IntelliJ plugin now includes a new configuration option, "Resolve Red Symbols Automatically," in its settings dialog. This feature allows users to enable automatic resolution of red symbols within the IDE, with the preference persisted across sessions via the plugin's settings state.

litho-intellij-plugin/src/main/java/com/facebook/litho/intellij/settings · high confidence

Added 'Go to Generated Class' action in Editor Popup menu

A new 'Go to Generated Class' action has been added to the Litho plugin, accessible via the Editor Popup menu. This feature allows users to quickly navigate from a Litho Spec file to its corresponding generated component class. The action is context-aware, appearing only when the cursor is on a valid Litho Spec, and includes logging for usage tracking.

litho-intellij-plugin/src/main/java/com/facebook/litho/intellij/actions · high confidence

Added BUCK build configuration for the compiler plugin

A new BUCK build file has been added to the litho-compiler-plugin directory, defining a java\_binary target named 'litho-compiler-plugin'. This configuration sets the target visibility to PUBLIC and specifies a dependency on the internal litho-compiler library, enabling the plugin to be built and used within the project's build system.

litho-compiler-plugin · high confidence

Added BUCK build support for the IntelliJ plugin SDK

The IntelliJ plugin SDK now includes a BUCK build configuration (BUCK file) and stub JAR files for its dependencies (annotations, extensions, idea, java-api, java-impl, platform-api, platform-impl, util). This allows developers to build the plugin using the BUCK build system by copying the required JARs from the IDE installation folder, as described in the new README.md.

lib/intellij-plugin-sdk · high confidence

Added FirstDrawReporter tooling for tracking first content draw

A new \FirstDrawReporter\ utility has been added to the Litho core tools package, allowing developers to hook into the first draw event of a component. This feature introduces a \useFirstDrawReporter\ hook and a corresponding \Style.reportFirstContentDraw\ style prop, enabling precise measurement of time-to-first-content-draw (TTRC) by triggering a callback immediately after the initial render cycle completes.

litho-core/src/main/java/com/facebook/litho/tools · high confidence

Added Litho codelab examples for GroupSection lifecycle, horizontal scroll height, and state preservation

New demo applications have been added to the codelabs directory to illustrate specific Litho capabilities. The 'group-section-lifecycle' app demonstrates the GroupSection lifecycle events (such as OnCreateTreeProp, OnDataBound, and OnViewportChanged) using a helper utility to track these events. The 'hscroll-height' app provides a visual guide for horizontal scrolling height constraints. Additionally, the 'save-state-rotation' app shows how to preserve and restore ComponentTree state across configuration changes, such as screen rotation, by leveraging Android's ViewModel and TreeState APIs.

app · high confidence

Added Mount UI Debugger for visualizing render performance

A new MountUiDebugger component has been added to the litho-tooling module. This tool acts as a DebugEventSubscriber that provides visual feedback on Litho view mounting performance by displaying a flashing overlay (green for fast, yellow for medium, red for slow) and drawing colored borders around mounted, unmounted, or updated render units.

litho-tooling · high confidence

Added MultiScreenshotterLithoRule for transition testing

A new \MultiScreenshotterLithoRule\ class and its associated BUCK build target have been added to the litho-screenshot module. This rule enables tests to capture multiple screenshots of an activity within a single test method, which is specifically useful for Litho transition tests that require frame delays. The rule automatically names screenshots using a format that includes the test class, test name, and a sequential count (e.g., \TestName\_1.beforeStart\), allowing for easier comparison of animation states.

litho-screenshot · high confidence

Added TestingGenericComponentProcessor service registration

A new service provider configuration file has been added to register the TestingGenericComponentProcessor, enabling the Java annotation processing system to discover and utilize this specific processor for testing generic components within the Litho integration test suite.

litho-it/processor/src/main/resources · high confidence

Added debounced event logging for Litho IntelliJ plugin

The Litho IntelliJ plugin now includes a new logging mechanism that debounces event logs to prevent excessive output. A new \DebounceEventLogger\ class ensures that events are only logged if a specified time interval has passed since the last log, reducing noise. This is integrated via a \LithoLoggerProvider\ that supports extension points for custom loggers, allowing the plugin to track user flows like dialog openings or action completions more efficiently.

litho-intellij-plugin/src/main/java/com/facebook/litho/intellij/logging · high confidence

Added no-op performance event implementation

A new NoOpPerfEvent class has been added to the litho-perf-logger module, providing an empty implementation of the PerfEvent interface that performs no actions. This allows components to use performance event tracking without incurring overhead when logging is disabled or not required.

src · high confidence

Enhanced Litho inspections for required props, event handlers, and naming conventions

The Litho IntelliJ plugin now provides more comprehensive in-editor feedback for Litho components. It highlights missing required props on Component.create() calls with a gutter icon and error annotation, and offers quick fixes to add missing EventHandler arguments to method calls. Additionally, it enforces that @Prop and @State parameter names start with a lowercase letter to prevent naming confusion, and improves validation for LayoutSpec, MountSpec, and SectionSpec classes by surfacing compile-time errors directly in the editor.

litho-intellij-plugin/src/main/java/com/facebook/litho/intellij/inspections · high confidence

Expanded Litho IntelliJ plugin code completion for annotations, events, and Kotlin components

The Litho IntelliJ plugin now provides significantly richer auto-completion support for developers. It includes context-aware suggestions for Litho method annotations (such as @OnEvent, @OnMount, @OnMeasure, and @OnUpdateState) and parameter annotations (like @Param, @Prop, and @State). The plugin also offers completion for event handler method names and event class types, as well as specific support for Litho Kotlin KComponents, including auto-completion for required props and component wrappers. These changes streamline the creation of Litho specs by reducing manual typing and ensuring correct annotation usage.

litho-intellij-plugin/src/main/java/com/facebook/litho/intellij/completion · high confidence

Expanded accessibility styling options in Litho

The \AccessibilityStyles.kt\ file introduces a comprehensive set of new Style methods for configuring accessibility properties on Litho components. Users can now explicitly set focus order, control screen reader focusability, define live regions, and specify pane and container titles. Additional props include state descriptions, labeled-by relationships, minimum duration between content changes, and detailed role/heading configurations, providing finer control over how components are presented to accessibility services.

litho-core/src/main/java/com/facebook/litho/accessibility · high confidence

IDE folding for Litho @Prop default values

The Litho IntelliJ plugin now supports code folding for @Prop parameters in ComponentSpec and SectionSpec files. When a parameter has a default value defined in the spec model, the IDE will collapse the parameter declaration in the method signature, displaying a placeholder like 'paramName: defaultValue' instead of the full signature. This helps reduce visual clutter in large spec files by hiding default values that are often known or less critical during code review.

litho-intellij-plugin/src/main/java/com/facebook/litho/intellij/foldings · high confidence

Initial Hello World Litho codelab

The codelabs/hello-world location now contains a complete, runnable Android application demonstrating the Litho UI framework. The app is implemented in Kotlin and features a single activity that renders a "Hello World" text component using Litho's \ComponentContext\ and \LithoView\. It includes the necessary Android project scaffolding, such as the \AndroidManifest.xml\, application class initialization for SoLoader, standard resource definitions (colors, strings, styles), adaptive icon assets, and Gradle wrapper scripts for building the project.

codelabs/hello-world · high confidence

Initial Litho codelab project structure

The codelabs/updating-ui location now contains the foundational files for a Litho-based Android application. This includes the AndroidManifest, application and activity classes, and a RootComponentSpec that demonstrates a basic Litho layout with state management and click handling. The entry also adds standard Android resource files (colors, strings, styles, adaptive icons) and the Gradle wrapper (v5.1.1) required to build the project.

codelabs/updating-ui · high confidence

Initial open-source release of litho-sections-core

The litho-sections-core module is now available as a standalone open-source component, providing the core implementation for Litho Sections. This release includes the foundational classes for managing section trees and data diffs, such as ChangeSet, Change, and BatchedTarget, along with the necessary build configuration (BUCK) and AndroidManifest to support integration into Android applications.

litho-sections-core · high confidence

Initial release of Litho IntelliJ Plugin with build and documentation scaffolding

This change introduces the Litho IntelliJ Plugin, providing enhanced integration with the Litho framework in IntelliJ IDEA. The release includes the plugin source code, a BUCK build configuration, and shell scripts to facilitate building and testing the plugin locally. Documentation is provided via a README detailing installation from the IntelliJ Marketplace or manual build steps, and a comprehensive CHANGELOG tracks feature history from version 1.4.1 through 1.8.6, highlighting capabilities such as autocompletion for KComponents, navigation for Spec files, and support for GroupSectionSpec and MountSpec.

litho-intellij-plugin · high confidence

Initial release of the Litho Kotlin compiler plugin module

This change introduces the \litho-compiler-plugin/compiler\ module, establishing the build configuration (BUCK) and service provider files required to register the Litho Kotlin compiler plugin. It defines the \litho-compiler\ library target, which depends on the Kotlin compiler artifacts, and includes the necessary \META-INF/services\ registrations for \CommandLineProcessor\ and \CompilerPluginRegistrar\ to enable the plugin's integration with the Kotlin toolchain. Additionally, it sets up the test infrastructure using JUnit, AssertJ, and Kotlin compile-testing.

litho-compiler-plugin/compiler · high confidence

Initial release of the Litho RenderCore library

This change introduces the \litho-rendercore\ module, a new standalone library extracted from the main Litho codebase. It provides the core rendering engine, including the \RenderTree\, \RenderUnit\, and \HostView\ infrastructure, along with essential utilities like \Dimen\ for dimension handling, \LayoutCache\ for performance optimization, and \ContentAllocator\ for managing mountable content pools. The module is built in Kotlin, targets SDK 33, and includes the \BinderObserver\ API for tracking binder lifecycle events.

litho-rendercore · high confidence

Initial release of the Litho Sections Widget module

This change introduces the \litho-sections-widget\ module, providing the core components for building complex, section-based lists in Litho. It includes \RecyclerCollectionComponentSpec\ as the primary entry point, along with configuration classes like \ListRecyclerConfiguration\, \GridRecyclerConfiguration\, and \RecyclerBinderConfiguration\ to customize layout managers, snapping behavior, and background change sets. The module also provides event controllers (\RecyclerCollectionEventsController\) for programmatic scrolling and refreshing, as well as specialized item animators (\NoUpdateItemAnimator\, \NotAnimatedItemAnimator\) to control update animations.

litho-sections-widget · high confidence

Initial scaffold for Litho state-saving codelab

This commit introduces the foundational structure for the 'Save State on Rotation' codelab, providing a complete Android application project. It includes the Gradle build infrastructure (wrapper and properties), the Android manifest, and the core Litho implementation in \RootComponentSpec.kt\, which demonstrates a counter UI that persists its state across configuration changes. The project also sets up the necessary application resources, such as themes, colors, and adaptive icons, along with the \LithoApp\ entry point to initialize SoLoader.

codelabs/save-state-rotation · high confidence

Introduce C++ flexlayout implementation for Litho

This change adds a new C++ implementation of the flexbox layout algorithm to the \litho-flexlayout\ module, replacing or supplementing the previous logic. The diff introduces the core CMake build configuration and a complete set of C++ source files (including \FlexBoxStyle\, \FlexItem\, \FlexLine\, and \FlexboxAlgorithm\) that handle layout calculations such as dimension resolution, flexible length distribution, and justification. This provides a native, cross-platform foundation for Litho's layout engine.

litho-flexlayout/src/main/cpp · high confidence

Introduce FlexLayout for Litho with optimized Java-to-Native layout calculation

This change adds the FlexLayout component to Litho, introducing a new Java API (FlexLayout.calculateLayout) and supporting style classes (FlexBoxStyle, FlexItemStyle) and enums that serialize layout configurations to native C++ code via JNI. The implementation optimizes performance by reducing JNI overhead: it passes a single callback object instead of maintaining local references for every measure callback, reuses static field/method IDs, and writes measure results directly into a shared Java array to avoid excessive bookkeeping. A CMake build file is also added to compile the native flexlayout library.

litho-flexlayout/src/main/java · high confidence

Introduce FrescoImage component for image rendering

The \litho-fresco\ module now provides a new \FrescoImage\ component (defined in \FrescoImageSpec\) that renders images using Fresco's Drawee system. This component supports advanced image configuration options including aspect ratio constraints, various scale types (such as focus crop), placeholder and failure images, fade durations, rounding parameters, and color filters. It replaces the previous \FrescoComponent\ implementation, offering a more explicit and reusable foundation for displaying images within Litho layouts.

litho-fresco/src/main/java · high confidence

Introduce Litho Zoomable component for touch-based zooming

A new \ZoomableComponent\ is now available in the \litho-zoomable\ module, allowing developers to wrap child components with pinch-to-zoom and pan gestures. This feature introduces a \ZoomableTouchListener\ interface for detecting touch events and a \ZoomableEventListener\ to monitor zoom start and finish states. The component manages its own nested Litho tree and integrates with the \rebound\ library for spring animations, enabling smooth zooming behavior within Litho layouts.

litho-zoomable · high confidence

Introduce RenderCore Text library for advanced text rendering

This change introduces the new \litho-rendercore-text\ library, providing a comprehensive text rendering solution built on the RenderCore primitives. It includes the \RCTextView\ view, which supports rich text features such as clickable and long-clickable spans, accessibility integration, and custom drawing via \OnPrePostDrawSpan\. The library also introduces \RichTextPrimitive\ for declarative text composition, \RoundedBackgroundColorSpan\ for styled backgrounds, and robust text truncation logic with caching. Additionally, it provides \TextAlignment\ and \TextStyle\ configurations for fine-grained control over text layout, alignment, and appearance.

litho-rendercore-text · high confidence

Introduce Yoga layout integration for RenderCore

This change adds the \litho-rendercore-yoga\ module, providing the infrastructure to layout RenderCore nodes using the Yoga flexbox engine. It introduces \YogaLayoutFunction\ to calculate layouts, \YogaLayoutDataProvider\ to bridge node properties to Yoga, and \YogaRootLayoutParams\ to support percentage-based dimensions at the root level. The module also includes \Edges\ for efficient edge value storage and sets the target SDK to 33.

litho-rendercore-yoga · high confidence

Introduce dedicated annotation processor for DiffSectionSpec and GroupSectionSpec

The litho-sections-processor module now provides a dedicated code-generation pipeline for Section specs, separating them from the general Component processor. This includes new model classes (DiffSectionSpecModel, GroupSectionSpecModel) and generators (DefaultDiffSectionSpecGenerator, DefaultGroupSectionSpecGenerator) that handle the specific lifecycle methods and delegate signatures for Sections. The processor validates Section-specific constraints, such as prohibiting @OnCreateLayout in DiffSectionSpecs, and generates the necessary boilerplate for service handling, cached values, and trigger methods.

litho-sections-processor · high confidence

Introduce experimental dependency-aware transitions for Kotlin components

Kotlin components can now use the experimental \useTransition\ hook with a \deps\ parameter to define transitions that re-evaluate when specific props, states, or derived values change. This allows animations to trigger dynamically based on dependency changes, with the \diffOf\ API providing previous and current values for precise animation control. The change also introduces internal data structures (\KRenderData\, \TransitionCreator\) to manage transition state and dependencies, and adds utility components like \ExpandToReveal\ and \CrossFade\ that demonstrate these new transition capabilities.

litho-core/src/main/java/com/facebook/litho/transition · high confidence

Introduce litho-testing module with new testing utilities and build targets

The litho-testing module is introduced to centralize UI testing capabilities for Litho components. This change adds a new BUCK build configuration defining the module structure, including a main library target and a separate benchmark helper target. It introduces new testing utilities such as \BaseMatcher\ and \BaseMatcherBuilder\ for verifying component properties like click handlers and focus states, \BenchmarkTestHelper\ for measuring component lifecycle performance, and \TestPerfEvent\ for capturing performance metrics during tests. Additionally, it provides \TempComponentsConfigurations\ to allow tests to temporarily override global Litho settings, and \LifecycleStep\ to track component lifecycle events.

litho-testing · high confidence

Introduce platform-agnostic JNI header abstraction

A new \lib/jni-hack\ module provides a unified \jni.h\ header that automatically selects the correct JNI definitions based on the build target: it includes the system Android NDK headers when building for Android (\\_\ANDROID\\_\), and uses a bundled copy of the standard JNI specification headers for host platforms (e.g., local unit tests). This allows consumers to depend on a single target without managing platform-specific include paths or header variants.

lib/jni-hack · high confidence

Introduce rendercore-thread-utils library with thread-priority inheritance and utilities

A new \rendercore-thread-utils\ module has been added to the Litho rendercore, providing a \PriorityInheritingFuture\ that automatically raises the priority of background threads when the main thread is waiting on them to prevent UI jank. The library also includes \ThreadUtils\ for main-thread assertions and UI/background scheduling, a configuration object for test modes, and an instrumentation hook for debugging futures.

litho-rendercore-thread-utils · high confidence

Introduces LifecycleOwnerWrapper to support deferred lifecycle observation

A new LifecycleOwnerWrapper class has been added to the Litho core lifecycle package. This component allows LiveData observers to be registered before a concrete LifecycleOwner is available, buffering them until a delegate is set. This enables use-live-data scenarios where the lifecycle owner is determined asynchronously, ensuring observers are correctly attached once the owner is resolved.

litho-core/src/main/java/com/facebook/litho/lifecycle · high confidence

Introduces RenderCore Incremental Mount extension

A new \rendercore-incremental-mount\ module has been added to RenderCore, providing an \IncrementalMountExtension\ that optimizes rendering by mounting only the items currently visible within the viewport. This extension includes an \IncrementalMountGapWorker\ to schedule pre-mounting tasks during frame gaps, an \ExcludeFromIncrementalMountBinder\ to allow specific components to opt out of this optimization, and a \RenderCoreExtension\ entry point to wire the logic into the layout and mount phases. The change also includes comprehensive test coverage for the new mounting behavior.

litho-rendercore-incremental-mount · high confidence

Introduces extension points for custom templates, actions, and event logging

The Litho IntelliJ plugin now exposes three new extension points, allowing other plugins to integrate more deeply. TemplateProvider enables external plugins to supply custom file templates for component generation, ActionPostProcess allows post-processing of generated files, and EventLogger provides a standardized mechanism for logging plugin events with rich metadata. These additions shift the plugin from a closed system to an extensible one, enabling third-party tools to contribute templates and track usage.

litho-intellij-plugin/src/main/java/com/facebook/litho/intellij/extensions · high confidence

Introduces state read tracking infrastructure for Litho components

This change adds a new internal state-read tracking system to Litho, introducing classes such as ComponentState, StateId, StateProvider, StateReadRecorder, and UiStateReadRecords. These components enable the framework to record which state values are accessed during specific UI phases (like bind and draw) and within specific scopes. This capability allows Litho to optimize execution by identifying exactly which binders or draw hosts need to be re-bound or invalidated when state changes, and includes mechanisms to detect and report or crash on invalid cross-tree state reads.

litho-core/src/main/java/com/facebook/litho/state · high confidence

Introduces the Primitive API for lightweight, framework-agnostic UI components

A new \Primitive\ class is added to the \litho-rendercore-primitives\ module, providing a lightweight building block for UI components that can be shared across frameworks like Bloks and Litho. This API allows developers to define a \layoutBehavior\ (specifying how the component sizes and lays out children) and a \mountBehavior\ (specifying how to allocate and configure a \View\ or \Drawable\). The module includes supporting classes such as \LayoutScope\, \BindScope\, \ContentAllocator\, and \KBinder\ to facilitate this declarative, immutable component model.

litho-rendercore-primitives · high confidence

Introduction of FlexboxStyle API for layout styling

A new FlexboxStyle API has been added to litho-core, enabling developers to define flexbox layout properties such as flex-grow, flex-shrink, flex-basis, and gap directly on components. This change introduces a comprehensive set of style items (FlexboxDimenStyleItem, FloatStyleItem, FlexboxObjectStyleItem) that map Litho styles to underlying Yoga layout configurations, including support for layout direction conversion from YogaDirection to LayoutDirection.

litho-core/src/main/java/com/facebook/litho/flexbox · high confidence

Introduction of Kotlin-based default node and Yoga layout implementation

The litho-rendercore-default-node module now provides its core layout components in Kotlin, including DefaultNode, DefaultYogaNode, and YogaProps. This change introduces a new default node implementation that supports Yoga-based layout calculations, allowing developers to utilize standard flexbox properties (such as width, height, flex, margins, and padding) for positioning and sizing content within the RenderCore framework.

litho-rendercore-default-node · high confidence

Litho Editor Flipper plugin adds mounting, visibility, and state inspection

The new \litho-editor-flipper\ module integrates the Litho Editor with the Flipper Layout Inspector, enabling developers to inspect and modify Litho component properties, state, and layout data directly. This update introduces specific descriptors for \LithoView\, \DebugComponent\, \DebugSection\, and \LithoRecyclerView\ to expose their internal structure. A key behavioral change is the inclusion of mounting and visibility information in the inspector, allowing users to see if a component is mounted and currently visible. Additionally, the plugin now supports editing state for Kotlin components via \KStateContainer\ and provides a command to force accessibility rendering for all Litho views.

litho-editor-flipper/src/main/java · high confidence

Litho sample app restructured with Kotlin API demos and new navigation

The Litho sample application has been reorganized to feature a comprehensive set of demos for the Kotlin API alongside the existing Java examples. The app now uses a hierarchical navigation model driven by a central \Demos\ data structure, allowing users to browse categories like Accessibility, Animations, and Collections. This update introduces numerous new Kotlin-based demonstration components (such as \AnimatedCounter\, \BlurKComponent\, and various collection examples) and integrates visibility event controllers (\AOSPLithoVisibilityEventsController\) into the root activities. The minimum SDK has also been raised to 24.

sample · high confidence

New Android setup, codemod, and local deployment scripts

Added three new shell scripts to streamline development workflows: \android-setup.sh\ configures the Android SDK environment (including proxy support to avoid SSL handshake issues) and installs specific platform and build tools; \codemod-state-update-methods.sh\ automates the conversion of state update calls to their synchronous variants for Kotlin and Java specs; and \local-deploy.sh\ builds the project and installs the resulting JAR and AAR artifacts into a local Maven repository for easy local consumption.

scripts · high confidence

New C++ event system for Yoga layout metrics and lifecycle

Yoga now exposes a new C++ event system that allows subscribers to receive notifications for layout lifecycle events, including node allocation/deallocation, layout pass start/end, and measure callback start/end. The system provides detailed metrics via the \LayoutData\ struct (tracking layout/measures counts, cache stats, and measure callback reasons) and passes specific context to subscribers, such as the \LayoutPassReason\ (e.g., flex, stretch, initial) and measured dimensions during measure callbacks. This enables external tools and Java bindings to monitor and analyze Yoga's internal layout behavior in real-time.

lib/yoga/src/main/cpp/yoga/event · high confidence

New CenterNode layout component for centering child views

The rendercore-center module now includes a CenterNode that allows users to center a single child view within its parent container. This new node calculates layout by determining the available space and positioning the child at the center coordinates, effectively providing a layout behavior similar to Android's Gravity.CENTER. The implementation includes the necessary AndroidManifest and Java source files to support this centering capability within the Litho/RenderCore rendering pipeline.

litho-rendercore-center · high confidence

New DebugSection class for UI inspector integration

The litho-sections-debug module now includes a new DebugSection class that exposes section hierarchy information (such as global keys, names, bounds, and state containers) to external debugging tools like Flipper or Stetho. This allows developers to visualize the Litho SectionTree structure within UI inspectors, providing better visibility into the component hierarchy during development.

litho-sections-debug · high confidence

New GlideRenderUnit for rendering network images

A new GlideRenderUnit has been added to the rendercore-glide module, enabling users to render network images using the Glide library. This component manages an ImageView, handling image loading, placeholder display, and error states via Glide, while integrating with the RenderUnit lifecycle for mounting and unbinding resources.

litho-rendercore-glide · high confidence

New Kotlin coroutine hooks for Litho components

This release introduces a new \litho-coroutines-kotlin\ module providing Kotlin-specific hooks to integrate Kotlin Coroutines with Litho components. Developers can now use \useCoroutine\ to launch background tasks that automatically cancel when keys change or the component detaches, \useFlow\ and \useFlowWithLifecycle\ to collect StateFlows into component state with lifecycle awareness, and \useComponentCoroutineScope\ to obtain a coroutine scope tied to a component's lifecycle. These hooks simplify asynchronous data handling and side-effect management in Litho components by leveraging Kotlin's coroutine infrastructure.

litho-coroutines-kotlin/src/main/kotlin · high confidence

New Kotlin widget bindings and Canvas primitive component

This release introduces a new \litho-widget-kotlin\ module providing idiomatic Kotlin builder functions for core Litho widgets, including \Border\, \Card\, \HorizontalScroll\, \Image\, \Progress\, \SolidColor\, \Text\, \TextInput\, and \VerticalScroll\. It also adds a Kotlin wrapper for \RecyclerCollectionComponent\ in the sections package and introduces a new \CanvasComponent\ primitive that enables 2D graphics drawing via a dedicated \CanvasScope\ API.

litho-widget-kotlin · high confidence

New Kotlin-based animation and dynamic style APIs in Litho

The \litho-core\ animation module has been rewritten in Kotlin, introducing a new \Animated\ object that provides \timing\ and \timingArgb\ methods for value and color animations, as well as \spring\, \sequence\, \parallel\, \stagger\, \loop\, and \delay\ composition helpers. A new \Easing\ object exposes standard interpolators and Bezier curve support. The \Style\ API now includes \rotationX\, \rotationY\, and \translationZ\ extension functions to support 3D transforms, alongside existing dynamic style properties like \alpha\, \backgroundColor\, and \elevation\. Additionally, the \useBinding\ hook allows components to create and manage \DynamicValue\ instances for imperative property updates and animation driving.

litho-core/src/main/java/com/facebook/litho/animated · high confidence

New Kotlin-based testing utilities for Litho integration tests

Added a suite of Kotlin helper classes and utilities to the Litho integration test module to support testing component lifecycles, mount items, and event handling. This includes LifecycleTracker for monitoring mount/bind/attach steps, MountItemTestHelper for constructing test MountItems, RenderAndMeasureCounter for tracking render performance, StateCaller for triggering state updates, and TrackingMountContentPool for monitoring pool usage. These tools provide developers with better visibility and control when writing integration tests for Litho components.

litho-it/src/main/java/com/facebook/litho · high confidence

New Litho Kotlin file templates for Events, Components, and Sections

The IntelliJ plugin now provides new file templates for Litho Kotlin development, including KComponent, PrimitiveComponent, Event, and GroupSectionSpec. These templates generate boilerplate code for creating Kotlin-based Litho components, handling events, and defining section hierarchies, with specific support for modern Kotlin APIs and SizeConstraints in primitive components.

litho-intellij-plugin/src/main/resources/fileTemplates · high confidence

New Litho debug infrastructure and overlay for tracking layout threads

This change introduces a new debug reporting API and visual overlay within the Litho core library to help developers identify performance issues, specifically layouts executing on the main thread. The new \DebugInfoReporter\ and \LithoDebugEvent\ classes provide structured logging for various lifecycle events (such as resolve, render, and tree future operations) with optional stack traces. Additionally, the \DebugOverlay\ component draws a visual indicator in the UI to show the history of layout resolutions, using red and green rectangles to distinguish between main-thread and background-thread layouts, aiding in the detection of jank caused by synchronous state updates or main-thread rendering.

litho-core/src/main/java/com/facebook/litho/debug · high confidence

New Litho permissions module with experimental hooks

A new \litho-permissions\ module has been added to the Litho framework, providing a \usePermission\ hook and associated \PermissionState\ interface for managing Android runtime permissions within Litho components. This feature allows developers to request permissions and observe their status changes directly in the component lifecycle, with the APIs marked as experimental.

litho-permissions · high confidence

New Litho template providers and extensible action framework

The Litho IntelliJ plugin now includes new template providers for Event, GroupSectionSpec, KComponent, and PrimitiveComponent, giving users additional options when generating Litho components. The template action system has been refactored to support an extensible provider model via the \TemplateProvider\ extension point and a post-processing extension via \ActionPostProcess\, allowing templates to be dynamically registered and processed after creation.

litho-intellij-plugin/src/main/java/com/facebook/litho/intellij/actions/templates · high confidence

New Material Design text input component with enhanced styling and event support

The litho-widget-material module now includes a new Material Design-based text input component (MaterialTextInputSpec) that wraps the Android Material TextInputLayout. This component supports advanced styling features such as custom color state lists for text and hints, text style and typeface customization, and configurable padding. It also introduces new event handlers for input focus changes, key events, and text pasting, along with support for autofill properties and counters. A custom MountableTextInputLayout class is included to properly delegate focus and click listeners to the underlying EditText.

litho-widget-material · high confidence

New RenderCore testing utilities for view hierarchy assertions

The \litho-rendercore-testing\ module introduces a suite of testing utilities for the RenderCore framework. This includes \RenderCoreTestRule\ and \RendercoreTestDriver\ to facilitate rendering \Node\ trees into \RootHost\ or \RenderTreeHost\ views for inspection. The module also provides \ViewAssertions\ and \MatchNode\ classes, allowing tests to assert that the rendered view hierarchy matches expected structures and properties. Supporting infrastructure includes \TestNode\, \SimpleLayoutResult\, and various wrapper units (\ViewWrapperUnit\, \DrawableWrapperUnit\) to construct test scenarios.

litho-rendercore-testing · high confidence

New RenderCore visibility extension module

A new \rendercore-visibility\ module has been added to provide visibility tracking for RenderCore components. This module introduces a \VisibilityExtension\ and \VisibilityMountExtension\ that monitor component visibility states, dispatching events such as \VisibleEvent\, \FocusedVisibleEvent\, \FullImpressionVisibleEvent\, and \InvisibleEvent\. It also provides a \VisibilityChangedEvent\ with detailed metrics including visible top/left coordinates, width/height, and percentage visibility. The module includes a \VisibilityBoundsTransformer\ interface to allow custom logic for determining visible bounds and handling occlusion.

litho-rendercore-visibility · high confidence

New codelab demonstrating GroupSection lifecycle methods

Added a new codelab that teaches developers how to use lifecycle methods in Litho GroupSections. The demo app visualizes the execution order of annotations such as @OnCreateInitialState, @OnCreateTreeProp, @OnCreateChildren, @OnDataBound, @OnDataRendered, @OnViewportChanged, @OnRefresh, @OnCreateService, @OnBindService, and @OnUnbindService. It includes a main view displaying a list of zodiac signs and a timeline view that logs each lifecycle event with timestamps, helping users understand when and how these methods are triggered during the section's lifetime.

codelabs/group-section-lifecycle · high confidence

New layout direction model and render-with-constraints component

Litho introduces a new \LayoutDirection\ value class to manage layout orientation (LTR, RTL, Inherit, Locale) and replaces the underlying Yoga direction model with this abstraction. Additionally, a new \RenderWithConstraints\ component is added, allowing developers to render content based on specific size constraints provided during the resolution phase.

litho-core/src/main/java/com/facebook/litho/layout · high confidence

New lifecycle and rendering annotations for Litho Sections

The \litho-sections-annotations\ module now includes a comprehensive set of new annotations to define the lifecycle and rendering behavior of Section components. Developers can use \@DiffSectionSpec\ and \@GroupSectionSpec\ to mark section types, while lifecycle hooks like \@OnCreateChildren\, \@OnDiff\, \@OnDataBound\, and \@OnDataRendered\ allow precise control over data binding and rendering. Service management is handled via \@OnCreateService\, \@OnBindService\, and \@OnUnbindService\. Additionally, \@OnViewportChanged\ provides visibility updates, \@OnRefresh\ handles content refresh requests, and \@OnVerifyChangeSet\ aids in debugging duplicate items in change sets.

litho-sections-annotations · high confidence

New litho-rendercore-transitions module for component animations

A new \litho-rendercore-transitions\ module has been added to the codebase, extracting and consolidating the transition and animation logic previously scattered across Litho and RenderCore. This module introduces core classes such as \TransitionManager\ to orchestrate animation states, \Transition\ and \TransitionSet\ (including \ParallelTransitionSet\ and \SequenceTransitionSet\) to define animation behaviors, and \AnimatableItem\ to expose necessary properties for animation. It also includes supporting infrastructure like \TransitionId\ for tracking animation targets, \OutputUnitsAffinityGroup\ for grouping layout and mount items, and an \AnimationInconsistencyDebugger\ for diagnosing animation state issues. This change provides a dedicated, self-contained location for managing component transitions within the RenderCore architecture.

litho-rendercore-transitions · high confidence

New primitive canvas model layer for drawing operations

The canvas module has been moved to \rendercore-primitive-components\ and now introduces a new model-based drawing system. This includes \CanvasModel\ to manage a tree of drawing commands, \CanvasGroup\ and \CanvasLayer\ to support nested transforms, clipping, and compositing (alpha/blending), and \CanvasTransform\ with \CanvasInverseTransform\ to handle coordinate transformations. The update also adds \CanvasPath\ for defining complex shapes (lines, arcs, rects, ellipses) and \CanvasShape\ for basic primitives, along with \CanvasShadowModel\ for shadows and \CanvasShadingModel\ (solid, linear, radial gradients) for fills.

canvas · high confidence

New primitive type utilities for blending, fill, and stroke styles

Added new Kotlin value classes in the utils module to manage rendering primitives: BlendingMode (alpha compositing modes like SrcOver, Multiply), FillRule (NonZero, EvenOdd), LineCap (Butt, Round, Square), and LineJoin (Miter, Round, Bevel). These classes provide type-safe wrappers around Android graphics constants, include string-parsing helpers (e.g., fromString), and offer applyTo methods to directly update Paint or Path objects, simplifying the configuration of visual styles in primitive components.

utils · high confidence

New useLiveData hook for observing LiveData in Litho components

A new Kotlin hook, useLiveData, is now available in the litho-live-data module, allowing Litho components to observe and react to changes in Android LiveData objects. The hook automatically manages the observation lifecycle based on the component's visibility (using AOSPLithoVisibilityEventsController) and supports dependency-based cancellation, simplifying the integration of reactive data streams into Litho UI trees.

litho-live-data/src/main · high confidence

New visibility style APIs for Litho components

This change introduces a new set of visibility-related style APIs in Litho, allowing developers to register callbacks for component visibility states such as onVisible, onInvisible, onFocusedVisible, onUnfocusedVisible, onFullImpression, and onVisibilityChanged. It also adds support for defining visibility ratios (visibleHeightRatio, visibleWidthRatio) and explicitly setting component visibility (VISIBLE/INVISIBLE) via the new visibility() style. These APIs are marked as experimental and are intended to provide more granular control over when and how visibility events are triggered for components.

litho-core/src/main/java/com/facebook/litho/visibility · high confidence

RenderCore sample app now supports remote layout definitions

The RenderCore sample application has been updated to demonstrate rendering layouts defined by remote JSON data. The app now includes a Gson-based layout adapter that parses JSON structures into RenderCore nodes, supporting Flexbox containers and Text components with configurable properties like padding, direction, and text styling. A sample layout repository simulates fetching this remote layout data, and the main activity integrates this with RenderState to display the parsed content, including a progress indicator during the loading phase.

litho-rendercore-sample · high confidence

Yoga C++ library now supports CMake builds with C++20 standard

The Yoga layout engine in lib/yoga/src/main/cpp now includes a CMake build configuration (CMakeLists.txt) alongside the existing BUCK build system. This change enables developers to build the library using CMake, which enforces the C++20 standard and links against Android-specific libraries (android, log). The BUCK build file has been updated to use a shared Skylark macro for defining C++ targets, ensuring consistency between the two build systems.

lib/yoga/src/main/cpp · high confidence

Yoga layout engine C++ API exposed via new C headers

The Yoga layout engine now exposes its public C API through a new set of headers (YGConfig, YGNode, YGNodeStyle, YGNodeLayout, YGEnums, YGValue, YGPixelGrid) and a CMake build target (yogacore). This provides a stable, versioned interface for configuration, node creation and manipulation, style setting, layout calculation, and result retrieval, enabling consumers to integrate Yoga via C/C++ without relying on internal implementation details.

lib/yoga/src/main/cpp/yoga · high confidence

Removals

Removal of Litho Stetho integration build target

The build configuration for the Litho Stetho integration has been removed. The \lib/stetho/BUCK\ file, which previously defined the \stetho\ Java library and its dependency on the \stetho-jar\, has been deleted. This change eliminates the local build target for this specific integration, aligning with the removal of Litho Stetho integrations mentioned in the commit history.

lib/stetho · high confidence

Removal of Mockito v1 build definition

The BUCK build file for the Mockito library has been deleted, effectively removing the v1 build definition from the project. This change is part of a broader migration to Skylark and the removal of legacy Mockito v1 components.

lib/mockito · high confidence

Removal of Robolectric 3 build targets

The build configuration for Robolectric 3 has been removed from the project. This change eliminates the specific BUCK targets previously used for testing with Robolectric 3, indicating a shift away from this version in the testing infrastructure.

lib/robolectric3 · high confidence

Removal of debug-mode Components testing and Stetho integration utilities

The debug build variant no longer includes the legacy \com.facebook.components\ testing infrastructure and Stetho debugging helpers. Specifically, the \ComponentViewDescriptor\, \ComponentsDescriptorProvider\, \ComponentsStethoManagerIMPL\, \StethoHitTestAccumulator\, and related Stetho node classes have been removed, along with the entire \testing\ subpackage containing \ComponentTestHelper\, \ComponentsRule\, various \Test\*Component\ classes, and the \ComponentsTestRunner\. This eliminates the ability to use these specific legacy tools for unit testing Components or inspecting component hierarchies via Stetho in debug builds.

src/debug · high confidence

Removal of deprecated CSSLayout and Android support build targets

The build configuration for the \lib/android-support\ location has been cleaned up by deleting the \BUCK\ files for both \CSSLayoutDEPRECATED\ and \android-support\. This removes the build targets for the deprecated CSSLayout library and the bundled Android support libraries (including support-v4, support-annotations, recyclerview, and vector-drawable), indicating that these dependencies are no longer required or managed through this specific build definition.

lib/android-support · high confidence

Removal of lib/powermock BUCK build file

The BUCK build configuration file for the lib/powermock module has been deleted. This change removes the build rules previously defined for this library, indicating that the module is no longer built or included in the project via this specific build target.

lib/android-all, lib/powermock · high confidence

Removal of local Android support library build rule

The BUCK build file for the lib/appcompat module has been deleted, removing the local android\_prebuilt\_aar rule that previously packaged the appcompat-v7-24.1.1.aar artifact. This indicates that the appcompat dependency is no longer built or managed within this specific location, likely having been moved to a different module or managed externally.

lib/appcompat · high confidence

Removal of local BUCK build file for textlayoutbuilder

The local BUCK build configuration for the textlayoutbuilder library has been removed. This file previously defined an android\_prebuilt\_aar target for version 1.0.0 of the library, indicating that the module is no longer built locally via this specific build rule and likely relies on external or transitive dependencies instead.

lib/textlayoutbuilder, lib/vtd-xml · high confidence

Removal of local BUCK build files

The local BUCK build configuration files for the assertj and bcprov-jdk16 libraries have been removed from the repository. This change eliminates the local build definitions for these dependencies, likely reflecting a shift in how these libraries are managed or consumed within the build system.

lib/assertj · high confidence

Architecture

Refactored layout algorithm into modular components

The layout logic in the algorithm module has been reorganized into distinct, focused files (such as AbsoluteLayout, Align, Baseline, BoundAxis, Cache, CalculateLayout, FlexDirection, FlexLine, PixelGrid, SizingMode, and TrailingPosition) to improve code structure and maintainability. This change introduces a new SizingMode abstraction to better align with CSS sizing concepts, refactors absolute positioning logic into its own module, and updates internal helper functions and enums for consistency. Users should see no functional changes, but the underlying layout engine is now more modular and easier to extend.

lib/yoga/src/main/cpp/yoga/algorithm · high confidence

Refactors flex layout property handling with dedicated data classes and writers

The flex layout engine in litho-core now uses new internal data classes, FlexContainerLayoutProps and FlexItemLayoutProps, to represent layout properties for containers and items respectively. These are populated by new writers, FlexContainerLayoutPropsWriter and FlexItemLayoutPropsWriter, which translate Litho node properties into FlexBoxStyle and FlexItemStyle builders. A new LithoFlexLayoutDataProvider orchestrates this process, reading from LithoNode and applying properties to the underlying flex layout engine. This refactoring separates property collection from style application, improving code organization and maintainability for flex layout behavior.

litho-core/src/main/java/com/facebook/litho/layout/flexlayout · high confidence

Behavioural changes

Add Litho plugin icon definitions

The Litho IntelliJ plugin now defines its visual assets through a new \LithoPluginIcons\ interface, which registers the Litho logo, the tool window icon, and an error action icon using SVG files. This change also updates the copyright headers from Facebook to Meta and switches to a yearless license header.

litho-intellij-plugin/src/main/java/icons · high confidence

Centralized Litho spec model management and template support in IntelliJ plugin

The Litho IntelliJ plugin now uses a centralized ComponentGenerateService to manage Spec models (Layout, Mount, GroupSection, and DiffSection) with caching and listener-based updates, ensuring generated Component files stay synchronized with source changes. A new LithoGeneratedFileProvider singleton handles file content generation and spec name resolution, while a TemplateService loads method completion templates from XML resources to improve code assistance.

litho-intellij-plugin/src/main/java/com/facebook/litho/intellij/services · high confidence

Compiler enforces Litho Hooks usage rules

The Litho compiler plugin now includes a new checker that validates Hooks usage at compile time. It prevents Hooks from being called inside conditional statements (such as if, for, while, or when) and restricts Hook calls to only render() methods or other methods annotated with @Hook. Violations result in specific compiler errors, helping developers catch incorrect Hook usage early.

litho-compiler-plugin/compiler/src/main/kotlin/com/facebook/litho/k2 · high confidence

Compiler enforces Litho frontend hook usage rules

The Litho compiler now includes a frontend hook usage checker that validates hook calls at compile time. It prevents hooks from being invoked inside conditional statements (if/when) or loops, and ensures they are only called directly within render methods or other functions explicitly annotated as hooks. This helps catch common misuse patterns early, improving code stability and adherence to Litho's component lifecycle rules.

litho-compiler-plugin/compiler/src/main/kotlin/com/facebook/litho/k1 · high confidence

Compiler hook validation and zoomable view touch handling improvements

The Litho compiler plugin now enforces strict rules for hooks, reporting errors if they are called from conditionals or outside of render() and @Hook methods. In the zoomable widget, the implementation now supports multiple zoom components on a single screen and disables touch interaction in the carousel while a zoom is active to prevent gesture conflicts.

repository · medium confidence

Configure litho-it integration test module with SDK 33 target

The litho-it integration test module now includes an AndroidManifest and BUCK build definition that explicitly sets the target SDK version to 33. This ensures that integration tests run against a consistent and recent Android platform version, aligning with the project's move to keep Litho tests on SDK 33.

litho-it/src/main · high confidence

Core utility classes migrated to Kotlin

Several internal utility classes in the litho-core module, including IncrementalMountUtils, MeasureUtils, MapDiffUtils, StacktraceHelper, and VersionedAndroidApis, have been rewritten in Kotlin. This migration maintains the existing public API and behavior for users while modernizing the internal implementation.

litho-core/src/main/java/com/facebook/litho/utils · high confidence

Drawable comparison logic migrated to Kotlin

The drawable implementation classes in litho-core (including ComparableDrawable, ComparableColorDrawable, ComparableGradientDrawable, BorderColorDrawable, and ComparableDrawableWrapper) have been converted from Java to Kotlin. This change introduces a ComparableDrawable interface that allows drawables to be compared by content rather than reference, enabling more accurate equality checks for Litho's rendering and caching logic.

litho-core/src/main/java/com/facebook/litho/drawable · high confidence

Editor model types refactored to Kotlin data classes

The Litho editor's core model classes (EditorString, EditorNumber, EditorBool, EditorColor, EditorShape, and EditorPick) have been converted from standard Java-style classes to Kotlin data classes using the @DataClassGenerate annotation. This change simplifies the implementation of value types by automatically generating equals, hashCode, and toString methods, while maintaining the existing visitor pattern (EditorVisitor) and tree traversal capabilities (whenPrimitive, aggregate) defined in the EditorValue base class.

litho-editor-core/src/main/java/com/facebook/litho/editor/model · high confidence

Enable layout diffing by default in ComponentTree

Layout diffing is now enabled by default when creating a ComponentTree, improving rendering performance by automatically detecting and applying only the necessary changes to the UI tree rather than re-rendering unchanged components.

src/main · high confidence

Enhanced Litho navigation and usage finding in IntelliJ

The Litho IntelliJ plugin now provides deeper code navigation and usage-finding capabilities. Developers can navigate directly from Component and Section declarations to their corresponding Spec classes, and from Component methods to Spec methods or Props. The plugin also improves 'Find Usages' for Spec classes by including references to the generated Component classes and excluding the generated class itself from search results to reduce noise. Additionally, navigation support has been extended to Kotlin files.

litho-intellij-plugin/src/main/java/com/facebook/litho/intellij/navigation · high confidence

Introduce Canvas Primitive and supporting utilities in rendercore-primitive-components

The canvas module and its utility types have been moved from rendercore-mountables to rendercore-primitive-components, establishing a shared Canvas Primitive for frameworks built on RenderCore like Litho and Bloks. This primitive component allows developers to define drawing commands via a model provider, handling layout and mounting through the RenderCore primitive API, while a dedicated CanvasView executes the drawing. To support this, the utils module now exposes lightweight value types for coordinates (Point) and dimensions (Size), as well as CanvasLayerType for managing hardware/software layering, ensuring efficient rendering and compatibility across Android versions.

litho-rendercore-primitive-components · high confidence

Introduces compiler configuration and type definitions for the Litho compiler plugin

The Litho compiler plugin now supports explicit configuration via command-line options, including an 'enabled' flag to activate the plugin and an 'internal.debug' flag for debug mode. Additionally, a centralized namespace (LithoNames) has been added to define core Litho type references (such as Component, KComponent, and Hook) used by the compiler, establishing the foundational structure for plugin behavior.

litho-compiler-plugin/compiler/src/main/kotlin/com/facebook/litho/common · high confidence

Introduction of experimental API and unconditional method annotations

Litho introduces three new annotations to manage API stability and execution constraints. The \ExperimentalLithoApi\ annotation marks declarations as experimental, requiring explicit opt-in from developers due to potential future changes or deprecation. The \Unconditional\ annotation defines methods that must be called unconditionally and only from other unconditional methods to preserve identity and consistency, serving as a broader category for hooks. Additionally, the \Hook\ annotation is now explicitly marked as \@Unconditional\, clarifying its execution constraints within the Litho lifecycle.

litho-core/src/main/java/com/facebook/litho/annotations · high confidence

Layout invalidation on configuration changes

The Yoga configuration object now tracks a version number that increments whenever key settings—such as experimental features, errata, point scale factor, or web defaults—are modified. A new utility function, \configUpdateInvalidatesLayout\, allows the system to detect when a node's configuration has changed in a way that requires recalculating its layout, ensuring that style updates automatically trigger fresh layout passes rather than relying on stale cached results.

lib/yoga/src/main/cpp/yoga/config · high confidence

Litho 0.51.0 introduces first-draw reporting and updates testing APIs

Version 0.51.0 adds the \useFirstDrawReporter\ hook and \Style.reportFirstContentDraw\ to allow applications to execute actions when a component is fully rendered, which is useful for marking Time to Relevant Content (TTRC) or Time to Interactive (TTI) metrics. This release also includes a breaking change in the testing module: \LegacyLithoViewRule\ has been removed from \com.facebook.litho.testing\, and users must migrate to \LithoTestRule\ and \TestLithoView\. The project also officially switches its license from BSD to Apache-2.0 and updates the minimum SDK version to 24.

(repo-wide) · high confidence

Litho Editor core rewritten in Kotlin with K2 compiler support

The Litho Editor module has been migrated from Java to Kotlin, introducing new Kotlin source files (Editor.kt, EditorRegistry.kt, Reflection.kt, SimpleEditor.kt) and a corresponding BUCK build definition. This change enables the K2 Kotlin compiler for the module and updates the build targets to include the Kotlin standard library, while preserving the existing editor functionality for debugging component fields via reflection.

litho-editor-core/src/main/java/com/facebook/litho/editor · high confidence

Litho Editor instances rewritten in Kotlin with expanded type support

The editor instance implementations in the litho-editor-core module have been converted from Java to Kotlin, improving maintainability and interoperability with modern Android development practices. This migration also introduces support for editing additional data types, including atomic variables (AtomicBoolean, AtomicInteger, AtomicReference), collections (List, Map), generic objects, and Android-specific types like android.util.Size and ComparableColorDrawable. Users can now edit these complex types directly within the Litho editor, with proper handling of null values, type conversions, and nested property editing.

litho-editor-core/src/main/java/com/facebook/litho/editor/instances · high confidence

Litho IntelliJ plugin adopts new PSI-based spec model processors

The Litho IntelliJ plugin now uses a new set of PSI-based processors to parse Litho spec classes (LayoutSpec, MountSpec, DiffSectionSpec, GroupSectionSpec) and extract their models. This change introduces dedicated extractors for annotations, events, triggers, delegate methods, fields, and type variables, replacing the previous parsing logic. The new implementation improves robustness by using a custom annotation proxy utility to handle enums and hash codes correctly, and adds support for extracting dynamic value binding methods and event declarations from spec annotations.

litho-intellij-plugin/src/main/java/com/facebook/litho/specmodels · high confidence

Litho IntelliJ plugin refactors core utilities and adds navigation support

The Litho IntelliJ plugin has been restructured with new utility classes: LithoPluginUtils centralizes helper methods for identifying Litho components, specs, and annotations; PsiSearchUtils provides a unified interface for searching PSI classes with mock support for testing; and LithoClassNames defines constants for Litho class names. Additionally, IntervalLogger was added for performance logging, and the plugin now supports navigation in Kotlin files and includes a quick-fix to insert EventHandler arguments.

litho-intellij-plugin/src/main/java/com/facebook/litho/intellij · high confidence

Litho Spec API annotations overhaul and lifecycle expansion

The Litho annotations library has been significantly updated to support new component lifecycle hooks and refined event handling. New annotations include @OnAttached and @OnDetached for resource management during component tree attachment, @OnCalculateCachedValue and @CachedValue for optimized value caching, and @OnBindDynamicValue for applying dynamic prop changes. Event handling is enhanced with @OnTrigger and @FromTrigger for parent-to-child event dispatching, while @EventHandlerRebindMode allows controlling event handler rebinding behavior. The API also introduces @Comparable for fine-grained equivalence checking in isEquivalentTo calls, @ShouldAlwaysRemeasure and @ShouldExcludeFromIncrementalMount for layout optimization control, and @OnError for child component error handling. Several legacy annotations (@FromBind, @FromCreateLayout, @OnLayoutTransition) have been removed, and the @Event annotation now supports a rebind mode parameter. The build configuration has also been migrated to use Skylark/Buck2 definitions with Apache 2.0 licensing.

litho-annotations/src/main/java/com/facebook/litho · high confidence

Litho annotation processor refactoring and spec model consolidation

The litho-processor module has undergone extensive internal refactoring to consolidate spec models, improve validation, and support new lifecycle features. Key changes include the migration of state management to a unified StateContainer interface, the introduction of support for @OnUpdateStateWithTransition and @OnCalculateCachedValue, and the removal of legacy APIs such as @InjectProp and @FromCreateLayout. The processor now generates more robust error messages, validates inter-stage props and delegate methods more strictly, and supports Kotlin-specific features like @PropDefault. Additionally, the build system has been updated to use Skylark (Starlark) for BUCK files, and the processor now supports ABI generation from source.

litho-processor · high confidence

Litho compiler plugin now supports K2 and configurable command-line options

The Litho compiler plugin has been updated to support the new Kotlin K2 compiler frontend (in addition to the legacy K1 frontend) and introduces configurable command-line options to control its behavior. Users can now enable the plugin and toggle a debug mode via compiler arguments (e.g., \-Xplugin:com.facebook.litho.compiler:enabled=true\), which allows for more granular control over the compilation process and integration with modern Kotlin toolchains.

litho-compiler-plugin/compiler/src/main/kotlin/com/facebook/litho · high confidence

Litho configuration system migrated to Kotlin with new component equality modes

The Litho configuration module has been converted to Kotlin, consolidating settings into a new \ComponentsConfiguration\ data class and introducing \ComponentEqualityMode\ to allow optimized equality checks for \LayoutSpec\ and spec-generated components. This change also adds new configuration options for pre-allocation handling, primitive recycler binder strategies, and visibility processing, while removing several legacy configuration flags.

litho-core/src/main/java/com/facebook/litho/config · high confidence

Litho core refactors and Kotlin migration

The Litho core library has undergone extensive internal refactoring and a large-scale migration of implementation classes to Kotlin. This includes converting key components such as ComponentTree, ComponentContext, LayoutState, and various utility classes to Kotlin, alongside renaming and simplifying internal APIs (e.g., CalculationStateContext to CalculationContext, EventHandlersController2 to EventHandlersController). The changes also involve cleaning up unused configuration flags, removing deprecated methods, and improving thread safety and performance through optimizations like pre-allocation and better state handling. These updates are primarily internal improvements to enhance code maintainability, performance, and consistency, with minimal impact on public APIs.

litho-core/src/main/java/com/facebook/litho · high confidence

Litho documentation website migrated to Docusaurus v2

The Litho documentation site has been rebuilt using Docusaurus v2, replacing the previous static site generator. This migration introduces a modern React-based architecture, enabling features such as MDX support for mixing Markdown with JSX components, a redesigned sidebar navigation, and a new landing page with responsive video embedding. The site now includes a custom \VersionedCodeBlock\ component to automatically inject current library versions into code snippets, and it supports both light and dark themes for code highlighting. Configuration files for Prettier, Babel, and Algolia search have been added to streamline development and improve documentation discoverability.

website · high confidence

Litho performance logging interfaces moved to new module

The core interfaces for Litho's performance logging—ComponentsLogger, FrameworkLogEvents, and PerfEvent—have been extracted into the new litho-perf-logger module and converted to Kotlin. This change decouples the logging API definitions from the core Litho library, providing a standalone module that defines the contracts for tracking performance events and framework logs, which is a prerequisite for enabling the K2 compiler in dependent targets.

litho-perf-logger · high confidence

LithoPerfBooster and Factory converted to Kotlin

The LithoPerfBooster interface and LithoPerfBoosterFactory class in the litho-core module have been rewritten from Java to Kotlin. This change updates the internal implementation language for these performance optimization components but does not alter their public API or behavior for users.

litho-core/src/main/java/com/facebook/litho/perfboost · high confidence

LithoStats implementation migrated to Kotlin

The LithoStats object, which provides global counters for Litho internals such as state updates, layout calculations, and mount operations, has been rewritten in Kotlin. This change maintains the existing public API and behavior for performance analysis while updating the underlying implementation language.

litho-core/src/main/java/com/facebook/litho/stats · high confidence

LithoYogaFactory converted to Kotlin

The LithoYogaFactory, which provides static methods for creating YogaConfig and YogaNode instances, has been rewritten from Java to Kotlin. This change maintains the same public API and behavior for users while updating the implementation language.

litho-core/src/main/java/com/facebook/litho/yoga · high confidence

Migrate Litho barebones sample to Kotlin

The sample-barebones application has been rewritten from Java to Kotlin. This update replaces the legacy Java components (such as FeedItemSpec and the old SampleActivity) with new Kotlin equivalents (ListItemSpec and a modernized SampleActivity), updates the AndroidManifest to reflect the new package name and metadata, and removes the obsolete BUCK build files in favor of the current build configuration.

sample-barebones · high confidence

Migrate Yoga JNI bindings to vanilla JNI with C++20 and CMake

The Yoga JNI bindings in lib/yogajni have been refactored to remove the dependency on fbjni, replacing it with a new 'vanilla JNI' implementation that manages local and global references via custom smart pointers (ScopedLocalRef, ScopedGlobalRef) and handles exceptions through a dedicated YogaJniException class. This change upgrades the C++ standard to C++20, introduces a CMake-based build system for the native layer, and reorganizes the JNI method registrations and node management logic to improve stability and reduce crashes related to reference management and garbage collection.

lib/yogajni/src · high confidence

Migrate Yoga library to Apache 2.0 license and update build configuration

The Yoga library has switched its license from BSD-style to Apache 2.0. The build system has been updated to use the new \litho\_android\_library\ definition, which explicitly sets the language to JAVA and configures ProGuard rules to preserve the \@com.facebook.yoga.annotations.DoNotStrip\ annotation. Additionally, the build now explicitly depends on the \com.facebook.yoga:proguard-annotations\ library (version 1.14.1) to handle these annotations, replacing previous bundled or implicit definitions.

lib/yoga · high confidence

Migrate litho-widget to pure Kotlin

The litho-widget module has been converted from Java to Kotlin, making it a pure Kotlin library. This change includes the conversion of core components and utilities such as RecyclerBinder, SectionsRecyclerView, and various layout helpers, along with the migration of configuration classes like ComponentsConfiguration to Kotlin. For users, this modernizes the codebase, improves interoperability with Kotlin-first projects, and may require updating build configurations to support Kotlin compilation.

litho-widget · high confidence

Migrate yogajni build to Apache 2.0 license and Gradle-friendly structure

The yogajni library build configuration has been updated to use the Apache 2.0 license instead of the previous BSD-style license. Additionally, the build system has been refactored to use Skylark macros via \litho\_defs.bzl\, moving the source to a Gradle-friendly location and replacing native C++ library definitions with custom macros to improve compatibility with modern build tools.

lib/yogajni · high confidence

New Kotlin-based ViewStyles implementation for Litho components

The Litho core library introduces a new Kotlin file, ViewStyles.kt, which defines the internal style item structures (ObjectStyleItem, FloatStyleItem, DimenField) and their application logic for View properties. This change consolidates the handling of various view attributes—including click handlers, focus events, touch interception, alpha, rotation, elevation, and system gesture exclusion zones—into a unified, type-safe Kotlin implementation. For users, this represents a foundational shift in how view styles are processed internally, likely improving performance and reducing app size through Kotlin-specific optimizations like inlining, while maintaining compatibility with existing style APIs.

litho-core/src/main/java/com/facebook/litho/view · medium confidence

New build configuration for incremental mount and debug builds

A new build configuration file (config/build\_config\_values) has been introduced to define build-time flags. It enables the incremental mount helper by default and sets the internal build status based on the debug mode, allowing the application to behave differently depending on whether it is a debug or release build.

config · medium confidence

Refactored Yoga layout engine with new C++ node architecture and display: contents support

The Yoga layout engine in this location has been significantly refactored, introducing new C++ structures like \LayoutResults\ and \CachedMeasurement\ to manage layout state and caching, and a \LayoutableChildren\ iterator that automatically skips nodes with \display: contents\. This change also implements support for the \display: contents\ CSS style, allowing elements to be invisible in the layout tree while their children remain, and updates the \Node\ API to use modern C++ conventions (e.g., \style()\ instead of \getStyle()\, \hasDefiniteLength()\). Additionally, the layout calculation now respects config versioning to invalidate caches when configuration changes, and includes fixes for edge cases involving \row-reverse\ flex directions and percentage-based sizing.

lib/yoga/src/main/cpp/yoga/node · high confidence

Refactored numeric utilities with FloatOptional and comparison helpers

The numeric module now includes new header files defining a FloatOptional type and dedicated comparison utilities. FloatOptional wraps a float value, allowing code to explicitly handle undefined (NaN) states via isDefined/isUndefined checks and providing operators for arithmetic and equality. The Comparison.h header introduces constexpr functions for checking undefined/defined states, infinity, and inexact equality (using a hardcoded epsilon of 0.0001f) for floats, doubles, and arrays. These changes support more robust handling of optional numeric values in style resolution and other internal calculations.

lib/yoga/src/main/cpp/yoga/numeric · high confidence

Refactored style storage to use value handles and pools

The internal representation of style values has been replaced with a new system using \StyleValueHandle\ and \StyleValuePool\. This change introduces compact storage for style properties (such as dimensions, gaps, and flex values) by embedding simple values directly in 16-bit handles or storing them in a pooled buffer, replacing the previous \CompactValue\ and array-based indexing mechanisms. This restructuring improves memory efficiency and simplifies how style properties like margins, padding, and dimensions are stored and resolved.

lib/yoga/src/main/cpp/yoga/style · high confidence

Refines Binder Style API with explicit View and HostView mount callbacks

The Binder Styles API in litho-core has been restructured to provide clearer separation between generic content binding and view-specific mounting. The previous \onBind\ and \onBindView\ methods have been renamed to \onBindWithDescription\ and \onBindViewWithDescription\ respectively to emphasize the requirement for dependency tracking and debugging names. A new \onBindHostViewWithDescription\ style has been introduced, allowing binders to be applied specifically to a wrapped \HostView\ even if the component renders a standard \View\. Additionally, the older, less explicit overloads of \onBind\ and \onBindView\ that lacked dependency parameters have been deprecated with an error level to enforce safer usage patterns.

litho-core/src/main/java/com/facebook/litho/binders · high confidence

Removal of libfb BUCK build file

The BUCK build configuration file for the libfb library has been removed from the project. This change eliminates the legacy build rules previously used to compile this component, indicating a shift away from the BUCK build system for this specific library.

lib/fb · high confidence

Removal of local BUCK build files for javapoet and commons-cli

The local BUCK build definitions for the javapoet and commons-cli libraries have been removed from the repository. This change eliminates the manual build rules that previously defined these dependencies as prebuilt JARs with specific visibility scopes, indicating a shift in how these libraries are managed or integrated into the build system.

lib/javapoet · high confidence

Removal of local Fresco dependency definitions

The local BUCK build file for the Fresco library has been removed, eliminating the hardcoded definitions for Fresco 1.1.0 artifacts (including fresco, drawee, imagepipeline, and bolts) that were previously fetched via remote\_file targets. This change indicates that the Fresco dependency is no longer managed locally within this specific build configuration, likely shifting to an external or centralized dependency management strategy.

lib/fresco · high confidence

Removal of local M2 repository dependency for fbcore

The local build configuration for the fbcore library has been updated by removing the BUCK file that previously defined the target as a remote file fetched from a local Maven (M2) repository. This change eliminates the manual download and caching of the com.facebook.fresco:fbcore:1.1.0 AAR artifact via a remote\_file rule, simplifying the build dependency management for this component.

lib/fbcore · high confidence

Removed local M2 repository BUCK files

The BUCK build files for the lib/objenesis and lib/sqlite libraries have been removed. This change eliminates the local Maven repository dependency definitions for these modules, aligning with the broader migration of build configurations away from local M2 repo dependencies.

lib/objenesis · high confidence

Removed local M2 repository dependency build files

The BUCK build configuration files for the lib/asm and lib/junit modules have been deleted. This change removes the local Maven repository dependency definitions for these libraries, aligning with the migration of build definitions to Skylark and the adoption of fb\_java\_library targets.

lib/asm, lib/junit · high confidence

Reorganized debug logging and assertion infrastructure

The debug subsystem has been restructured to use a new C++ logging API. The default logger now routes messages to Android's logcat on Android platforms and falls back to standard streams (stderr for errors/fatals, stdout for others) on non-Android platforms. Fatal assertions now consistently log the message before terminating (via exception or std::terminate), and the logging functions support contextual output by accepting optional Node or Config references to include in the log output.

lib/yoga/src/main/cpp/yoga/debug · high confidence

Update license and build configuration for litho-annotations

The litho-annotations module now uses the Apache 2.0 license instead of the previous BSD-style license. The build configuration has been updated to load definitions from the new Skylark-based DEFS.bzl file and uses the fb\_java\_binary rule instead of the standard java\_binary, aligning with the project's migration to Skylark build rules.

litho-annotations · high confidence

View compatibility components migrated to Kotlin

The \SimpleViewBinder\, \ViewBinder\, and \ViewCreator\ classes in the \litho-core\ view compatibility layer have been converted from Java to Kotlin. This change updates the internal implementation language for these view binding and creation utilities, which may affect how they are extended or implemented in Kotlin-based projects, while maintaining the same public API surface for binding data to views and creating view instances.

litho-core/src/main/java/com/facebook/litho/viewcompat · high confidence

Yoga Java bindings refactored with new API surface and structural changes

The Yoga Java bindings have been significantly restructured, introducing new factory classes (YogaConfigFactory, YogaNodeFactory) for creating instances and replacing the previous direct instantiation patterns. The API now exposes new enums such as LayoutPassReason, YogaDisplay (including CONTENTS support), YogaGutter, and YogaErrata, while adding support for CSS features like justify-content: space-evenly, align-content: space-evenly, and display: contents. The YogaNode interface has been updated with new methods for cloning (cloneWithChildren, cloneWithoutChildren), reference baselines, and owner tracking, alongside deprecated getParent in favor of getOwner. Configuration options have shifted, with experimental features now managed via YogaExperimentalFeature enum and errata support added. The native interface has been consolidated into YogaNative with vanilla JNI bindings, and several legacy APIs and experimental flags have been removed or deprecated.

lib/yoga/src/main/java · high confidence

Yoga layout engine adopts scoped C++ enums

The Yoga layout engine has migrated its internal configuration and style values from unscoped C enums to strongly typed, scoped C++ enums (e.g., \Align\, \FlexDirection\, \Display\). This change improves type safety and reduces naming collisions within the \facebook::yoga\ namespace. The update includes generated header files for all enum categories (such as \Align\, \BoxSizing\, \Dimension\, \Direction\, \Display\, \Edge\, \Errata\, \ExperimentalFeature\, \FlexDirection\, \Gutter\, \Justify\, \LogLevel\, \MeasureMode\, \NodeType\, \Overflow\, \PhysicalEdge\, \PositionType\, \Unit\, and \Wrap\) and provides utility functions for conversion between scoped and unscoped types, as well as iteration over enum values.

lib/yoga/src/main/cpp/yoga/enums · high confidence

Test coverage

Add BUCK build configuration for Litho IntelliJ plugin tests; Add BUCK build rule for Litho integration test resources; Add Litho Sections integration test components and build target; Add processor integration test resources for Litho specs; Added BUCK build configuration for Litho LiveData tests; Added Litho integration test components for state updates; Added Mockito inline mock maker configuration for integration tests; Added Robolectric configuration for SDK 33; Added compiler plugin test infrastructure and initial test coverage; Added instrumentation test for TTI RenderCompleteEvents; Added instrumentation tests for Litho Espresso matchers; Added instrumentation tests for Section TreeProp propagation; Added instrumentation tests for TreeProp propagation in Litho Sections; Added integration test resources for Section processor; Added integration tests for Litho event triggers; Added integration tests for Litho testing utilities; Added test components for Litho error handling scenarios; Added test coverage for DI-enabled generic Components; Added test data classes for processor validation; Added test fixtures for Litho component and section spec classes; Added test fixtures for Litho inspection annotators; Added test infrastructure for TreeProp propagation in Sections and Components; Added test layout specs for state reading and update verification; Added test processor API for compiler self-checking; Added test resources for Litho Hooks usage and misuse validation; Added test utilities for parsing compiler test files; Added testing infrastructure for Litho annotation processors; Added testing widget components for Litho integration tests; Added tests for LayoutScope effects in Litho integration tests; Added tests for Litho IntelliJ plugin completion contributors; Added tests for Litho animation and DynamicValue styles; Added tests for Litho editor Flipper prop data extraction; Added tests for Litho spec model code generators; Added tests for Litho widget and layout components; Added tests for LithoHookUsageChecker; Added tests for PsiTypeUtils class name and wildcard handling; Added tests for binder style binding and unbinding behavior; Added tests for state read tracking in resolve and layout phases; Added tests for the DebounceEventLogger; Added unit tests for AnnotatorUtils; Added unit tests for Flexbox style application and compatibility; Added unit tests for Litho Kotlin Coroutines APIs; Added unit tests for Litho Sections core components; Added unit tests for Litho accessibility styles and animation transitions; Added unit tests for Litho component lifecycle and styling; Added unit tests for Litho utility classes; Added unit tests for LithoPluginUtils; Added unit tests for LiveData observation with default LifecycleOwner; Added unit tests for RenderWithConstraints behavior; Added unit tests for ViewStyles and migrated to LithoTestRule; New Litho Espresso testing utilities for instrumentation tests; New test utilities for Litho instrumentation and screenshot testing; Removed legacy Components test suite; Updated test fixtures for Litho IntelliJ plugin completion.

Dependencies

Add Gradle build configuration for Litho codelabs

Added Gradle build files for the Litho codelabs (events, group-section-lifecycle, hello-world, hscroll-height, layout-spec, mount-spec, props), configuring them to use Litho version 0.26.1, Kotlin 1.3.21, and Android Gradle Plugin 3.3.2/3.4.1. These files establish the necessary dependencies (litho-core, litho-widget, litho-processor, etc.) and build settings to allow developers to run and experiment with the codelab examples.

(dependencies) · high confidence

Upgrade Gradle wrapper to version 8.1

The project's Gradle wrapper has been updated to use Gradle 8.1 (specifically the 'all' distribution). This ensures that builds will now run using the Gradle 8.1 runtime, which may bring changes to build performance, plugin compatibility, and build script syntax requirements compared to previous versions.

gradle · high confidence

Upgrade SoLoader dependencies to v0.10.5 and migrate build definitions

The SoLoader library has been updated to version 0.10.5, including its nativeloader and annotation components, which are now fetched as remote Maven artifacts. The build configuration has been migrated from the legacy \android\_prebuilt\_aar\ rule to the \litho\_android\_library\ definition, and the build system now uses \fb\_prebuilt\_jar\ and \fb\_native\_wrapper\ instead of the older \fb\_native.prebuilt\_jar\ and direct \fb\_native\ calls. Additionally, the license header has been updated to Apache 2.0.

lib/soloader · high confidence

Upgrade infer-annotations to version 0.18.0

The bundled infer-annotations library has been updated from version 4.0 to 0.18.0, fetched remotely via Maven. This upgrade brings new capabilities, including the @Cleanup annotation, and shifts the build definition to use the new fb\_prebuilt\_jar rule and Apache-2.0 license headers.

lib/infer-annotations · high confidence

Housekeeping

Added build configuration and documentation for litho-flexlayout

The litho-flexlayout module now includes a .gitignore file to exclude build artifacts, a proguard-rules.pro file to preserve classes annotated with @DoNotStrip during code shrinking, and a module-docs.md file for module documentation.

litho-flexlayout · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 40 → 53 (+12.9)
  • Rubric changed (rubric-2026.08.15 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 64 → 85 (+21.7)
  • Architecture 94 → 99 (+4.9)
  • Maturity 59 → 69 (+9.8)
  • Readiness 16 → 38 (+21.8)
  • Security 58 → 55 (-2.8)

Resolved (88)

  • Coverage not measured — test suite did not build
  • Dimension evaluation failed
  • Duplicated block (10 lines × 2) (litho-core/src/main/java/com/facebook/litho/TestLayoutState.kt)
  • Duplicated block (11 lines × 2) (litho-it/src/main/java/com/facebook/litho/widget/LayoutSpecConditionalReParentingSpec.kt)
  • Duplicated block (11 lines × 2) (litho-rendercore/src/main/java/com/facebook/rendercore/MountDelegate.kt)
  • Duplicated block (11 lines × 2) (sample/src/main/java/com/facebook/samples/litho/kotlin/animations/animatedbadge/AnimatedBadgeKotlin.kt)
  • Duplicated block (13 lines × 2) (litho-core/src/main/java/com/facebook/litho/NodeInfo.kt)
  • Duplicated block (13 lines × 2) (litho-core/src/main/java/com/facebook/litho/NodeInfo.kt)
  • Duplicated block (13 lines × 2) (litho-core/src/main/java/com/facebook/litho/NodeInfo.kt)
  • Duplicated block (14 lines × 2) (litho-core/src/main/java/com/facebook/litho/NodeInfo.kt)
  • Duplicated block (14 lines × 2) (sample/src/main/java/com/facebook/samples/litho/java/communicating/ParentComponentSendsEventToChildComponent.kt)
  • Duplicated block (14 lines × 2) (sample/src/main/java/com/facebook/samples/litho/kotlin/animations/animatedapi/AnimatedComponent.kt)
  • Duplicated block (15 lines × 2) (litho-rendercore/src/main/java/com/facebook/rendercore/Dimen.kt)
  • Duplicated block (16 lines × 2) (litho-widget/src/main/java/com/facebook/litho/widget/Recycler.kt)
  • Duplicated block (20 lines × 2) (litho-widget/src/main/java/com/facebook/litho/widget/Recycler.kt)
  • Duplicated block (20 lines × 3) (litho-rendercore/src/main/java/com/facebook/rendercore/MountDelegate.kt)
  • Duplicated block (21 lines × 2) (litho-core/src/main/java/com/facebook/litho/LithoReducer.kt)
  • Duplicated block (22 lines × 2) (litho-rendercore/src/main/java/com/facebook/rendercore/utils/SynchronizedTypefaceHelper.kt)
  • Duplicated block (23 lines × 3) (litho-widget/src/main/java/com/facebook/litho/widget/TextComponentSpec.kt)
  • Duplicated block (24 lines × 2) (litho-core/src/main/java/com/facebook/litho/LithoNodeUtils.kt)
  • …and 68 more

New (650)

  • 1.matches (cyclomatic 16) (litho-testing/src/main/java/com/facebook/litho/BaseMatcherBuilder.java)
  • BaseMountingView.dispatchVisibilityEvent (cognitive 26) (litho-core/src/main/java/com/facebook/litho/BaseMountingView.kt)
  • BatchedTarget.dispatchLastEvent (cognitive 29) (litho-sections-core/src/main/java/com/facebook/litho/sections/BatchedTarget.java)
  • BuilderGenerator.generateBuilder (cognitive 29) (litho-processor/src/main/java/com/facebook/litho/specmodels/generator/BuilderGenerator.java)
  • BuilderGenerator.generateBuilder (cyclomatic 22) (litho-processor/src/main/java/com/facebook/litho/specmodels/generator/BuilderGenerator.java)
  • BuilderGenerator.generatePropsBuilderMethods (cognitive 18) (litho-processor/src/main/java/com/facebook/litho/specmodels/generator/BuilderGenerator.java)
  • BuilderGenerator.generatePropsBuilderMethods (cyclomatic 22) (litho-processor/src/main/java/com/facebook/litho/specmodels/generator/BuilderGenerator.java)
  • CachedValueValidation.validate (cognitive 23) (litho-processor/src/main/java/com/facebook/litho/specmodels/model/CachedValueValidation.java)
  • CanvasState.configureStrokePaint (cognitive 24) (litho-rendercore-primitive-components/canvas/src/main/java/com/facebook/primitive/canvas/CanvasState.kt)
  • CanvasState.configureStrokePaint (cyclomatic 19) (litho-rendercore-primitive-components/canvas/src/main/java/com/facebook/primitive/canvas/CanvasState.kt)
  • CanvasStroke.equals (cognitive 17) (litho-rendercore-primitive-components/canvas/src/main/java/com/facebook/primitive/canvas/model/CanvasModel.kt)
  • CanvasStroke.equals (cyclomatic 16) (litho-rendercore-primitive-components/canvas/src/main/java/com/facebook/primitive/canvas/model/CanvasModel.kt)
  • Change coupling: Layout.kt ↔ ResolveTreeFuture.kt (litho-core/src/main/java/com/facebook/litho/Layout.kt)
  • Change coupling: Layout.kt ↔ TestLayoutState.kt (litho-core/src/main/java/com/facebook/litho/Layout.kt)
  • Change coupling: RenderCoreTestRule.java ↔ RendercoreTestDriver.java (litho-rendercore-testing/src/main/java/com/facebook/rendercore/testing/RenderCoreTestRule.java)
  • Change coupling: YogaConfig.java ↔ YogaNative.java (lib/yoga/src/main/java/com/facebook/yoga/YogaConfig.java)
  • ChangeSetState.generateChangeSetRecursive (cognitive 46) (litho-sections-core/src/main/java/com/facebook/litho/sections/ChangeSetState.java)
  • ChangeSetState.generateChangeSetRecursive (cyclomatic 25) (litho-sections-core/src/main/java/com/facebook/litho/sections/ChangeSetState.java)
  • ClassTooLong: BaseMountingView (litho-core/src/main/java/com/facebook/litho/BaseMountingView.kt)
  • ClassTooLong: BuilderGenerator (litho-processor/src/main/java/com/facebook/litho/specmodels/generator/BuilderGenerator.java)
  • …and 630 more

Architecture

  • Containers 0 added · 0 removed · contexts 30 added · 0 removed · edges 68 added · 0 removed

Added bounded contexts (30)

  • app
  • canvas
  • litho-core
  • litho-coroutines-kotlin
  • litho-editor-core
  • litho-intellij-plugin
  • litho-it
  • litho-it-spec
  • litho-permissions
  • litho-processor
  • litho-rendercore
  • litho-rendercore-default-node
  • litho-rendercore-default-text-node
  • litho-rendercore-incremental-mount
  • litho-rendercore-primitives
  • litho-rendercore-testing
  • litho-rendercore-text
  • litho-rendercore-thread-utils
  • litho-rendercore-transitions
  • litho-rendercore-visibility
  • …and 10 more

Added dependency edges (68)

  • app → litho-core
  • app → litho-sections-core
  • app → litho-widget
  • canvas → litho-rendercore
  • canvas → litho-rendercore-primitives
  • canvas → utils (coupling)
  • litho-core → litho-rendercore (coupling)
  • litho-core → litho-rendercore-incremental-mount
  • litho-core → litho-rendercore-primitives
  • litho-core → litho-rendercore-transitions
  • litho-core → litho-rendercore-visibility
  • litho-core → src
  • litho-coroutines-kotlin → litho-core
  • litho-intellij-plugin → litho-processor
  • litho-intellij-plugin → litho-sections-processor
  • litho-it → litho-core
  • litho-it → litho-rendercore
  • litho-it → litho-rendercore-primitives
  • litho-it → litho-rendercore-transitions
  • litho-it → litho-sections-core
  • …and 48 more

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

facebook/litho was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 25 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 55e28e58930a53133620fd32406ec8c3a9116c0c — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-dd72cc24c749.