jetc.dev Newsletter Issue #23
The sleepy (Northern Hemisphere) summer of Compose continues, so there is not a lot of news this week. But, we look at more on the padding-versus-margin conundrum, when to worry about composable duplication, FABs, a Hacker News client, and a JetBrains experiment for Compose on the Web.
One Off the Stack, One Off the Slack
You’ve got questions. That’s understandable!
This question follows up on a One Off the Slack item from two weeks ago.
The padding-versus-margin confusion will be an issue for a while. The current
Compose implementation is fairly simple: use
Modifier.padding() to add whitespace
around a composable, and remember that everything is nested composables. However,
due to the “padding” name, developers are going to make unfortunate inferences.
Given that composables wrap composables, which wrap yet more composables, one
concern is: at what point do we need to think about having common composable
implementations versus having some redundant code. In this week’s highlighted Slack
thread, we explore that, why there is no
Circle composable, and why Compose
apps might wind up building a custom library of core composable wrappers.
Posts, videos, and other new information related to Jetpack Compose!
Akshay Sawant is back with the first of two posts looking at floating
action button, with the second looking at
100% pure code!
A.J. Kueterman delivered a presentation on Jetpack Compose where he demonstrated creating a Hacker News client. This repo contains both the evolution of the app and a PDF of the presentation slides.
…And One More Thing
JetBrains, like a lot of larger firms, holds internal hackathons from time to time, to allow developers to experiment in work that is adjacent to, or perhaps well outside of, their normal area of responsibilty. They recently concluded JetBrains Hackathon: Home Edition, and one of the projects was:
Compose for Web which aimed at porting the Jetpack Compose to the web.
I wrote in this space a few months ago about the
and mentioned the Web as a possible target. Apparently, some developers at
JetBrains agreed… perhaps.
The problem is, as I wrote about a couple of months ago, there are two possible interpretations of Compose being “cross-platform”.
It could be that the JetBrains hackathon was experimenting with using the
androidx.compose engine to be able to deliver rendering instructions from
a server to a browser, such as is seen in this demo project.
Or, it could be that they were experimenting getting
in a browser, perhaps using the same Skia-for-the-Web that Flutter uses (as I understand it).
Or, maybe they had a completely different take on what a Web edition of
Compose might do.
Regardless, I find these experiments to be very interesting, particularly JetBrains
ui-desktop. Perhaps in 2021 we will see if this turns into a production-grade
option for desktop app development. That assumes, though, that between now and then,
the world is not destroyed by a 50-foot tall cyborg replica of a dead painter, with laser eyes.
(hey, it’s 2020 — given the way this year is going, can you really rule it out?)
- 2022-05-17: Google I|O 2022 videos! Compose beta01! Layout()! State! drawBehind()! Credit cards! App intros! And... what's a horologist?!?
- 2022-05-10: StateFlow vs. State! Design systems! MotionLayout! Text editing problems and solutions! And... modal sheets that are actually modal?!?
- 2022-05-03: @aditlal and @JorgeCastilloPr on design systems! KMP + Compose + SwiftUI! Dropdowns! FABs! And, what does Google I|O 2022 have in store for Compose UI developers?