Closed samer-stripe closed 2 weeks ago
With the individual padding removed, the components contain only their renderable element. The downside to this is that every screen must replicate this behavior. This is not necessarily a bad thing. It gives more control to developers using these elements manually (Identity, US Bank Account Form) to define the padding between elements as they expect based on design changes.
Diffuse output:
OLD: paymentsheet-example-release-master.apk (signature: V1, V2)
NEW: paymentsheet-example-release-pr.apk (signature: V1, V2)
│ compressed │ uncompressed
├───────────┬───────────┬───────┼───────────┬───────────┬────────
APK │ old │ new │ diff │ old │ new │ diff
──────────┼───────────┼───────────┼───────┼───────────┼───────────┼────────
dex │ 3.8 MiB │ 3.8 MiB │ +32 B │ 8.4 MiB │ 8.4 MiB │ -132 B
arsc │ 2.3 MiB │ 2.3 MiB │ 0 B │ 2.3 MiB │ 2.3 MiB │ 0 B
manifest │ 5 KiB │ 5 KiB │ 0 B │ 24.7 KiB │ 24.7 KiB │ 0 B
res │ 931.2 KiB │ 931.2 KiB │ 0 B │ 1.5 MiB │ 1.5 MiB │ 0 B
native │ 2.6 MiB │ 2.6 MiB │ 0 B │ 6 MiB │ 6 MiB │ 0 B
asset │ 1.6 MiB │ 1.6 MiB │ -3 B │ 1.6 MiB │ 1.6 MiB │ -3 B
other │ 200.9 KiB │ 200.9 KiB │ -1 B │ 442.4 KiB │ 442.4 KiB │ 0 B
──────────┼───────────┼───────────┼───────┼───────────┼───────────┼────────
total │ 11.5 MiB │ 11.5 MiB │ +28 B │ 20.3 MiB │ 20.3 MiB │ -135 B
DEX │ old │ new │ diff
─────────┼───────┼───────┼────────────────
files │ 1 │ 1 │ 0
strings │ 39655 │ 39653 │ -2 (+11 -13)
types │ 13666 │ 13665 │ -1 (+7 -8)
classes │ 11364 │ 11363 │ -1 (+2 -3)
methods │ 58386 │ 58381 │ -5 (+336 -341)
fields │ 38724 │ 38722 │ -2 (+512 -514)
ARSC │ old │ new │ diff
─────────┼──────┼──────┼──────
configs │ 242 │ 242 │ 0
entries │ 6247 │ 6247 │ 0
Name | Version | Download | Change | Install | Change | Approval |
---|---|---|---|---|---|---|
Stripe Identity Example com.stripe.android.identity.example.theme1 |
20.53.0-theme1 (20) | 3.8 MB | ⬆️ 758 B (0.02%) | 8.9 MB | ⬆️ 293 B | N/A |
Financial Connections Example com.stripe.android.financialconnections.example |
20.53.0 (205300) | 4.2 MB | ⬇️ 560 B (-0.01%) | 9.4 MB | ⬆️ 35 B | N/A |
PaymentSheet Example com.stripe.android.paymentsheet.example |
20.53.0 (11) | 7.1 MB | ⬆️ 360 B | 14.4 MB | ⬇️ 135 B | N/A |
⚖️ Compare build ⏱️ Analyze build performance
Total install size change: ⬆️ 293 B Total download size change: ⬆️ 758 B (0.02%)
Largest size changes
Item | Install Size Change | Download Size Change |
---|---|---|
kotlin.math.MathKt | ⬆️ 3.5 kB | ⬆️ 1.7 kB |
Other | ⬇️ -3.2 kB | ⬇️ -936 B |
⚖️ Compare build ⏱️ Analyze build performance
Total install size change: ⬆️ 35 B Total download size change: ⬇️ 560 B (-0.01%)
Largest size changes
Item | Install Size Change | Download Size Change |
---|---|---|
📝 com.stripe.android.financialconnections.navigation.Destination$$E... | ⬆️ 1.5 kB | ⬆️ 702 B |
com.stripe.android.financialconnections.features.common.Verificat... | ⬇️ -1.4 kB | ⬇️ -641 B |
Other | ⬇️ -97 B | ⬇️ -621 B |
⚖️ Compare build ⏱️ Analyze build performance
Total install size change: ⬇️ 135 B Total download size change: ⬆️ 360 B
Largest size changes
Item | Install Size Change | Download Size Change |
---|---|---|
androidx.compose.material.TextFieldMeasurePolicy | ⬇️ -3.0 kB | ⬇️ -1.3 kB |
com.google.android.libraries.places.internal.zzazh | ⬆️ 2.4 kB | ⬆️ 1.1 kB |
Other | ⬆️ 456 B | ⬆️ 630 B |
:flying_saucer: Powered by Emerge Tools
Summary
This is a prototype of a first step to a solution for fixing form element padding within the form displayed in
PaymentSheet
. Rather than have the individual components define their own padding, the consumers of the elements must define how an element is spaced.Motivation
We make a lot of padding assumptions when rendering elements, especially in regards to whether elements are above and/or below a rendered element. This has created problems in trying to properly space other UI elements outside the form because the bottom and top form padding are unknown to the consumer.
With better control over the padding in
FormUI
we can render the exact amount of padding we need within the form while removing any top padding from the first element and bottom padding from the last element, allowing the consumer better control over how to define the spacing outside the form which help immensely with fixing mandate and error spacing.