Simplify message composer layout#4884
Conversation
|
📱 Scan the QR code below to install the build (arm64 only) for this PR. |
There was a problem hiding this comment.
I have tested the code, and it fixes the extra padding issue 🎉 .
One "regression" though:
On my device, I cannot have a RichTextEditor fullscreen as before, i.e. switch to RTE, open the bottom sheet at maximum and close the keyboard. I get this:
and previously I was able to get this:
Also in this state (bottom sheet expanded, and keyboard closed, I cannot open the keyboard. I need to reduce the bottom sheet first. Strange, but not really new apparently.
This is expected, since we now set a max height for the bottom sheet. This is how it works on iOS, so I hope it's good enough, but the code could probably be tweaked to get actual full screen though.
Oh, I hadn't noticed this. I'll see if I can reproduce it. Now I see the issue: the problem is the actual backing |
05888ab to
bed84b4
Compare
…implementation for the message composer
… focus and display the keyboard
bed84b4 to
b682450
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #4884 +/- ##
===========================================
- Coverage 80.30% 80.23% -0.08%
===========================================
Files 2161 2162 +1
Lines 57471 57504 +33
Branches 7232 7233 +1
===========================================
- Hits 46154 46137 -17
- Misses 8870 8914 +44
- Partials 2447 2453 +6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…oser-bottom-sheet
…oser-bottom-sheet
|
| .requiredHeightIn(min = 42.dp) | ||
| .fillMaxSize(), | ||
| .fillMaxSize() | ||
| .then(modifier), |
There was a problem hiding this comment.
@jmartinesp It's weird that modifier is used twice here
There was a problem hiding this comment.
Oh damn, that first usage should have been a Modifier instead.



Content
ExpandableBottomSheetScaffold, which usedSubcomposeLayoutand some quite complex logic to be able to measure and auto-size the composer in the bottom sheet. Instead, useExpandableBotttomSheetLayoutwhich uses a simpleLayoutwithIntrinsicContentSizemeasurements instead.ExpandableBottomSheetScaffold.EditText.Notes:
SubcomposeLayoutorLazyListinside the bottom sheet contents, soSuggestionPickerViewhad to be moved.Motivation and context
Simplify this layout so it won't break in the next Compose minor release.
Screenshots / GIFs
It should look exactly the same.
Tests
Use the reply, edit and normal writing functionality in both the standard textfield and the RTE. Also try mentioning users.
Tested devices
Checklist