All Versions
86
Latest Version
Avg Release Cycle
7 days
Latest Release
1236 days ago

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 implement com.facebook.rendercore.Systracer, located in litho-rendercore. The ArgsBuilder 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.
    • 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.
  • 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 implement com.facebook.rendercore.Systracer, located in litho-rendercore. The ArgsBuilder 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.
    • 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.
  • v0.42.0 Changes

    2022-08-15

    • Breaking: There are some changes to how we store ComponentContext and HasEventDispatcher on EventHandler - 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 on eventDispatchInfo.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 at eventDispatchInfo.hasEventDispatcher. This is also automatically updated for generated EventHandlers.
    • Breaking: com.facebook.litho.widget.EmptyComponentSpec is removed. Construct a com.facebook.litho.EmptyComponent directly. In places that require a Builder, use Wrapper.create(<context>).delegate(EmptyComponent())
    • Breaking: PoolableContentProvider renamed to ContentAllocator in RenderCore. RenderUnit no longer implements PoolableContentProvider, instead it should return ContentAllocator implementation from getContentAllocator method.
    • Breaking: StateHandler has now been replaced by TreeState in ComponentTree for all state handling. Use ComponentTree.acquireTreeState() and ComponentTree.Builder.treeState(...) to save/restore state across different component trees.

    ๐Ÿ‘€ For more details, see the full diff.

  • v0.41.3-SNAPSHOT Changes

    ๐Ÿš€ release-date

    • Breaking: com.facebook.litho.widget.EmptyComponentSpec is removed. Construct a com.facebook.litho.EmptyComponent directly. In places that require a Builder, use Wrapper.create(<context>).delegate(EmptyComponent())
    • Breaking: PoolableContentProvider renamed to ContentAllocator in RenderCore. RenderUnit no longer implements PoolableContentProvider, instead it should return ContentAllocator implementation from getContentAllocator method.
    • Breaking: StateHandler has now been replaced by TreeState in ComponentTree for all state handling. Use ComponentTree.acquireTreeState() and ComponentTree.Builder.treeState(...) to save/restore state across different component trees.

    ๐Ÿ‘€ For more details, see the full diff.

  • v0.41.2 Changes

    2022-04-19

    • Refactor: Rename setRootAndSizeSpec to setRootAndSizeSpecSync in ComponentTree.
    • 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 to LithoNode, and elevated to a concrete class. Deletes DefaultInternalNode.
    • Breaking: NodeInfo is now a concrete class; deleted DefaultNodeInfo.
    • Experimental Kotlin Mountable Component API added.
    • Refactored RenderCore MountState extensions call order.

    ๐Ÿ‘€ For more details, see the full diff.

  • v0.41.2-SNAPSHOT Changes

    ๐Ÿš€ release-date

    • Refactor: Rename setRootAndSizeSpec to setRootAndSizeSpecSync in ComponentTree.
    • 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.

  • v0.41.1 Changes

    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.

  • 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 the Component; set that value for the AtomicReference in @OnBind, and get from it in @OnUnbind or other lifecycle methods.
    • Breaking: Add ComponentTree in Handle so that Handle can be used across component trees, i.e. throughout Sections. Remove static references of Handle as that can lead to memory leaks since it holds reference to ComponentTree now, instead Handle should be used via @State in Spec API or useState 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 to ErrorEventHandler.onError() method.
    • Breaking: Add UI thread call assertion to ComponentTree.release() method.
    • Breaking: Make getErrorHandler, getHandle, getId, and getKey package-private for Component and Section. 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 and threadPoolForBackgroundThreadsConfig configuration parameters from ComponentsConfiguration. These configs were used for experimentation and respective experiments were successfully shipped and therefore they are no longer needed.
    • Breaking: Remove stale ThreadPoolDynamicPriorityLayoutHandler and LayoutPriorityThreadPoolExecutor classes.
    • Breaking: Rename LithoHandler to RunnableHandler and DefaultLithoHandler to DefaultHandler.
    • Breaking: Move RunnableHandler, FutureInstrumenter, and HandlerInstrumenter to core RenderCore artifact.
    • Breaking: Component and ComponentLifecycle are now merged as one class (Component). ComponentLifecycle is now removed. Anywhere ComponentLifecycle was directly referenced should be changed to Component. Generated components now extend SpecGeneratedComponent which extends Component.
      • onCreateLayout/onCreateLayoutWithSizeSpec methods have been moved to SpecGeneratedComponent
      • Direct subclasses of Component should implement render 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.

  • 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 to ErrorEventHandler.onError() method.
    • Breaking: Add UI thread call assertion to ComponentTree.release() method.
    • Breaking: Make getErrorHandler, getHandle, getId, and getKey package-private for Component and Section. 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 and threadPoolForBackgroundThreadsConfig configuration parameters from ComponentsConfiguration. These configs were used for experimentation and respective experiments were successfully shipped and therefore they are no longer needed.
    • Breaking: Remove stale ThreadPoolDynamicPriorityLayoutHandler and LayoutPriorityThreadPoolExecutor classes.
    • Breaking: Rename LithoHandler to RunnableHandler and DefaultLithoHandler to DefaultHandler.
    • Breaking: Move RunnableHandler, FutureInstrumenter, and HandlerInstrumenter 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 and ComponentLifecycle are now merged as one class (Component). ComponentLifecycle is now removed. Anywhere ComponentLifecycle was directly referenced should be changed to Component. Generated components now extend SpecGeneratedComponent which extends Component.
      • 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 the Component; set that value for the AtomicReference in @OnBind, and get from it in @OnUnbind or other lifecycle methods.
    • Breaking: Add ComponentTree in Handle so that Handle can be used across component trees. Remove static references of Handle as that can lead to memory leaks since it hold reference to ComponentTree now, instead Handle should be used via @State or useState in Kotlin.

    ๐Ÿ‘€ For more details, see the full diff.

  • v0.40.0 Changes

    2021-02-26

    • ๐Ÿ’ฅ Breaking: Change the return type of ComponentLifecycle.resolve() from ComponentLayout to InternalNode.
    • ๐Ÿ†• New: Expose visibleTop and visibleLeft fields from the VisibilityChangedEvent to better understand which side of the component is hidden. Check out VisibilityChangedEvent'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.