Skip to content

Releases: facebook/litho

Version 0.19.0

23 Aug 13:54
Compare
Choose a tag to compare

New Features

  • Make CommonProps accessible from a Component
  • Add incremental mount prop to VerticalScroll
  • Add smooth scroll to center in RecyclerBinder
  • Make CardShadowSpec and CardShadowDrawable public

Improvements

  • Provide timestamp in @OnDataRendered callback
  • Make possible to animate Rotation on RT
  • Avoid delaying ComponentHost children pressed state
  • Add the ability to provide onScrollChangeListener to VerticalScroll

Bugfixes

  • Fix synchronization of event triggers
  • Add missing minHeight and minWidth attributes to theme parsing
  • Fix height/width calculation when the actual size is less than minHeight/minWidth

Version 0.18.0

20 Jul 08:52
v0.18.0
Compare
Choose a tag to compare

New Features

  • Support for @OnDataRendered callback in RecyclerBinder (8da4867).
  • Transition.delay() API (35228cd).

Improvements

  • Perf improvements for VertialScroll (039c6a6, eee0197, 3cc6574).
  • Ignore uninitialized LayoutParams from the RecyclerBinder (#395).
  • Prewarm ImageSpec layout (f795782).
  • Add a getter for ComponentContext on Component.Builder (#398).
  • Updated to SoLoader 0.5.1 and Yoga 0.19.0.

Bugfixes

  • Fix out-of-bounds for text truncation (a226ccb).
  • Correct TextDrawable span click detection for bidirectional text. (3201eff).
  • Fix TreeProp persistence from Section to Component to Component (31318d0).

For a full list of changes, check out the comparison view.

Version 0.17.0

06 Jul 17:53
Compare
Choose a tag to compare

New Features

  • Add fillViewport to VerticalScroll (34dad31)
  • Smooth scrolling alignment options. (fd60d1e)
  • Support smooth scrolling to child by key. (6438850)
  • Support smooth scrolling with offset. (62fa98e)
  • TextInput: a single-line text field (7a445f7)
  • Add ability to clear focus on an EditText. (af3c862, ca9a073, f3e244e, etc.)
  • Implements text truncation with custom ellipsis in litho TextSpec. (9bb5b83)

Bug Fixes

  • Fix layout diffing when layout state is calculated twice before mount. (5508612)
  • Fix race condition during tracing in sections setRoot. (b6b4006)
  • Fix Android crash in VerticalScroll on pre-Lollipop versions. (19e3582)
  • Clean-up parent / owner reference of children during clonning. (a444dc0)
  • Remove recycling from TreeProps. (e0c635d)
  • Clear components in LayoutState.releaseRef() (481e486)
  • Do not start already started renderthread animation. (dc123d0)
  • Fix docs around shouldUpdate. (bda08a1)

Docs

More

For a full list of changes, see v0.16.0...v0.17.0

Version 0.16.0

19 Jun 15:17
Compare
Choose a tag to compare

New Features

  • New TTR (time-to-render) API, for tracking when components render in a Section. See RenderCompleteEvent and ComponentRenderInfo.Builder#renderCompleteHandler. (48c59c2, etc.)
  • Add ability to reference @CommonProps (e.g. layout props, and other props common to all components) from lifecycle methods (bdce081)
  • @TreeProps are now passed along from Sections to their child Components. (4771b64)
  • Add ability to modify corner radius per corner. (5626084)
  • Support lineSpacingExtra from XML theme (cc5c99d)
  • Default timing interpolator is now AccelerateDecelerate. (4f11da0)

Bug Fixes

  • Fixes for double measure bugs in AOSP (bb4dbd5, db4adbb)
  • Fix appear animations for width and height animations of a root LithoView. (031b11d)
  • Remove AccessibilityRole from Litho images to not conflict with new support library. (6a46191)
  • Fix bug where View enabled/clickable/etc flags were accidentally cleared on update. (99b13f7)
  • Fix race condition while copying TreeProps. (ae2bdf5)

More

For a full list of changes, see v0.15.0...v0.16.0

Version 0.15.0

18 May 09:51
v0.15.0
Compare
Choose a tag to compare

New Features

  • Imperative animations are now possible with @OnUpdateStateWithTransition.
  • InterceptTouchEvent now provides a View param, bringing it in line with other events. (759948e)
  • @CommonProp allows accessing shared props in components like margin/padding in the same way normal props work. (8535205)
  • ComponentRenderInfo now accepts Builders alongside Components. (ab1b237)
  • Add KeyUpEvent to EditText. (ad47d9c)
  • Several operations in RecyclerBinder now have asynchronous counterparts.
  • litho-fresco has been upgraded to work with Fresco 1.9.0.
  • Many pool sizes can now be dynamically configured. (b6ada06)
  • Letter spacing support in Text. (cdb428b)

Bug Fixes

  • Several fixes regarding text rendering. (3b10ddc, 9efb2d6)
  • Potential crash when inserting items during scroll. (2a4baa5)
  • Recycler scroll restoration. (6098831)

More

For a full list of changes, see 0.14.0...v0.15.0

Version 0.13.1

15 Mar 16:34
v0.13.1
Compare
Choose a tag to compare

Minor Breaking Changes

Wait, what? Breaking changes in a patch release?
Yes, but it's really small and GitHub code search didn't show a single use of it out in the wild.

  • RecyclerConfiguration is no longer part of RecyclerCollectionComponentSpec but a top-level class. f2b00a8
  • Don't override child layout params by @vinc3m1 (#328)

Version 0.13.0

14 Mar 17:56
Compare
Choose a tag to compare

Breaking changes:

  • TextSpec bounds are clipped by default.

What's new:

  • Introducing Error Boundaries similar to React which helps to handle errors in lifecycle methods gracefully.
  • Added EventHandler support in TestSpecs.
  • Added StateValueAssert to be able to assert StateValues without unwrapping them.
  • Added support for specifying custom ViewTypes when using ViewRenderInfo.
  • Added rotation prop to Components (mainly used for animating rotation with Transition API).

Improvements/Fixes:

  • Fixed StartSnapHelper when child views are smaller than half the size of the RecyclerView.

Version 0.12.0

15 Feb 17:50
Compare
Choose a tag to compare

Breaking changes:

  • StateUpdatesTestHelper has now its own testing.state package.
  • RowReverse and ColumnReverse got removed. Row and Column offer a reverse() property setter to achieve the same.
  • Stetho support, as already announced in v0.11.0, was removed.
  • Last but not least, onCreateLayout() now returns a Component and not a ComponentLayout!!
    buildWithLayout() is also gone.

What's new:

  • Litho now supports StateListAnimator.
  • Trigger APIs is now supported in Sections.
  • New LithoTooltip APIs to show a PopoverWindow.

Improvements/Fixes:

  • EditTextSpec accept now a TextView.OnEditorActionListener.
  • The corner effect for the border got fixes and we also improved the border radii APIs.
  • TextDrawable Span click detection got fixed for multi-line Spans.
  • HorisontalScrollSpec now supports RTL.

Version v0.11.0

05 Dec 13:37
v0.11.0
Compare
Choose a tag to compare

TestSpecs

TestSpecs offer a new way to test your components. Check out the post in our Facebook group or jump straight into the docs.

So long, Stetho, and thanks for all the fish

v0.11.0 is the last release of Litho that comes with Stetho support. We are removing the integration with the next release (v0.12.0). We are really sorry for the inconvenience that we know this will cause some people but we think that it will be good for the future as it allows us to move faster and provide a better debugging experience down the line. We have nothing to announce in that regard just yet.

Version 0.10.0

30 Nov 11:35
v0.10.0
Compare
Choose a tag to compare

What? Another release already? Yes, and there have been some interesting changes.

Breaking changes

Layout was renamed to Wrapper: 38837d7

The new API is more Component-y and takes your delegate as a prop rather as part of the constructor call. Instead of writing Layout.create(c, component), you now write Wrapper.create(c).delegate(component). @IanChilds wrote a handy codemod script to help you with the transition. You can use it like this: git grep "import com.facebook.litho.Layout;" -l | xargs -L1 python WrapperForLayout.py.

Other changes