All Versions
86
Latest Version
Avg Release Cycle
7 days
Latest Release
1236 days ago
Changelog History
Page 6
Changelog History
Page 6
-
v0.43.0 Changes
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.
- Breaking:: If you use
-
v0.43.0-SNAPSHOT Changes
🚀 release-date
- 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.
- Breaking:: If you use
-
v0.42.0 Changes
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.
- Breaking: There are some changes to how we store
-
v0.41.3-SNAPSHOT Changes
🚀 release-date
- 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.
- Breaking:
-
v0.41.2 Changes
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.
- Refactor: Rename
-
v0.41.2-SNAPSHOT Changes
🚀 release-date
- 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 .
)
👀 For more details, see the full diff.
- Refactor: Rename
-
v0.41.0 Changes
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.
- Breaking: Delete
-
v0.40.1-SNAPSHOT Changes
🚀 release-date
- 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. - 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. - 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 have been moved to SpecGeneratedComponent. Direct subclasses of Component should implement render() instead.
- New: Allow passing
@TreeProp
to@OnCalculateCachedValue
methods - Breaking: Deletes
@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. Remove static references ofHandle
as that can lead to memory leaks since it hold reference toComponentTree
now, insteadHandle
should be used via@State
oruseState
in Kotlin.
👀 For more details, see the full diff.
- Breaking: Remove
-
v0.40.0 Changes
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.
- 💥 Breaking: Change the return type of