jetc.dev Newsletter Issue #53

Published: 2021-02-23

In all likelihood, tomorrow will see the dawn of the beta01 release of Compose and Compose UI! So, in this issue, we link to the livestream and take a look at what Google is likely to do in the next few months.

Along with that, we have some chips (without fish), look at the swipe-to-reveal pattern and role semantics for accessibility, and peek at a bunch of Compose for Desktop projects on GitHub.

One Off the Stack, One Off the Slack

You’ve got questions. That’s understandable!

Solid and Outlined Chips

Chips — words or phrases surrounded by a square or rounded rectangle — are a popular UI for keywords. You can implement them fairly easily in Compose UI by wrapping your Text() with a Surface() that sets its border and color, as we see in this week’s highlighted Stack Overflow thread.

Performance: It’s Getting Beta

As we continue down the track towards a stable release, developers are getting increasingly worried about perceived performance issues with Compose UI. Google’s Adam Powell explained where Google’s focus will be in the coming months and put out a call for your help, in this week’s highlighted Kotlinlang #compose Slack thread.

Composable Commentary

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

Livestream: #TheAndroidShow​ Jetpack Compose Livestream

This presentation, scheduled for 24 February at 9am Pacific Time, is likely to be where the Compose beta01 release is announced!

Swipe to Reveal in Jetpack Compose

Denis Rudenko is exploring the swipe-to-reveal UI pattern, where a short horizontal swipe gesture on a list row uncovers actions to take against that item, such as edit or delete. Compose UI does not offer this “out of the box”, so Denis created a DraggableCard() to implement this pattern.

(De)composing Action Bars Continued

Thomas Künneth follows up last week’s post and looks more at implementing action bar patterns in Compose UI. This time, he focuses on actions and drop-down menus, translating their menu resource into Compose UI equivalents for use with a Scaffold() and its TopAppBar().

ShapeableView in Jetpack Compose. Part 2

Rasul Aghakishiyev returns with a continuation of his previous work on creating ShapeableView(). This time, he adds rounded corners as an option, along with the previous cut-corners implementation.

Role Semantics in Jetpack Compose

Bryan Herbst continues his coverage of Compose UI’s accessibility options, this time looking at the semantics() modifier and its role parameter. This lets you describe the general nature of a composable based upon classic UI roles (e.g., button), to help TalkBack and similar accessibility services describe your UI to visually impaired users.

Jetpack Compose: What you need to know, pt. 2

Cleverlance continues their analysis of Compose and Compose UI, following up on their original post, showing some of the pros and cons of using Compose in production apps.

Resource Roundup

100% pure code!

GitHub: app-outlet / karavel

GitHub user app-outlet has released another navigation solution for Compose, with an eye towards Compose for Desktop.

GitHub: maxhvesser / kotdoc-android

Maximilian Hvesser-Lewis is creating a mobile client for the Kotlin documentation, using Compose UI for the user interface.

GitHub: theapache64 / name-that-color-desktop

GitHub user theapache64 opened up a pair of repositories recently. This one is a Compose for Desktop app for identifying the name for a user-selected color. This includes integration with the desktop clipboard and even generates a Compose UI snippet for defining that color in your app. theapache64 also released stackzy, a tool written in Compose for Desktop for examining apps on a connected device and determining what major libraries they use.

GitHub: Reyurnible / OthelloPackComposeDesktop

Shun Hosaka created an Othello (also known as Reversi) game, where the UI is implemented in Compose for Desktop.

…And One More Thing

It is all but assured that tomorrow, we will get the beta01 release of Jetpack Compose.

Last week, I argued that this beta release was rushed, and I stand by that assessment. However, “time and tide wait for no man”, so Compose will now take another major step towards its first stable release.

Here is what I expect will transpire:

  • beta01 will be released tomorrow.

  • Google will continue with the every-other-week release cadence, outside of occasional hiccups, at least through the beta releases. I would not be shocked if things slow down when we get to rc releases, though. Most Jetpack libraries are slower about updating rc versions.

  • Google likes to claim that a beta release offers a stable API surface. In reality, API changes are not uncommon in betas, though usually they are more limited than the API changes that we see in alphas. Plus, APIs are more fluid in the run-up to a stable 1.0.0 release than in later releases. So, while major refactorings are probably done for now, I expect that the API will still change somewhat during the Compose beta period.

  • Google’s primary focus will be on performance and stability, and API changes will be tied into those concerns. In other words, we are unlikely to get new composables or modifiers, but we might get some changes to parameter lists, as performance and stability fixes trigger the need for new parameters, changes from booleans to enums, and the like.

  • We will get six beta releases or more. That stems mostly from the sheer size of Compose and Compose UI, as there is a lot of performance and stability ground to cover. That will take time, and if they stick with the bi-weekly release cadence, that means a lot of beta releases. However, with fewer changes to the API, taking on beta upgrades hopefully will be fairly easy.

To me, the biggest mystery in terms of timeframe is how they will handle the RC releases, in terms of cadence and number. But, between beta and RC releases, I would not be surprised if we are still 4-5 months away from a stable 1.0.0 release. That is well within Google’s stated timeline, which called for a stable 1.0.0 release by the end of 2021. People looking to provide educational resources related to Compose and Compose UI (👋) can use the time!

Regardless of that timeframe, though, the next phase of Jetpack Compose’s evolution begins tomorrow. It will be interesting to see how it turns out!