release-date
- [NEW] Add new
useFirstDrawReporterhook together withStyle.reportFirstContentDrawfor executing actions when related Component is fully rendered on the screen. Can be used to mark the end of TTRC or TTI markers. - [BREAKING] Remove
LegacyLithoViewRulefromcom.facebook.litho.testing, please useLithoTestRuleandTestLithoViewinstead.
2024-10-07
- Accessibility API Improvements.
- Numerous bug fixes.
For more details, see the full diff.
2024-07-10
- Update the Barebones sample version
For more details, see the full diff.
2024-07-10
- [BREAKING] All the nested BUCK modules under litho-core deleted
- [BREAKING] Rename
SpecTransitionWithDependency, - Exposed
androidContextinside ofbind{}blocks in Primitive API - Add Style.rotationX/Y/, Styale.translationZ
- Add visibility style
- Converted more code to Kotlin
- Numerous bug fixes.
For more details, see the full diff.
2024-03-13
- [BREAKING] move litho-core-kotlin to litho-core module
- Converted more code to Kotlin
For more details, see the full diff.
2024-02-01
- Converted more code to Kotlin.
- [NEW] Added debug event APIs for better debugging and integration with Flipper's new UI Debugger.
- [NEW] Added layout caching to improve performance.
- [BREAKING] Moved several configs from LithoConfiguration to ComponentsConfiguration.
- [BREAKING] Merged several configs from RecyclerBinderConfig and RecyclerBinderConfiguration.
- [BREAKING] Removed
Component.canResolve()andComponent.resolve(ResolveContext, ComponentContext)methods. All classes extending Component must now implement the newComponent.resolve(ResolveContext, ScopedComponentInfo, int, int, ComponentsLogger)method which is always used in the resolution flow. - [BREAKING] Rename
Style.performAccessibilityAction,Style.sendAccessibilityEventandStyle.sendAccessibilityEventUncheckedmethods. - [BREAKING] Yoga updated to use C++ 20.
- [BREAKING] Deletes several public constructors of EventHandler.
- Overhauled the render pipeline to support custom layout systems.
- Numerous bug fixes.
For more details, see the full diff.
2023-08-25
- [NEW] Lots more code in Kotlin.
- [NEW] Adds new Primitive APIs (Kotlin APIs that replace MountSpecs) .
- [NEW] Bumps compile, min, target SDK, and builds tools versions.
- [NEW] Bumps Yoga to version 2.0.0.
- [NEW] Add litho-rendercore-glide package.
- [NEW] Fixes RenderCore sample app.
- [BREAKING] Removed
ComponentsConfiguration.canInterruptAndMoveLayoutsBetweenThreads,ComponentTree.canInterruptAndMoveLayoutsBetweenThreads,RecyclerBinder.canInterruptAndMoveLayoutsBetweenThreads,ComponentTreeHolder.canInterruptAndMoveLayoutsBetweenThreads. ComponentTrees can no longer exempt themselves from interrupt and move layouts between threads operation. - [BREAKING] Removed
usePersistentEffectand made deps parameter required inuseEffect,useCoroutine,useFlow. The equivalent ofusePersistentEffect {}isuseEffect(Unit) {}, and the equivalent ofuseEffect {}without arguments isuseEffect(Any()) {}. - [BREAKING] Removed deprecated APIs of GridRecyclerConfiguration.
- [FIXES] Reconciliation now works with components that render to null.
- [PERFORMANCE] Layout calculation split into 2 phases: resolution and measurements.
For more details, see the full diff.
2023-02-13
- [New] Adds debug overlay for to show components bounds, and interactive elements. Set the following configs to enable the feature:
debugHighlightInteractiveBounds,debugHighlightMountBounds. - [Deprecated]
ComponentTree.canInterruptAndMoveLayoutsBetweenThreads,RecyclerBinder.canInterruptAndMoveLayoutsBetweenThreads,ComponentTreeHolder.canInterruptAndMoveLayoutsBetweenThreads. All of those will be removed in one of subsequent versions. - [BREAKING] Introduces several new API to replace the ComponentTree in ComponentContext.
- Use
ComponentContext#getLithoTreeto get access to API previous accessed from theComponentTree. ComponentTreeremoved from theOnErrorAPI; UseComponentContext#getErrorComponentReceiverto set the root on error.
- Use
- [BREAKING]
equivalenceutility method have moved fromCommonUtilstoEquivalenceUtils. - The logic to trigger mount has be simplified; there are now fewer hops between LithoView and ComponentTree.
For more details, see the full diff.
2023-01-05
- [New] Canvas component provides a means for drawing simple 2D graphics.
- [New] LayoutThreadFactory can now be customized via an optional Runnable; for example to set a StrictMode ThreadPolicy.
- [Testing] Several improvements to testings APIs: matching with text, content description.
- [Deprecated] SizeSpecMountWrapperComponentSpec. Use
@OnCreateLayoutWithSizeSpecinstead. - [Internal] Render logic has been split into 2 classes: Resolver and Layout.
- [Internal] LayoutStateFuture has been generalised into a TreeFuture, and there are several related changes.
- [Internal] State generated during layout is now collected in a different StateHandler.
- [Internal] Improved reliability of rebinding EventHandlers.
For more details, see the full diff.
2022-12-02
- Many internals changes which should not affect end-users: StateContainers are now immutable and added support for testing split of resolve and layout processes
- Fix for bug where some EventHandlers would be stale after updates when using sections
- SimpleMountable API is stabilized and ready to replace @MountSpec usages in Kotlin. See here for the docs!
For more details, see the full diff.
2022-10-27
- New APIs for debugging.
- Breaking:
ComponentContext.withComponentScopeis now package-private: it was @VisibleForTesting before, but we are now enforcing the privacy. If you were using it in tests, you can replace it withComponentTestHelper.createScopedComponentContextWithStateForTest(however you should really write tests against LithoTestRule for kt tests and LegacyLithoTestRule for java tests)
For more details, see the full diff.
2022-10-21
- Breaking:: If you use
ComponentsSystrace.provideto provide a custom Systrace implementation, there have been some changes to the types and methods involved:- Instead of implementing
ComponentsSystrace.Systrace, implementations should implementcom.facebook.rendercore.Systracer, located in litho-rendercore. TheArgsBuilderinterface has also moved from ComponentsSystrace to the Systracer interface. - Some method names have been corrected. Specifically start/endSectionAsync have become start/endAsyncSection, aligning them to the Tracer API.
- Instead of implementing
- We have implemented a mechanism that allows us to batch state updates with a deterministic approach. This mechanism enqueues state updates until the next Choreographer Frame Callback (precisely the next "anim" step) and only then schedules the following layout calculation. For more details, see the full diff.
2022-08-15
- Breaking: There are some changes to how we store
ComponentContextandHasEventDispatcheronEventHandler- these changes only affect manually-constructed EventHandlers and will present as a compile error. They don't affect ones generated by the annotation processor for @OnEvent:- Previously the
ComponentContextwas stored as param[0]. It's now stored oneventDispatchInfo.componentContextand all other params should be shifted by one (so index 1 is now index 0) - you only need to do anything here if you were manually constructing EventHandlers - generated EventHandlers from @OnEvent are automatically updated. - Previously the
HasEventDispatcherwas stored directly on the EventHandler. It's not stored ateventDispatchInfo.hasEventDispatcher. This is also automatically updated for generated EventHandlers.
- Previously the
- Breaking:
com.facebook.litho.widget.EmptyComponentSpecis removed. Construct acom.facebook.litho.EmptyComponentdirectly. In places that require a Builder, useWrapper.create(<context>).delegate(EmptyComponent()) - Breaking:
PoolableContentProviderrenamed toContentAllocatorin RenderCore.RenderUnitno longer implementsPoolableContentProvider, instead it should returnContentAllocatorimplementation fromgetContentAllocatormethod. - Breaking:
StateHandlerhas now been replaced byTreeStateinComponentTreefor all state handling. UseComponentTree.acquireTreeState()andComponentTree.Builder.treeState(...)to save/restore state across different component trees.
For more details, see the full diff.
2022-04-19
- Refactor: Rename
setRootAndSizeSpectosetRootAndSizeSpecSyncinComponentTree. - New: Foreground color is supported as a common
DynamicValue. - Breaking: Fix: More fully support
@PropDefaultannotations in Kotlin Specs. (Results in@field:PropDefaultfailing at compilation time. Use fastmod on existing codebase with the command:fastmod '@field:PropDefault' '@PropDefault' --dir .) - Breaking:
InternalNoderenamed toLithoNode, and elevated to a concrete class. DeletesDefaultInternalNode. - Breaking:
NodeInfois now a concrete class; deletedDefaultNodeInfo. - Experimental Kotlin Mountable Component API added.
- Refactored RenderCore MountState extensions call order.
For more details, see the full diff.
2021-11-23
- Breaking: Rename 'LithoAssertions' to 'LegacyLithoAssertions'. (Use fastmod on existing codebase with the command:
fastmod 'LithoAssertions' 'LegacyLithoAssertions' --dir .) - Upgrade: Bump Yoga version to
1.19.0.
For more details, see the full diff.
2021-11-18
- Breaking: Delete
@FromBindinter stage prop. Replace existing usages with@State AtomicReference<?>instead. Create a@State AtomicReference<?>for theComponent; set that value for theAtomicReferencein@OnBind, and get from it in@OnUnbindor other lifecycle methods. - Breaking: Add
ComponentTreeinHandleso thatHandlecan be used across component trees, i.e. throughout Sections. Remove static references ofHandleas that can lead to memory leaks since it holds reference toComponentTreenow, insteadHandleshould be used via@Statein Spec API oruseStatein Kotlin API. - Breaking: Remove
@OnShouldCreateLayoutWithNewSizeSpecAPI. We hope to provide replacements for it in the future, please let us know if you were relying on it. - Breaking: Add new
ComponentTreeparameter toErrorEventHandler.onError()method. - Breaking: Add UI thread call assertion to
ComponentTree.release()method. - Breaking: Make
getErrorHandler,getHandle,getId, andgetKeypackage-private forComponentandSection. This is for compatibility with the Kotlin API. - Breaking: Make most
Component/ComponentLifecyclenon-lifecycle methods (e.g.onCreateLayout,onMount, etc) final as they are not meant to be overridden. - Breaking: Remove
checkNeedsRemeasure,useVisibilityExtension,useInternalNodesForLayoutDiffing,hostHasOverlappingRendering,inheritPriorityFromUiThread,interruptUseCurrentLayoutSource,ignoreDuplicateTransitionKeysInLayout,onlyProcessAutogeneratedTransitionIdsWhenNecessary,ignoreStateUpdatesForScreenshotTest,computeRangeOnSyncLayoutandthreadPoolForBackgroundThreadsConfigconfiguration parameters fromComponentsConfiguration. These configs were used for experimentation and respective experiments were successfully shipped and therefore they are no longer needed. - Breaking: Remove stale
ThreadPoolDynamicPriorityLayoutHandlerandLayoutPriorityThreadPoolExecutorclasses. - Breaking: Rename
LithoHandlertoRunnableHandlerandDefaultLithoHandlertoDefaultHandler. - Breaking: Move
RunnableHandler,FutureInstrumenter, andHandlerInstrumenterto core RenderCore artifact. - Breaking:
ComponentandComponentLifecycleare now merged as one class (Component).ComponentLifecycleis now removed. AnywhereComponentLifecyclewas directly referenced should be changed toComponent. Generated components now extendSpecGeneratedComponentwhich extendsComponent.onCreateLayout/onCreateLayoutWithSizeSpecmethods have been moved toSpecGeneratedComponent- Direct subclasses of
Componentshould implementrendermethod instead
- New: Almost all lifecycle methods are now covered by the
@OnErrorlifecycle API. It's encouraged that high-level Specs implement@OnErrorcallbacks in order to gracefully handle errors that may arise in their descendant Specs. - New: Allow passing
@TreePropto@OnCalculateCachedValuemethods
For more details, see the full diff.
2021-02-26
- Breaking: Change the return type of
ComponentLifecycle.resolve()fromComponentLayouttoInternalNode. - New: Expose
visibleTopandvisibleLeftfields from theVisibilityChangedEventto better understand which side of the component is hidden. Check outVisibilityChangedEvent's javadoc for more info. - New: Expose mounted content from the
VisibleEvent. - New: Lifecycle arguments are now optional in the spec. (e.g.
ComponentContextis now optional in@OnCreateInitialState)
For more details, see the full diff.
2020-10-07
- Breaking:
Component.getScopedContext()access changed from public to package-private.
For more details, see the full diff.
2020-09-17
- New:
ComponentLifecycle.dispatchErrorEvent(ComponentContext, Exception)has become deprecated for public use. Instead, useComponentUtils.raise(ComponentContext, Exception).
For more details, see the full diff.
2020-07-24
- Breaking: Ignore mount calls after
setVisibilityHint(false)was called on a LithoView untilsetVisibilityHint(true)is called. For more details see the docs about changing LithoView visibility. - New: Add
LithoGestureDetectorwrapper class that ensures gestures are processed on UI thread.
For more details, see the full diff.
2020-07-07
- Breaking:
TransparencyEnabledCardis deprecated Moved the behavior ofTransparencyEnabledCardintoCardwhen the proptransparencyEnabledistrue. Please migrate your current uses because it will be removed in a few releases. - New: Add
.duplicateChildrenStates(boolean)method toComponentwhich passes the flag toViewGroup#setAddStatesFromChildren(boolean). When this flag is set to true, the component applies all of its children's drawable states (focused, pressed, etc.) to itself. - New: Ability to specify the percentage of Component's width/height which should be visible to trigger Visible events. Read more in the documentation.
- Fix: Fix showing vertical scrollbar with
VerticalScrollSpec. Default behaviour is scrollbars disabled.
For more details, see the full diff.
2020-06-01
- Breaking: Remove unused obsolete
RenderThreadTransition. - Breaking: Ordering of params in
@ShouldUpdatecallback is fixed (getNext()was previous andgetPrevious()was next). - Breaking: Rename
ComponentsTestRunnertoLithoTestRunner. - New: Add
TransitionEndEventevent callback to receive events when a transition ends. Read more about it in the documentation. - New: Add
acquireStateHandlerOnReleaseflag forRecyclerBinderto opt out of cachingStateHandlers. - New: Improved testing APIs:
MountSpecLifecycleTester,LifecycleTrackerto track basic lifecycle methods which would replace custom component implementations likeTestDrawable,TestComponent, etc. - Fix: Ensure
@OnAttachedand@OnDetachedmethods are called in the same order. - Fix: Remove overriding
isLayoutRequested()inSectionsRecyclerView. - Fix: Deprecate and ignore
ShouldUpdate#onMountparam.MountSpecs withpureRenderwill now always checkshouldUpdateon the main thread if the information from layout isn't able to be used. - Fix: Fixup
BackgroundLayoutLooperRuleand improve threading APIs inComponentTreeTest. - Fix: Fix incorrect key generation after shallow copy.
- Fix: Remove host invalidation suppression during mount.
- Fix: Move setting
PTRRefreshEventfromonPreparetoonBindinRecyclerSpec.
For more details, see the full diff.
2020-05-01
- Experimental: Process Visibility events without Incremental Mount turned on. If you used Incremental Mount only for Visibility events before, now you can turn it off!
- Breaking:
LayoutInfoimplementations are required to implementscrollToPositionWithOffset(). To avoid special casing forLinearLayoutManagerandStaggeredGridLayoutManagerinRecyclerBinderand other internal logic, a LayoutInfo implementation must now delegate to the underlying LayoutManager's scrolling by implementingscrollToPositionWithOffset(). Typical cases should call the LayoutManager's own implementation ofscrollToPositionWithOffset(), or an equivalent. This creates a common interface for programmatic scrolling a61e409. - Breaking:
MeasureListenernow takes two extra parameters,layoutVersionandstateUpdate. These are safe to ignore for clients that don't need them. Check javadoc for all the relevant information. - Breaking: Rename
LithoView.performIncrementalMount()method toLithoView.notifyVisibleBoundsChanged(). - Breaking: Rename
getShadowHorizontal()togetShadowLeft()inCardShadowDrawable. - New:
@OnCreateInitialStatemethod in Specs is now guaranteed to be called only once. - New: Add ability to customize
shadowDx/shadowDyoffsets forCardShadowDrawableandCardShadowSpec. - New: Add more Animations examples and Animations Cookbook in the sample app. Check out docs for more info.
- New: Update accessibility utils to support newer version of Talkback.
- New: Replace Litho's
MountItemwith RenderCore's and wrapLayoutOutputwithRenderTreeNode. - New: Litho tests are now migrated to Robolectric 4 and Mockito 2!
- New: New testing utilities:
LithoTestRule,LithoStatsRule,BackgroundLayoutLooperRule. - Fix: Remove 1px white margin between content and shadow for
CardSpec00f2bdb. - Fix: Fix Sections not updating layout for sticky items with indices outside range ratio.
- Fix: Fix
RecyclerSpecnot respecting RTL for padding. - Fix: Add missing
@Nullableto every method acceptingEventHandler. - Fix: Propagate class-level annotations from
SectionSpecs class to generated Section class. - Fix: Don't crash on missing
@OnCreateMountContentmethod forMountSpecs during code generation. - Fix: Don't crash when comparing
ComparableGradientDrawables on API<=15. - Fix: Fixes a bug in
ComponentUtils.isEquivalentTo(). - Fix: Correctly release
ComponentTreeon the main thread after@OnDetached.
For more details, see the full diff.
2020-02-09
- Breaking: Reconciliation for state updates is enabled by default. Reconciliation makes state updates faster at the expense of increase in memory usage. New APIs added to explicitly disable reconciliation when an explicit
ComponentTreeis not set on theLithoView. Read more about it in the documentation.LithoView.create(Context, Component, boolean)LithoView.create(ComponentContext, Component, boolean)LithoView.setComponentWithoutReconciliation(Component)LithoView.setComponentAsyncWithoutReconciliation(Component)
- Breaking: Merge
BaseLithoStartupLoggingabstract class,LithoStartupLoggerUtilhelper class andLithoStartupLoggerinterface into singleLithoStartupLoggerabstract class. - Breaking: Consolidate two layout calculation
PerfEvents into one: removeFrameworkLogEvents.EVENT_LAYOUT_CALCULATEand move some of its annotations toFrameworkLogEvents.CALCULATE_LAYOUT_STATEwhich will be used instead. - Breaking: Make
varArgprops effectively optional with aCollections.EMPTY_LISTas a default value.
For more details, see the full diff.
2019-12-11
- Breaking: Changes in working with
ComparableDrawable. Litho'sDrawableWrapperdoesn't mimic Android Jetpack's implementations ofWrappedDrawable, e.g.WrappedDrawableApi21, etc. Litho's wrapper will have to implement this correctly to have a legitimate chance of working across OS versions and all drawable types. This is not a good position to be in. It is better to remove the wrapper all together; this change doesn't remove it, but blocks usages except for specific internal ones. In essence, if a background or foregroundDrawableis also aComparableDrawable, Litho will invoke theisEquivalentTo()for comparison (instead ofequals()). Also,ComparableDrawableis now an optional interface; so non comparable drawables will not be wrapped. The usage remains largely unchanged (except for the removal of Litho'sDrawableWrapperimplementation).ComparableDrawableis a plain interface now (instead of aDrawable).- Remove
Component.Builder.background(ComparableDrawable)andComponent.Builder.foreground(ComparableDrawable). - Remove
ComparableResDrawable,ComparableIntIdDrawableandDefaultComparableDrawableimplementations.
- Breaking: Provide global offset of the Section into
@OnDataRenderedmethod. - Breaking: Fix default text size of
TextSpec,EditTextSpecandTextInputSpecto be 14sp (from 13px). - Breaking: FBJNI got removed from the build process. If you relied on
libfbjni.soto be present, you can get the artifact from the fbjni repository. - Breaking:
LithoViewAssert.hasVisibleDrawable()no longer relies on the brokenShadowDrawable.equals()implementation in Robolectric 3.X. Now Drawable equality relies on the descriptions being equal, or the resource ID they were created with being equal. - Breaking: Remove unused
getKeyCollisionStackTraceBlacklist()andgetKeyCollisionStackTraceKeywords()from theComponentsReporter.Reporterinterface. - New: Allow triggering
@OnTriggerEvents on Components using aHandleAPI. - Fix: Propagate annotations specified on
@Paramargs from@OnEventmethods to generated methods. - Fix: Produce correct generated code for
@OnEventmethod when it has several args of the same generic type. - Fix: Fix generating
@OnCalculateCachedValuerelated methods when it hasComponentContextas a parameter. - Fix: Fix
IndexOutOfBoundsExceptioninRecyclerBinder.removeItemAt()in Sections whenSingleComponentSectionis given anullComponent. - Fix: Support Dynamic Props for
LayoutSpecs.
For more details, see the full diff.
2019-11-15
- Breaking: Make ctors of
Component/ComponentLifecyclethat take an explicit type id package private. - Breaking: Add
categoryKeyparam forComponentsReporter.emitMessage()API to distribute errors into different buckets. - Breaking: Remove
ComponentsLogger.emitMessage()API as it was fully replaced byComponentsReporter.emitMessage(). - Breaking: Remove
YogaNodeparameter fromYogaLogger.log(). - Breaking: Remove error reporting from
ComponentsLogger. - Breaking: Limit scope of
Component/ComponentLifecycleconstructors that take explicit type param. - New: Add
requestSmoothScrollBy()andrequestScrollToPositionWithSnap()APIs forRecyclerCollectionEventsController. - New: Add ability to provide custom
ComponentsLoggerperComponentRenderInfo. - New: Add new counters (calculateLayout, section state update, section changeset calculation) to
LithoStatsglobal counter. - New: Allow custom
StaggeredGridLayoutInfowhen usingStaggeredGridRecyclerConfiguration. - New: Add support for more
textAlignmentvalues forTextSpec. - New: Add
ComponentWarmerAPI to allow calculating layout ahead of time. - New: Add
ThreadPoolDynamicPriorityLayoutHandlerto enable changing priority of threads calculating layouts. - New: Add
varArgsto the generatedComponent. - New: Add snap support for
GridRecyclerConfiguration. - New: Add support for custom fling offset for
StartSnapHelper. - New: Allow disabling top or bottom shadow in
TransparencyEnabledCardSpec. - New: Add
HandleAPI for LithoTooltips viaLithoTooltipController.showTooltipOnHandle()that replaces previous way of anchoring tooltip with concatenated keys. - New: Track component hierarchy using
DebugHierarchyafter mount time. - Fix: Add generics support to
@OnCalculateCachedValuemethods. - Fix: Move setting
ItemAnimatorfromonBind/onUnbindtoonMount/onUnmountinRecyclerSpec. - Fix: Stop and clean running transitions that do not exist and not declared in the new layout.
- Fix: Fix concurrent modification on finishing undeclared transitions.
- Fix: Allow
TreeProps to be used in@OnCreateInitialStateof Sections. - Fix: Define default color for spannable link in
TextSpec. - Fix: Postpone
ComponentTree.mountComponent()for reentrant mounts, then mount newLayoutStateafterwards. - Fix: Enable automatic RTL support in sample apps.
For more details, see the full diff.
2019-09-09
- Breaking:
Component.measure()is only allowed during aLayoutStatecalculation. - New: Add support to
FrescoImageSpecfor photo focus points. - New: Allow Child Classes to set
ComponentContextonDefaultInternalNode. - Fix: Immediately remove
MountItemmapping on unmount to protect against re-entrancy.
For more details, see the full diff.
2019-08-23
- Breaking: Rename
@FromCreateLayoutto@FromPreviousCreateLayout. - Breaking: Add compile-time error when
Component.Builderis passed as a@Prop. (5da7121) - Breaking: Remove
MountSpec.shouldUseDisplayList()- remnant of removed DisplayLists' usage. Was not doing anything. - New: Make
DynamicValue.get()public. - New: Expose
RecyclerBinder's Commit Policy throughDynamicConfig. (ac513f3) - New: Allow to provide custom
GridLayoutInfo(i.e. customGridLayoutManager) throughGridLayoutInfoFactory. (4568d58) - New: Allow creating
ComponentTreewithout specifying root. - New: Deprecate
ComponentsLogger.emitMessage()in favor ofComponentsReporter.Reporter.emitMessage(). (9cb4caf) - New: Auto set
Text.ellipsize()ifmaxLines()is specified without an accompanying ellipsize, to make behavior consistent across different Android versions. (3bef059) - New: Share the same
ResourceResolveracross allComponents in the same tree. (c93517c, 7656822, dde30dc) - New: Add support for A11y headers. (#573)
- New: Update documentation and javadocs.
- Fix: Better error messages for releasing mount content.
- Fix: Don't use internal
javacAPI in codegen. (#577) - Fix: Propagate injected
treePropsfor Layout PerfEvent. (#574) - Fix: Don't crash when using primitive
@CachedValues together with HotSwap mode. (501f1a1) - Fix: Improve
@OnUpdateStateWithTransition's behavior.
For more details, see the full diff.
2019-07-11
- New: Additional Sections debugging APIs:
- Make
Change.getRenderInfos()public. - Add
ChangesInfo.getAllChanges().
- Make
- Fix: Don't crash on dangling mount content.
For more details, see the full diff.
2019-07-05
- New: Plain code Codelabs with README instructions. Try them out in codelabs.
- New: Add interface
ChangesetDebugConfiguration.ChangesetDebugListenerfor listening forChangeSetgeneration in Sections. - Fix: Cleanup some unused code.
For more details, see the full diff.
2019-06-24
- Breaking: Change in PerfEvents:
- Remove
FrameworkLogEvents.EVENT_CREATE_LAYOUT,FrameworkLogEvents.EVENT_CSS_LAYOUT, andFrameworkLogEvents.EVENT_COLLECT_RESULTS: these are replaced by the sub-spans"start_create_layout"/"end_create_layout","start_measure"/"end_measure", and"start_collect_results"/"end_collect_results"under the existing top-levelEVENT_CALCULATE_LAYOUT_STATEevent. ThePerfEvent.markerPoint()API can be used to log these sub-spans. (b859605) - Remove
FrameworkLogEvents.PREPARE_MOUNTwithout replacement: this didn't provide much value. (4917370) - Remove
FrameworkLogEvents.DRAWwithout replacement: this was not free to maintain and didn't provide much value. (9e548cb)
- Remove
- Breaking: The Default Range Ratio for Sections/
RecyclerBinderis changed from 4 screens worth of content in either direction to 2. This should improve resource usage with minimal effects on scroll performance. (9b4fe95) - Breaking:
ComponentsSystrace.provide():ComponentsSystracenow assumes an implementation will be provided before any other Litho operations occur. (457a20f) - New:
ComponentsLoggerimplementations can now return null for event types they don't care about. (4075eb7) - New: Add
RecyclerCollectionEventsController.requestScrollBy(). (0146857) - New: Add preliminary Robolectric v4 support. (4c2f657, etc.)
- New: More efficient code generation for state updates in Components and Sections. (8c5c7e3, etc.)
- Fix: Remove usage of API 19+
Objectsclass in cached value API. (aabb24a) - Fix: Unset Components scope when creating a new
ComponentContextinComponentTree. (05f11a7) - Fix: Fix perf logging for dirty mounts. (3ad8bfb)
- Fix: Don't crash when
@OnCalculateCachedValuetakes no args. (2a0f524) - Fix: Reduce number of systrace markers in
collectResults: these were skewing the perceived size ofLayoutState.collectResultsin production and weren't actionable. (3107467)
For more details, see the full diff.
2019-05-28
- Fix: Picks 513cf91 to fix an issue with the Flipper integration.
2019-05-13
- Breaking: Fix the lazy State update semantics. (de3d938)
- Breaking: Rename
LayoutHandlertoLithoHandlerand addDefaultLithoHandler. (h69cba5, 0d0bb0b) - Breaking: Update Yoga version to
1.14.0. Fixes #536. (c16baf6) - Breaking: Release sections'
ComponentTrees whenRecyclerCollectionComponentis detached. (8893049) - Breaking: Only enable incremental mount if parent incremental mount is enabled. (c88a660)
- Experimental: Make state updates faster by only recreating the subtrees which are being updated and reuse (read "clone") the untouched subtrees while calculating a new layout. You can try it out by setting
ComponentsConfiguration.isReconciliationEnabled()flag globally or usingComponentTree.Builder.isReconciliationEnabled()for specific trees. - New: Add a
RecyclerBinder.replaceAll(List<RenderInfo>)method. (#451) - New: Add documentation.
- Fix: Eliminate Gradle deprecated methods. (#526)
- Fix: Cleanup tests and unused code.
- Fix: Remove object pooling everywhere.
- Fix: Make Robolectric tests work. (a92018a)
For more details, see the full diff.
2019-03-14
- Breaking: Migrate support lib dependencies to AndroidX. (de3097b)
- Breaking: Remove
DisplayListDrawableand otherDisplayList-related features. (29f42fa) - Breaking: Remove
ReferencesAPI. (b1aa39a) - New: Remove object pooling for most internal objects.
- New: Replace
powermock-reflectwith internal Whitebox implementation. (ad899e4) - New: Enable Gradle incremental AnnotationProcessing. (a864b5a)
- New: Allow
TextInputto acceptnullasinputBackground. (d1fd03b) - New: Add documentation.
- Fix: Suppress focus temporarily while mounting. (d93e2e0)
- Fix: When clearing press state, also cancel pending input events. (451e8b4)
- Fix: Correctly calculate
VisibilityChangedEventinMountState. (66d65fe) - Fix: Thread safety issue of
ViewportChangedlisteners ofViewportManager. (9da9d90)
For more details, see the full diff.
2019-02-18
Breaking: The default for state updates has changed from sync to async. At Facebook this meant we ran a codemod script on the codebase and changed all state update methods to the explicit Sync variant ("Sync" is just appended to the end of the state update call), then changed the default. The reason for this is to not change existing behavior in case it breaks something, since there are many callsites. The script is committed and available at scripts/codemod-state-update-methods.sh. We recommend using it if you have any concerns about state update calls automatically becoming async. As a reminder, when you add a @OnUpdateState method, it generates three methods: updateState(), updateStateSync(), and updateStateAsync(). Previously updateState() == updateStateSync(). Now, updateState() == updateStateAsync().
For more details, see the full diff.
2019-01-16
- Breaking:
KeyHandlers now get registered in EndToEnd tests (9836497). This is a an edge-case, but potentially behavior-changing. - New: Add support for Cached Values.
- New:
isEquivalentTonow uses reflection for size reasons unless the target is aMountSpecorSectionSpec. (2e27d99) - Fix: Potential NPE in
RecyclerEventsController. (8e29036)
For more details, see the full diff.