Status Update
Comments
gb...@manubank.com <gb...@manubank.com> #2
Branch: androidx-main
commit a330c0d3bcdd41326f37968a60e6084ad4a2e32c
Author: Chet Haase <chet@google.com>
Date: Wed Jul 05 07:26:46 2023
Convert APIs using PointF to use Float instead
PointF is a convenient mechanism for passing around x.y values
representing 2D points. But there are downsides, including:
- Converting to PointF: You may not have the data in PointF form
to begin with, so using an API which takes PointF requires converting
the data to that form (including allocating a PointF object every time)
- Mutability: Point structures can be mutated internally, causing
unpredictability in what that mutation means. Should the library
react to those changes? Ignore them? Do defensive copies (requiring
even more allocations)? Using primitive types like Float make the
behavior more obvious (by making the data inherently immutable).
- Allocations: Whenever we use object types, there are necessarily
allocations on the Java heap for them. This puts pressure on the GC
at both allocation and collection time. Given the amount of points
being passed around (especially at morph creation time, when curves
are being split and created), this causes a lot of PointF objects to
be allocated (even temporarily). Using Float avoids that problem.
Also fixed bug with unclosed paths causing discontinuity at the
start/end point.
Bug: 276466399
Bug: 290254314
Test: integration and unit tests pass
Relnote: PointF parameters changed to Float pairs
Change-Id: Id4705d27c7be31b26ade8186b99fffe2e2f8450e
M graphics/graphics-shapes/api/current.txt
M graphics/graphics-shapes/api/restricted_current.txt
M graphics/graphics-shapes/src/androidTest/java/androidx/graphics/shapes/CubicShapeTest.kt
M graphics/graphics-shapes/src/androidTest/java/androidx/graphics/shapes/CubicTest.kt
M graphics/graphics-shapes/src/androidTest/java/androidx/graphics/shapes/PolygonMeasureTest.kt
M graphics/graphics-shapes/src/androidTest/java/androidx/graphics/shapes/PolygonTest.kt
M graphics/graphics-shapes/src/androidTest/java/androidx/graphics/shapes/RoundedPolygonTest.kt
M graphics/graphics-shapes/src/androidTest/java/androidx/graphics/shapes/ShapesTest.kt
M graphics/graphics-shapes/src/androidTest/java/androidx/graphics/shapes/TestUtils.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/Cubic.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/CubicShape.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/FeatureMapping.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/FloatMapping.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/Morph.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/PolygonMeasure.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/RoundedPolygon.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/Shapes.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/Utils.kt
M graphics/integration-tests/testapp-compose/src/main/java/androidx/graphics/shapes/testcompose/DebugDraw.kt
M graphics/integration-tests/testapp-compose/src/main/java/androidx/graphics/shapes/testcompose/ShapeEditor.kt
M graphics/integration-tests/testapp/src/main/java/androidx/graphics/shapes/test/MaterialShapes.kt
pr...@gmail.com <pr...@gmail.com> #3
an...@google.com <an...@google.com> #4
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.graphics:graphics-shapes:1.0.0-alpha04
we...@sky.uk <we...@sky.uk> #5
Like us, I think this will be the last issue preventing people from fully migrating from M2 -> M3. Until this is resolved we can't fully remove the material dependency from our build files as per the migration guidelines.
al...@google.com <al...@google.com>
se...@google.com <se...@google.com>
se...@google.com <se...@google.com> #6
The latest update here:
There are some critical design concerns with pullrefresh in M2 that we would like to address before we ultimately decide to provide an M3 implementation of this component. Once this M2 work is prioritized we will be able to provide a more concrete timeline on an M3 implementation.
se...@google.com <se...@google.com>
co...@google.com <co...@google.com>
se...@google.com <se...@google.com>
re...@gmail.com <re...@gmail.com> #7
And for now, how can we use the pull to refresh features?
se...@google.com <se...@google.com> #8
PullRefresh is a known migration gap from M2 and is in active development. I dont have a strong estimate for its timeline yet but this bug will be updated as different components of this behavior are implemented.
The best way to use PullRefresh with M3 currently is to fork the M2 logic in the meantime.
st...@gmail.com <st...@gmail.com> #9
4s...@gmail.com <4s...@gmail.com> #10
je...@gmail.com <je...@gmail.com> #11
What a strange decision ! Almost every app uses pull to refresh. If you think you can improve the component, then do it, but implement the standard pull to refresh first.
ja...@gmail.com <ja...@gmail.com> #12
ja...@gmail.com <ja...@gmail.com> #13
This is a blocking issue for upgrading to M3 for us as well.
ap...@google.com <ap...@google.com> #14
Branch: androidx-main
commit 13a9759288d8af0548e08d428cb431ae30b14e51
Author: José Figueroa Santos <serniebanders@google.com>
Date: Wed Aug 16 19:42:27 2023
[Material3][PullRefresh] Add pullRefresh screenshot assets
Bug: 261760718
Change-Id: Ia0f6a6cf85e9acf5195b1b0a9e029d342e8bc5f0
A compose/material3/material3/pullRefreshIndicator_darkTheme_progress_emulator.png
A compose/material3/material3/pullRefreshIndicator_darkTheme_refreshing_emulator.png
A compose/material3/material3/pullRefreshIndicator_darkTheme_scale_emulator.png
A compose/material3/material3/pullRefreshIndicator_lightTheme_progress_emulator.png
A compose/material3/material3/pullRefreshIndicator_lightTheme_refreshing_emulator.png
A compose/material3/material3/pullRefreshIndicator_lightTheme_scale_emulator.png
ap...@google.com <ap...@google.com> #15
Branch: androidx-main
commit b82bdf308cc6144b693839eef9938e10b050e1ea
Author: Jose Figueroa <serniebanders@google.com>
Date: Wed Jul 19 17:33:30 2023
[Material3][PullRefresh] Fork M2 Implementation of PullRefreshIndicator
Test: N/A
Bug: 261760718
Change-Id: I8319a37d15fb7e10dbcfa399012bd528d8263d7e
A compose/material3/material3/src/androidAndroidTest/kotlin/androidx/compose/material3/pullrefresh/PullRefreshIndicatorTest.kt
A compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/pullrefresh/PullRefreshIndicator.kt
ap...@google.com <ap...@google.com> #16
Branch: androidx-main
commit 63b87bff724635e0086c37ae0977a5de537fc4cc
Author: Jose Figueroa <serniebanders@google.com>
Date: Wed Jul 19 18:14:02 2023
[Material3][PullRefresh] Update PullRefreshIndicator to M3
* API has been updated to be agnostic to PullRefreshState
* TonalElevation behavior has not been ported to M3
* PullRefreshIndicatorTransformation logic has been moved here
* Note: PullRefreshIndicator and PullRefreshIndicatorDefaults will be marked as public alongside the introduction of PullRefresh behavior.
Bug: 261760718
Test: Unit Tests and Screenshot tests for custom non-surface behaviors (progress, offset and refreshing).
Change-Id: I79f7a9d5bf9c08cd50b6f14133417f9c14af8bc3
D compose/material3/material3/src/androidAndroidTest/kotlin/androidx/compose/material3/pullrefresh/PullRefreshIndicatorTest.kt
A compose/material3/material3/src/androidInstrumentedTest/kotlin/androidx/compose/material3/pullrefresh/PullRefreshIndicatorScreenshotTest.kt
A compose/material3/material3/src/androidInstrumentedTest/kotlin/androidx/compose/material3/pullrefresh/PullRefreshIndicatorTest.kt
A compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/pullrefresh/PullRefresh.kt
D compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/pullrefresh/PullRefreshIndicator.kt
ja...@gmail.com <ja...@gmail.com> #17
It's merged or? When will this be available?
vo...@gmail.com <vo...@gmail.com> #18
Hello Guys, how far are we on the PullRefreshIndicator
? I am a bit hesitant to add an entire MD2 Lib in the name of an indicator.
ma...@gmail.com <ma...@gmail.com> #19
Please expose the shadow colors in the M3 version of the indicator. I did not find a way to override the shadow colors since the modifier is applied after any modifiers supplied.
.shadow(if (showElevation) Elevation else 0.dp, SpinnerShape, clip = true)
->
.shadow(if (showElevation) Elevation else 0.dp, SpinnerShape, clip = true, ambientColor = ambientColor, spotColor = spotColor)
ap...@google.com <ap...@google.com> #20
Branch: androidx-main
commit d6595618337308b4a133162833c92fb6ebf4a2fb
Author: Jose Figueroa <serniebanders@google.com>
Date: Wed Sep 27 13:54:40 2023
[Material3][PullToRefresh] Implement custom state behavior for Pull-to-Refresh
Bug: 261760718
RelNote: "Implements PullToRefreshContainer and PullToRefreshState, which together provide a pull to refresh implementation in Material3."
Test: Unit and Screenshot tests provided for PullToRefreshContainer and PullToRefreshState
Change-Id: I1645695db83e706b2f20e25b82bb937885d95abf
M compose/material3/material3/api/current.txt
M compose/material3/material3/api/restricted_current.txt
M compose/material3/material3/integration-tests/material3-catalog/src/main/java/androidx/compose/material3/catalog/library/model/Components.kt
M compose/material3/material3/integration-tests/material3-catalog/src/main/java/androidx/compose/material3/catalog/library/model/Examples.kt
A compose/material3/material3/samples/src/main/java/androidx/compose/material3/samples/PullToRefreshSamples.kt
M compose/material3/material3/src/androidInstrumentedTest/kotlin/androidx/compose/material3/pulltorefresh/PullToRefreshIndicatorScreenshotTest.kt
M compose/material3/material3/src/androidInstrumentedTest/kotlin/androidx/compose/material3/pulltorefresh/PullToRefreshIndicatorTest.kt
A compose/material3/material3/src/androidInstrumentedTest/kotlin/androidx/compose/material3/pulltorefresh/PullToRefreshStateImplTest.kt
D compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/pullrefresh/PullRefresh.kt
A compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/pulltorefresh/PullToRefresh.kt
se...@google.com <se...@google.com> #21
This has been landed as an Experimental component. The plan is to have this extensively tested and reviewed for API and behavior, as well as future design plans within Material 3. Please open separate bugs and feature requests as this component becomes available in future releases. And thank you for the continued patience on this one.
Description