- [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.
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
usePersistentEffect
and 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#getLithoTree
to get access to API previous accessed from theComponentTree
. ComponentTree
removed from theOnError
API; UseComponentContext#getErrorComponentReceiver
to set the root on error.
- Use
- [BREAKING]
equivalence
utility method have moved fromCommonUtils
toEquivalenceUtils
. - 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
@OnCreateLayoutWithSizeSpec
instead. - [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.withComponentScope
is 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 LithoViewRule for kt tests and LegacyLithoViewRule for java tests)
For more details, see the full diff.
2022-10-21
- Breaking:: If you use
ComponentsSystrace.provide
to 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. TheArgsBuilder
interface 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
ComponentContext
andHasEventDispatcher
onEventHandler
- 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
ComponentContext
was stored as param[0]. It's now stored oneventDispatchInfo.componentContext
and 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
HasEventDispatcher
was 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.EmptyComponentSpec
is removed. Construct acom.facebook.litho.EmptyComponent
directly. In places that require a Builder, useWrapper.create(<context>).delegate(EmptyComponent())
- Breaking:
PoolableContentProvider
renamed toContentAllocator
in RenderCore.RenderUnit
no longer implementsPoolableContentProvider
, instead it should returnContentAllocator
implementation fromgetContentAllocator
method. - Breaking:
StateHandler
has now been replaced byTreeState
inComponentTree
for 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
setRootAndSizeSpec
tosetRootAndSizeSpecSync
inComponentTree
. - New: Foreground color is supported as a common
DynamicValue
. - Breaking: Fix: More fully support
@PropDefault
annotations in Kotlin Specs. (Results in@field:PropDefault
failing at compilation time. Use fastmod on existing codebase with the command:fastmod '@field:PropDefault' '@PropDefault' --dir .
) - Breaking:
InternalNode
renamed toLithoNode
, and elevated to a concrete class. DeletesDefaultInternalNode
. - Breaking:
NodeInfo
is 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
@FromBind
inter stage prop. Replace existing usages with@State AtomicReference<?>
instead. Create a@State AtomicReference<?>
for theComponent
; set that value for theAtomicReference
in@OnBind
, and get from it in@OnUnbind
or other lifecycle methods. - Breaking: Add
ComponentTree
inHandle
so thatHandle
can be used across component trees, i.e. throughout Sections. Remove static references ofHandle
as that can lead to memory leaks since it holds reference toComponentTree
now, insteadHandle
should be used via@State
in Spec API oruseState
in Kotlin API. - Breaking: Remove
@OnShouldCreateLayoutWithNewSizeSpec
API. We hope to provide replacements for it in the future, please let us know if you were relying on it. - Breaking: Add new
ComponentTree
parameter toErrorEventHandler.onError()
method. - Breaking: Add UI thread call assertion to
ComponentTree.release()
method. - Breaking: Make
getErrorHandler
,getHandle
,getId
, andgetKey
package-private forComponent
andSection
. This is for compatibility with the Kotlin API. - Breaking: Make most
Component
/ComponentLifecycle
non-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
,computeRangeOnSyncLayout
andthreadPoolForBackgroundThreadsConfig
configuration parameters fromComponentsConfiguration
. These configs were used for experimentation and respective experiments were successfully shipped and therefore they are no longer needed. - Breaking: Remove stale
ThreadPoolDynamicPriorityLayoutHandler
andLayoutPriorityThreadPoolExecutor
classes. - Breaking: Rename
LithoHandler
toRunnableHandler
andDefaultLithoHandler
toDefaultHandler
. - Breaking: Move
RunnableHandler
,FutureInstrumenter
, andHandlerInstrumenter
to core RenderCore artifact. - Breaking:
Component
andComponentLifecycle
are now merged as one class (Component
).ComponentLifecycle
is now removed. AnywhereComponentLifecycle
was directly referenced should be changed toComponent
. Generated components now extendSpecGeneratedComponent
which extendsComponent
.onCreateLayout
/onCreateLayoutWithSizeSpec
methods have been moved toSpecGeneratedComponent
- Direct subclasses of
Component
should implementrender
method instead
- New: Almost all lifecycle methods are now covered by the
@OnError
lifecycle API. It's encouraged that high-level Specs implement@OnError
callbacks in order to gracefully handle errors that may arise in their descendant Specs. - New: Allow passing
@TreeProp
to@OnCalculateCachedValue
methods
For more details, see the full diff.
2021-02-26
- Breaking: Change the return type of
ComponentLifecycle.resolve()
fromComponentLayout
toInternalNode
. - New: Expose
visibleTop
andvisibleLeft
fields from theVisibilityChangedEvent
to 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.
ComponentContext
is 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
LithoGestureDetector
wrapper class that ensures gestures are processed on UI thread.
For more details, see the full diff.
2020-07-07
- Breaking:
TransparencyEnabledCard
is deprecated Moved the behavior ofTransparencyEnabledCard
intoCard
when the proptransparencyEnabled
istrue
. Please migrate your current uses because it will be removed in a few releases. - New: Add
.duplicateChildrenStates(boolean)
method toComponent
which 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
@ShouldUpdate
callback is fixed (getNext()
was previous andgetPrevious()
was next). - Breaking: Rename
ComponentsTestRunner
toLithoTestRunner
. - New: Add
TransitionEndEvent
event callback to receive events when a transition ends. Read more about it in the documentation. - New: Add
acquireStateHandlerOnRelease
flag forRecyclerBinder
to opt out of cachingStateHandler
s. - New: Improved testing APIs:
MountSpecLifecycleTester
,LifecycleTracker
to track basic lifecycle methods which would replace custom component implementations likeTestDrawable
,TestComponent
, etc. - Fix: Ensure
@OnAttached
and@OnDetached
methods are called in the same order. - Fix: Remove overriding
isLayoutRequested()
inSectionsRecyclerView
. - Fix: Deprecate and ignore
ShouldUpdate#onMount
param.MountSpec
s withpureRender
will now always checkshouldUpdate
on the main thread if the information from layout isn't able to be used. - Fix: Fixup
BackgroundLayoutLooperRule
and improve threading APIs inComponentTreeTest
. - Fix: Fix incorrect key generation after shallow copy.
- Fix: Remove host invalidation suppression during mount.
- Fix: Move setting
PTRRefreshEvent
fromonPrepare
toonBind
inRecyclerSpec
.
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:
LayoutInfo
implementations are required to implementscrollToPositionWithOffset()
. To avoid special casing forLinearLayoutManager
andStaggeredGridLayoutManager
inRecyclerBinder
and 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:
MeasureListener
now takes two extra parameters,layoutVersion
andstateUpdate
. 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:
@OnCreateInitialState
method in Specs is now guaranteed to be called only once. - New: Add ability to customize
shadowDx
/shadowDy
offsets forCardShadowDrawable
andCardShadowSpec
. - 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
MountItem
with RenderCore's and wrapLayoutOutput
withRenderTreeNode
. - New: Litho tests are now migrated to Robolectric 4 and Mockito 2!
- New: New testing utilities:
LithoViewRule
,LithoStatsRule
,BackgroundLayoutLooperRule
. - Fix: Remove 1px white margin between content and shadow for
CardSpec
00f2bdb. - Fix: Fix Sections not updating layout for sticky items with indices outside range ratio.
- Fix: Fix
RecyclerSpec
not respecting RTL for padding. - Fix: Add missing
@Nullable
to every method acceptingEventHandler
. - Fix: Propagate class-level annotations from
SectionSpec
s class to generated Section class. - Fix: Don't crash on missing
@OnCreateMountContent
method forMountSpec
s during code generation. - Fix: Don't crash when comparing
ComparableGradientDrawable
s on API<=15. - Fix: Fixes a bug in
ComponentUtils.isEquivalentTo()
. - Fix: Correctly release
ComponentTree
on 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
ComponentTree
is 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
BaseLithoStartupLogging
abstract class,LithoStartupLoggerUtil
helper class andLithoStartupLogger
interface into singleLithoStartupLogger
abstract class. - Breaking: Consolidate two layout calculation
PerfEvent
s into one: removeFrameworkLogEvents.EVENT_LAYOUT_CALCULATE
and move some of its annotations toFrameworkLogEvents.CALCULATE_LAYOUT_STATE
which will be used instead. - Breaking: Make
varArg
props effectively optional with aCollections.EMPTY_LIST
as a default value.
For more details, see the full diff.
2019-12-11
- Breaking: Changes in working with
ComparableDrawable
. Litho'sDrawableWrapper
doesn'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 foregroundDrawable
is also aComparableDrawable
, Litho will invoke theisEquivalentTo()
for comparison (instead ofequals()
). Also,ComparableDrawable
is now an optional interface; so non comparable drawables will not be wrapped. The usage remains largely unchanged (except for the removal of Litho'sDrawableWrapper
implementation).ComparableDrawable
is a plain interface now (instead of aDrawable
).- Remove
Component.Builder.background(ComparableDrawable)
andComponent.Builder.foreground(ComparableDrawable)
. - Remove
ComparableResDrawable
,ComparableIntIdDrawable
andDefaultComparableDrawable
implementations.
- Breaking: Provide global offset of the Section into
@OnDataRendered
method. - Breaking: Fix default text size of
TextSpec
,EditTextSpec
andTextInputSpec
to be 14sp (from 13px). - Breaking: FBJNI got removed from the build process. If you relied on
libfbjni.so
to 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.Reporter
interface. - New: Allow triggering
@OnTrigger
Events on Components using aHandle
API. - Fix: Propagate annotations specified on
@Param
args from@OnEvent
methods to generated methods. - Fix: Produce correct generated code for
@OnEvent
method when it has several args of the same generic type. - Fix: Fix generating
@OnCalculateCachedValue
related methods when it hasComponentContext
as a parameter. - Fix: Fix
IndexOutOfBoundsException
inRecyclerBinder.removeItemAt()
in Sections whenSingleComponentSection
is given anull
Component. - Fix: Support Dynamic Props for
LayoutSpec
s.
For more details, see the full diff.
2019-11-15
- Breaking: Make ctors of
Component
/ComponentLifecycle
that take an explicit type id package private. - Breaking: Add
categoryKey
param forComponentsReporter.emitMessage()
API to distribute errors into different buckets. - Breaking: Remove
ComponentsLogger.emitMessage()
API as it was fully replaced byComponentsReporter.emitMessage()
. - Breaking: Remove
YogaNode
parameter fromYogaLogger.log()
. - Breaking: Remove error reporting from
ComponentsLogger
. - Breaking: Limit scope of
Component
/ComponentLifecycle
constructors that take explicit type param. - New: Add
requestSmoothScrollBy()
andrequestScrollToPositionWithSnap()
APIs forRecyclerCollectionEventsController
. - New: Add ability to provide custom
ComponentsLogger
perComponentRenderInfo
. - New: Add new counters (calculateLayout, section state update, section changeset calculation) to
LithoStats
global counter. - New: Allow custom
StaggeredGridLayoutInfo
when usingStaggeredGridRecyclerConfiguration
. - New: Add support for more
textAlignment
values forTextSpec
. - New: Add
ComponentWarmer
API to allow calculating layout ahead of time. - New: Add
ThreadPoolDynamicPriorityLayoutHandler
to enable changing priority of threads calculating layouts. - New: Add
varArgs
to 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
Handle
API for LithoTooltip
s viaLithoTooltipController.showTooltipOnHandle()
that replaces previous way of anchoring tooltip with concatenated keys. - New: Track component hierarchy using
DebugHierarchy
after mount time. - Fix: Add generics support to
@OnCalculateCachedValue
methods. - Fix: Move setting
ItemAnimator
fromonBind
/onUnbind
toonMount
/onUnmount
inRecyclerSpec
. - 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
TreeProp
s to be used in@OnCreateInitialState
of Sections. - Fix: Define default color for spannable link in
TextSpec
. - Fix: Postpone
ComponentTree.mountComponent()
for reentrant mounts, then mount newLayoutState
afterwards. - 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 aLayoutState
calculation. - New: Add support to
FrescoImageSpec
for photo focus points. - New: Allow Child Classes to set
ComponentContext
onDefaultInternalNode
. - Fix: Immediately remove
MountItem
mapping on unmount to protect against re-entrancy.
For more details, see the full diff.
2019-08-23
- Breaking: Rename
@FromCreateLayout
to@FromPreviousCreateLayout
. - Breaking: Add compile-time error when
Component.Builder
is 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
ComponentTree
without 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
ResourceResolver
across allComponent
s 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
javac
API in codegen. (#577) - Fix: Propagate injected
treeProps
for Layout PerfEvent. (#574) - Fix: Don't crash when using primitive
@CachedValue
s 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.ChangesetDebugListener
for listening forChangeSet
generation 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_STATE
event. ThePerfEvent.markerPoint()
API can be used to log these sub-spans. (b859605) - Remove
FrameworkLogEvents.PREPARE_MOUNT
without replacement: this didn't provide much value. (4917370) - Remove
FrameworkLogEvents.DRAW
without replacement: this was not free to maintain and didn't provide much value. (9e548cb)
- Remove
- Breaking: The Default Range Ratio for Sections/
RecyclerBinder
is 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()
:ComponentsSystrace
now assumes an implementation will be provided before any other Litho operations occur. (457a20f) - New:
ComponentsLogger
implementations 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+
Objects
class in cached value API. (aabb24a) - Fix: Unset Components scope when creating a new
ComponentContext
inComponentTree
. (05f11a7) - Fix: Fix perf logging for dirty mounts. (3ad8bfb)
- Fix: Don't crash when
@OnCalculateCachedValue
takes no args. (2a0f524) - Fix: Reduce number of systrace markers in
collectResults
: these were skewing the perceived size ofLayoutState.collectResults
in 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
LayoutHandler
toLithoHandler
and addDefaultLithoHandler
. (h69cba5, 0d0bb0b) - Breaking: Update Yoga version to
1.14.0
. Fixes #536. (c16baf6) - Breaking: Release sections'
ComponentTree
s whenRecyclerCollectionComponent
is 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
DisplayListDrawable
and otherDisplayList
-related features. (29f42fa) - Breaking: Remove
References
API. (b1aa39a) - New: Remove object pooling for most internal objects.
- New: Replace
powermock-reflect
with internal Whitebox implementation. (ad899e4) - New: Enable Gradle incremental AnnotationProcessing. (a864b5a)
- New: Allow
TextInput
to acceptnull
asinputBackground
. (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
VisibilityChangedEvent
inMountState
. (66d65fe) - Fix: Thread safety issue of
ViewportChanged
listeners 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:
KeyHandler
s now get registered in EndToEnd tests (9836497). This is a an edge-case, but potentially behavior-changing. - New: Add support for Cached Values.
- New:
isEquivalentTo
now uses reflection for size reasons unless the target is aMountSpec
orSectionSpec
. (2e27d99) - Fix: Potential NPE in
RecyclerEventsController
. (8e29036)
For more details, see the full diff.