Compose 1.3.3 artifacts released today :party-parr...
# compose
c
Compose 1.3.3 artifacts released today 🦜 • Only a single change apparently... "Fix for a crash sometimes happening on Android 9 when Activity is saving the state of the Compose View" Compose 1.4.0-alpha04 Lots of changes! 🦜 🦜 🦜 • Added a new
PinnableContainer
API that allows lazy list items to be pinned, so that they are not disposed when they are scrolled out of bounds. For example,
Modifier.focusable()
uses this mechanism to pin the currently focused item. (Ib8881, b/259274257, b/195049010) • The focus system is rewritten using the new experimental
Modifier.Node
APIs. (I7f4d7, b/247708726, b/255352203, b/253043481, b/247716483, b/254529934, b/251840112, b/251859987, b/257141589) • Added in
IsContainer
semantics property on Surfaces. This property will be used in a later change that determines traversal order based on the semantic meaning of elements such as surfaces. (I63379) • Added new accessibility role
DropdownList
. This can be used to replicate
TalkBack's
behavior when focusing
android.widget.Spinner
. (I177e5, b/236159001) • You can now use
PlatformTextStyle(emojiSupportMatch)
to optionally disable emoji support processing for a single Paragraph. (Ia7100, b/139326806) • Android Compose UI tests will now run layout passes for each frame when executing frames to get to idle (e.g. via
waitForIdle
). This may affect tests that assert on individual frames of layout animations. (I8ea08, b/222093277) • Added experimental
TextMotion
to
TextStyle
to define Text either to be
Static(default)
or Animated. Use
TextMotion.Animated
if Text is going to be scaled, translated, or rotated via animation. (I24dd7) • Lots of api changes regarding fonts, read more in the actual changelog here
FlowRow
and
FlowColumn
are now available as
@ExperimentalFoundationApi
that allow for a more flexible row and column based layout of components that will break to a new line if there is not enough space on the main axis. (I3a7b2) • `Modifier.basicMarquee()`is available as experimental for displaying content with a scrolling marquee effect. (I2df44, b/139321650) • Adjustments in the snapping physics in
SnapFlingBehaviour
for a more natural feel. • Added a track color parameter for circular progress indicators, and a stroke cap parameter for both circular and linear progress indicators. (Ie668c, b/216325962, b/222964817) • Renamed
ModalBottomSheetState
,
ModalBottomSheetState.Saver
and `rememberModalBottomSheetState`'s
confirmStateChange
to
confirmValueChange
. (Ib48d1) EDIT: The list of cool changes is too big. Putting some of the rest in the thread
🔥 7
🤗 1
🙏 8
🎉 21
🚀 3
• Add
Modifier.minimumInteractiveComponentSize
. It can be used to reserve at least 48.dp in size to disambiguate touch interactions if the element would measure smaller. (I33f58, b/258495559) • Incorporated changes in the Swipeable APIs in
ModalBottomSheetLayout
. `ModalBottomSheetState`'s
animateTo
does not take an
animationSpec
parameter anymore and the
offset
exposed is now nullable. Use
requireOffset
to require the
offset
. (Ia2e79) • A `ModalBottomSheetLayout`'s sheet now has a maximum width of 640 dp. (I71a4f, b/234927577) • Fixes an issue where
rememberPullRefreshState
was not updating
refreshThreshold
and
refreshingOffset
over time. (Ifed10, b/263159832) • Progress for progress indicators is now properly bounded to its expected range. (I8a7eb, b/262262727) • When
ModalBottomSheetState
has not received any anchors yet, it will update the
currentValue
without an animation when
snapTo
or
animateTo
are called instead of throwing an exception. (I2c91b) • Fixed the enabled state at the Material 2
FilterChip
implementation. (Id326a, b/261329817) • Fixed a bug where
ModalBottomSheetLayout
would crash if it was
HalfExpanded
when rotating from portrait to landscape. Please ensure you are passing in the correct
initialValue
, for example by checking the configuration. (Ie8df7, b/182882364) • Fixed an issue where
ModalBottomSheetLayout
would crash if the sheet content was empty.
ModalBottomSheetLayout
now allows empty sheet content. If the sheet content is empty, it will only have a Hidden state. (Ic2288, b/200980998, b/216693030) Material3 updates in 1.1.0-alpha04 • Initial
DatePicker
API for picking a single date via a calendar UI. This API is still undergoing changes. (I722b9) • Added support for plain tooltips via
PlainTooltipBox
. (I0cdfb) • Search bar (Iad128) •
SwipeToDismiss
(I458a8, b/242889540)
Personally I can't wait to try out all of the new Focus improvements, as well as the BottomSheet improvements, FlowRow!, snap physics improvements in SnapFlingBehavior! SO MUCH STUFF ❤️
z
"Fix for a crash sometimes happening on Android 9 when Activity is saving the state of the Compose View" 😍
a
I'm hoping the 'Protect
SnapshotStateObserver
from recursive and concurrent applies (d902fb)' fixes the issues we've been seeing for awhile that seem related to concurrent/fast updates to state. too bad the issuetracker link doesn't work since its a private issue
m
this feels great!
t
btw @Colton Idle never stop doing these pls, they’re so helpful 🙏🏼
c
It feels borderline spammy but typically well received. Lol
t
Its super useful coz all the release notes are spread across the various artifacts 💀
m
it’s more readable than the google version lol
c
I also read through the diffs because there are hidden gems in there too
b
I wonder why `ModalBottomSheetState`'s API were locked down? Can't access sheetState.progress, offset, animateTo properties no more since they're internal now or removed.
e
Cc @Humaira Naeem Pasha
c
@jossiwolf ^^
j
Some properties previously exposed by
ModalBottomSheetState
meanings changed with some refactorings, e.g.
progress
.
animateTo
was made internal as
show()
provides the same functionality and makes sure the UX adheres to the Material Design guidelines. We're not exposing
offset
currently but are happy to consider re-exposing this if there are good use cases 🙂
c
FWIW, I was using `progress`/
offset
in the past to drive some cool animations (i.e. parrallax effect when bottom sheet was being dragged up). Not sure if there's a way to do that without offset now.
b
Yeah I was also using progress/offset to animate things when bottomsheet is being dragged, not possible anymore.
j
Would you have code examples of how you used it?
c
I think I was just using animateFloatAs* or w/e that api is and I would change the x,y coordinates of something else based off of the progress
b