Releases: facebook/litho
Version 0.19.0
New Features
- Make
CommonProps
accessible from aComponent
- Add incremental mount prop to
VerticalScroll
- Add smooth scroll to center in
RecyclerBinder
- Make
CardShadowSpec
andCardShadowDrawable
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
toVerticalScroll
Bugfixes
- Fix synchronization of event triggers
- Add missing
minHeight
andminWidth
attributes to theme parsing - Fix height/width calculation when the actual size is less than
minHeight
/minWidth
Version 0.18.0
New Features
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
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
- Tooltip api doc (7c2b1cd)
More
For a full list of changes, see v0.16.0...v0.17.0
Version 0.16.0
New Features
- New TTR (time-to-render) API, for tracking when components render in a Section. See
RenderCompleteEvent
andComponentRenderInfo.Builder#renderCompleteHandler
. (48c59c2, etc.) - Add ability to reference
@CommonProp
s (e.g. layout props, and other props common to all components) from lifecycle methods (bdce081) @TreeProp
s 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
New Features
- Imperative animations are now possible with
@OnUpdateStateWithTransition
. InterceptTouchEvent
now provides aView
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
toEditText
. (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
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.
Version 0.13.0
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 inTestSpec
s. - Added
StateValueAssert
to be able to assertStateValue
s 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 theRecyclerView
.
Version 0.12.0
Breaking changes:
StateUpdatesTestHelper
has now its own testing.state package.RowReverse
andColumnReverse
got removed.Row
andColumn
offer areverse()
property setter to achieve the same.- Stetho support, as already announced in v0.11.0, was removed.
- Last but not least,
onCreateLayout()
now returns aComponent
and not aComponentLayout
!!
buildWithLayout()
is also gone.
What's new:
- Litho now supports
StateListAnimator
. - Trigger APIs is now supported in Sections.
- New
LithoTooltip
APIs to show aPopoverWindow
.
Improvements/Fixes:
EditTextSpec
accept now aTextView.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
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
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
.