Status Update
Comments
f....@gmail.com <f....@gmail.com> #3
Thanks for the report!
ni...@google.com <ni...@google.com> #4
The release notes documentation has been edited to clarify this change in behavior for line height.
To support non-standard text sizes, we encourage users to follow the Material design system and use a different style = LocalTextStyle.current.copy(lineHeight = TextUnit.Unspecified)
, or create a custom Typography
entirely.
ma...@google.com <ma...@google.com> #6
In my case, I have multiple font sizes in the same Text
(using SpanStyle
in AnnotatedString
). There are legitimate reasons for this. For example, when combining Chinese and English (phonetic) together (for language-learning purposes).
ay...@google.com <ay...@google.com> #7
Hey Max, nice work!
Can you explain why this adopter is looking to have a left aligned FAB? That information will help me evaluate if this pattern is an acceptable user experience and where the hamburger menu could be placed.
ma...@google.com <ma...@google.com> #8
I believe the user has explained the use case as well as provided a screen shot in
f....@gmail.com <f....@gmail.com> #9
As someone named Max myself, I'd also like to say nice work to my fellow Max for the progress on this.
To explain the use case further, I am presenting numerical data on the 'end' side of the bottom sheet, which naturally leaves space on the 'start' end and makes it awkward to place the FAB anywhere else (I have tried). I've attached a screenshot with the FAB in the Start position as I intend. In landscape mode, as you can see, it becomes even more critical to place the FAB at the start because the vertical space is at a premium.
Another point is, assuming a right handed user using their thumb in portrait mode, it's actually a lot easier to tap a FAB on the lower-left hand side of the screen, than one on the lower-right hand side. So IMO the FAB position should be allowed on either side of the screen.
Regarding the hamburger menu, can it just stay at the top left in this case? I don't see how the ability to place a hamburger menu on the bottom left implies that it should be impossible (using the API) to place a FAB there instead.
ay...@google.com <ay...@google.com> #10
Hey all, apologies for the lag time on my end. This is an acceptable modification for the FAB given the content in the bottom sheet.
ma...@google.com <ma...@google.com> #11
Hey Ayan, can you clarify the expected behavior of the screenshot in
ay...@google.com <ay...@google.com> #12
Sorry I missed your question in #6, Max!
One alternative solution is swapping the start placement for the hamburger menu (and icon) to the right. This could result in awkward UX, so I wouldn't advise we add this use case to spec.
se...@google.com <se...@google.com>
ap...@google.com <ap...@google.com> #13
Branch: androidx-main
commit cc2b03e66b081b4b7425e58fdb1fc9209acace9a
Author: Max Alfonso-Ying <maxying@google.com>
Date: Wed Jun 14 19:18:03 2023
Add 'Start' position for FabPosition
Relnote: Added new Start alignment for FabPosition
Fixes:
Test: ScaffoldTest, BottomSheetScaffoldTest, ScaffoldScreenshotTest
Change-Id: Ib7aea97d6ac5c6ee33fd10916c74c540ff5889de
M compose/material/material/api/current.txt
M compose/material/material/api/restricted_current.txt
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/BottomSheetScaffoldTest.kt
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/ScaffoldScreenshotTest.kt
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/ScaffoldTest.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/BottomSheetScaffold.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/Scaffold.kt
M compose/material3/material3/api/current.txt
M compose/material3/material3/api/restricted_current.txt
M compose/material3/material3/src/androidAndroidTest/kotlin/androidx/compose/material3/ScaffoldTest.kt
M compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/Scaffold.kt
na...@google.com <na...@google.com> #14
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.material:material:1.6.0-alpha02
androidx.compose.material:material-android:1.6.0-alpha02
androidx.compose.material3:material3:1.2.0-alpha04
androidx.compose.material3:material3-android:1.2.0-alpha04
Description
Hi, I just migrated to the Compose implementation of
BottomSheetScaffold
today, but found I couldn't place the FAB on the left side of the screen using thefloatingActionButtonPosition=
argument ofBottomSheetScaffold
.In my app, the FAB needs to be placed on the left side of the screen and can't be placed on the right or in the middle, as you can see in the screenshot.
So I would like to request that a 'Start' position is added to the FabPosition enum.
Thank you.