Newsletter Issue #115

Published: 2022-05-10

This week, we look again at design systems and testing. We look at text editing, in terms of current problems and future solutions. And we see how MotionLayout() (the composable) compares to MotionLayout (the widget).

One Off the Stack, One Off the Slack

You’ve got questions. That’s understandable!

Can We Mix Compose and Compose Compiler Versions?

Compose has a version. The Compose Kotlin compiler plugin has a version. Do these need to be kept in sync? Learn more in this week’s highlighted Stack Overflow question!

StateFlow or State?

Here, Google’s Adam Powell takes another shot at a classic Compose conundrum: do we use StateFlow or State for exposing reactive streams from a viewmodel? See what Adam recommends in this week’s highlighted Kotlinlang #compose Slack thread!

Composable Commentary

Posts, videos, and other new information related to Jetpack Compose!

Compose Hackathon: Day 1

Google’s Zach Klippenstein has a three-post series (second post and third post) outlining a hack-week experiment to change the Compose UI text editing APIs in a way that focuses on mutable data. 👀

Here’s a productivity hack to save tens of engineering hours* when working with Jetpack Compose!

Vinay Gaba is back, looking at how we can tailor Android Studio’s auto-complete suggestions to exclude items that embody YAGNI (You Aren’t Gonna Need It) and can be trimmed out of auto-complete drop-downs. The objective is to get the Compose UI auto-completion suggestions to be more focused and minimize accidental incorrect auto-complete selections.

Medium: Implementing a fully-custom Design Language System with Jetpack Compose — Part one: Foundation

Ehsan Mehranvari explores “The Great White Whale” in Compose UI development: avoiding MaterialTheme() and implementing a completely custom design system.

Slides: How to Test Your Compose UI

István Juhos delivered a presentation at the Kotlin Budapest Meetup on Compose UI testing, including how to improve the testability of your composables while improving accessibility at the same time.

Using MotionLayout in Compose

James Shvarts returns, looking at the experimental MotionLayout() composable, bringing the animation control of MotionLayout to Compose UI. This includes creating a MotionScene, animating multiple composables, performing various types of animations, and debugging when it does not quite work the way that you want.

Medium: Custom color elevation effect in Compose

Medium is moving to Compose UI. So, Medium wrote a Medium post (by Alexandre Bruneau) on it! Specifically, it looks at elevation on Surface() in dark themes and how illumination was not working as expected, courtesy of their custom theme, and what Medium had to do to fix it.

Resource Roundup

100% pure code!

GitHub: onebone / parvenu

A bug in Compose UI makes it difficult to implement a rich text editor, because styling gets dropped. GitHub user onebone create a ParvenuEditor() wrapper around BasicTextField() that re-applies styles for you to try to work around the problem.

GitHub: oleksandrbalan / modalsheet

Oleksandr Balan and Filip Wiesner tackled another Compose UI limitation: “modal” bottom sheets are only modal within the parent composable. Sometimes, we need bottom sheets that are modal at the system level. Oleksander and Filip leverage FullScreenPopup() to implement a system-modal bottom sheet, in the form of a ModalSheet() composable.

…And One More Thing

Sorry, this was not a great week for me, and a side effect is that I do not have anything for this section. 😞

I look forward to Google I|O on Wednesday and Thursday, and I look forward to all the new Compose stuff that we can all write about in the future!