Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ErrorReporter for sending error analytics #8097

Merged
merged 10 commits into from
Mar 13, 2024
Merged

Conversation

amk-stripe
Copy link
Contributor

Summary

Create ErrorReporter class & use it to send analytics when getting saved payment methods fail

Motivation

See Easy error analytics for Elements Android

I added the logging for getting saved payment methods failures here to demonstrate how the ErrorReporter works and can be used & tested

Testing

  • Added tests
  • Modified tests
  • Manually verified

Changelog

Copy link
Contributor

github-actions bot commented Mar 12, 2024

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.9 MiB │   3.9 MiB │ -772 B │   8.6 MiB │   8.6 MiB │ +1.2 KiB 
     arsc │   2.5 MiB │   2.5 MiB │    0 B │   2.5 MiB │   2.5 MiB │      0 B 
 manifest │   5.1 KiB │   5.1 KiB │    0 B │  25.4 KiB │  25.4 KiB │      0 B 
      res │ 970.6 KiB │ 970.6 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 │     3 MiB │     3 MiB │  -26 B │     3 MiB │     3 MiB │    -26 B 
    other │ 211.5 KiB │ 211.5 KiB │   +2 B │ 472.5 KiB │ 472.5 KiB │      0 B 
──────────┼───────────┼───────────┼────────┼───────────┼───────────┼──────────
    total │  13.1 MiB │  13.1 MiB │ -796 B │    22 MiB │    22 MiB │ +1.2 KiB 

 DEX     │ old   │ new   │ diff                
─────────┼───────┼───────┼─────────────────────
   files │     1 │     1 │   0                 
 strings │ 42573 │ 42600 │ +27 (+2204 -2177)   
   types │ 14492 │ 14494 │  +2 (+2176 -2174)   
 classes │ 12248 │ 12249 │  +1 (+1879 -1878)   
 methods │ 60585 │ 60586 │  +1 (+18234 -18233) 
  fields │ 40052 │ 40040 │ -12 (+10468 -10480) 

 ARSC    │ old  │ new  │ diff 
─────────┼──────┼──────┼──────
 configs │  328 │  328 │  0   
 entries │ 7269 │ 7269 │  0
APK
    compressed     │     uncompressed     │                                
──────────┬────────┼───────────┬──────────┤                                
 size     │ diff   │ size      │ diff     │ path                           
──────────┼────────┼───────────┼──────────┼────────────────────────────────
  3.9 MiB │ -772 B │   8.6 MiB │ +1.2 KiB │ ∆ classes.dex                  
    129 B │ +129 B │       5 B │     +5 B │ + META-INF/services/ki.a0      
          │ -129 B │           │     -5 B │ - META-INF/services/ji.a0      
    127 B │ +127 B │       5 B │     +5 B │ + META-INF/services/pi.n       
          │ -127 B │           │     -5 B │ - META-INF/services/oi.n       
  7.2 KiB │  -30 B │   7.1 KiB │    -30 B │ ∆ assets/dexopt/baseline.prof  
 54.7 KiB │   +6 B │ 153.5 KiB │      0 B │ ∆ META-INF/MANIFEST.MF         
    862 B │   +4 B │     730 B │     +4 B │ ∆ assets/dexopt/baseline.profm 
 68.2 KiB │   -2 B │ 153.6 KiB │      0 B │ ∆ META-INF/CERT.SF             
  1.2 KiB │   -2 B │   1.2 KiB │      0 B │ ∆ META-INF/CERT.RSA            
──────────┼────────┼───────────┼──────────┼────────────────────────────────
    4 MiB │ -796 B │   8.9 MiB │ +1.2 KiB │ (total)
DEX
STRINGS:

   old   │ new   │ diff              
  ───────┼───────┼───────────────────
   42573 │ 42600 │ +27 (+2204 -2177) 
  
  + A2
  + B2
  + C2
  + D2
  + E2
  + F2
  + G2
  + GET_SAVED_PAYMENT_METHODS_FAILURE
  + H2
  + I2
  + J2
  + K2
  + L2
  + Lai/c;
  + Lai/d;
  + Lai/e;
  + Landroidx/activity/h0;
  + Lb8/e;
  + Lbf/a0;
  + Lbf/b0;
  + Lbf/c0;
  + Lbf/d0;
  + Lbf/e0;
  + Lbf/f0;
  + Lbf/g0;
  + Lbf/g;
  + Lbf/h0;
  + Lbf/h;
  + Lbf/i0;
  + Lbf/i;
  + Lbf/j;
  + Lbf/k;
  + Lbf/l;
  + Lbf/m;
  + Lbf/n;
  + Lbf/o;
  + Lbf/p;
  + Lbf/q;
  + Lbf/r;
  + Lbf/s;
  + Lbf/t;
  + Lbf/u;
  + Lbf/v;
  + Lbf/w;
  + Lbf/x;
  + Lbf/y;
  + Lbf/z;
  + Lbg/a0;
  + Lbg/b0;
  + Lbg/c0;
  + Lbg/d0;
  + Lbg/e0;
  + Lbg/f0;
  + Lbg/g0;
  + Lbg/g;
  + Lbg/h0;
  + Lbg/h;
  + Lbg/i0;
  + Lbg/i;
  + Lbg/j0;
  + Lbg/j;
  + Lbg/k0;
  + Lbg/k;
  + Lbg/l0;
  + Lbg/l;
  + Lbg/m0;
  + Lbg/m;
  + Lbg/n0;
  + Lbg/n;
  + Lbg/o;
  + Lbg/p;
  + Lbg/q;
  + Lbg/r;
  + Lbg/s;
  + Lbg/t;
  + Lbg/u;
  + Lbg/v;
  + Lbg/w;
  + Lbg/x;
  + Lbg/y;
  + Lbg/z;
  + Lbi/b;
  + Lbj/b;
  + Lbk/b;
  + Lbk/c;
  + Lbk/d;
  + Lbk/e;
  + Lbk/f;
  + Lbk/g;
  + Lbk/h;
  + Lbk/i;
  + Lbk/j;
  + Lbk/k;
  + Lbk/l;
  + Lbk/m;
  + Lbk/n;
  + Lbk/o;
  + Lbk/p;
  + Lbk/q;
  + Lbk/r;
  + Lbk/s;
  + Lbk/t;
  + Lbk/u;
  + Lbk/v;
  + Lbk/w;
  + Lbk/x;
  + Lbk/y;
  + Lcb/j;
  + Lcb/k;
  + Lce/a1;
  + Lce/a2;
  + Lce/a3;
  + Lce/a4;
  + Lce/a5;
  + Lce/b1;
  + Lce/b2;
  + Lce/b3;
  + Lce/b4;
  + Lce/c1;
  + Lce/c2;
  + Lce/c3;
  + Lce/c4;
  + Lce/d1;
  + Lce/d2;
  + Lce/d3;
  + Lce/d4;
  + Lce/e1;
  + Lce/e2;
  + Lce/e3;
  + Lce/e4;
  + Lce/f1;
  + Lce/f2;
  + Lce/f3;
  + Lce/f4;
  + Lce/g1;
  + Lce/g2;
  + Lce/g3;
  + Lce/g4;
  + Lce/h1;
  + Lce/h2;
  + Lce/h3;
  + Lce/h4;
  + Lce/i1;
  + Lce/i2;
  + Lce/i3;
  + Lce/i4;
  + Lce/j1;
  + Lce/j2;
  + Lce/j3;
  + Lce/j4;
  + Lce/k1;
  + Lce/k2;
  + Lce/k3;
  + Lce/k4;
  + Lce/l1;
  + Lce/l2;
  + Lce/l3;
  + Lce/l4;
  + Lce/m1;
  + Lce/m2;
  + Lce/m3;
  + Lce/m4;
  + Lce/n1;
  + Lce/n2;
  + Lce/n3;
  + Lce/n4;
  + Lce/o1;
  + Lce/o2;
  + Lce/o3;
  + Lce/o4;
  + Lce/p1;
  + Lce/p2;
  + Lce/p3;
  + Lce/p4;
  + Lce/q1;
  + Lce/q2;
  + Lce/q3;
  + Lce/q4;
  + Lce/r1;
  + Lce/r2;
  + Lce/r3;
  + Lce/r4;
  + Lce/s0;
  + Lce/s1;
  + Lce/s2;
  + Lce/s3;
  + Lce/s4;
  + Lce/t0;
  + Lce/t1;
  + Lce/t2;
  + Lce/t3;
  + Lce/t4;
  + Lce/u0;
  + Lce/u1;
  + Lce/u2;
  + Lce/u3;
  + Lce/u4;
  + Lce/v0;
  + Lce/v1;
  + Lce/v2;
  + Lce/v3;
  + Lce/v4;
  + Lce/w0;
  + Lce/w1;
  + Lce/w2;
  + Lce/w3;
  + Lce/w4;
  + Lce/x0;
  + Lce/x1;
  + Lce/x2;
  + Lce/x3;
  + Lce/x4;
  + Lce/y0;
  + Lce/y1;
  + Lce/y2;
  + Lce/y3;
  + Lce/y4;
  + Lce/z0;
  + Lce/z1;
  + Lce/z2;
  + Lce/z3;
  + Lce/z4;
  + Lcf/b;
  + Lcf/c;
  + Lcf/d;
  + Lcf/e;
  + Lcf/f;
  + Lch/a0;
  + Lch/a1;
  + Lch/a2;
  + Lch/a3;
  + Lch/a4;
  + Lch/a5;
  + Lch/b0;
  + Lch/b1;
  + Lch/b2;
  + Lch/b3;
  + Lch/b4;
  + Lch/b5;
  + Lch/c0;
  + Lch/c1;
  + Lch/c2;
  + Lch/c3;
  + Lch/c4;
  + Lch/c5;
  + Lch/d0;
  + Lch/d1;
  + Lch/d2;
  + Lch/d3;
  + Lch/d4;
  + Lch/d5;
  + Lch/e0;
  + Lch/e1;
  + Lch/e2;
  + Lch/e3;
  + Lch/e4;
  + Lch/e5;
  + Lch/f0;
  + Lch/f1;
  + Lch/f2;
  + Lch/f3;
  + Lch/f4;
  + Lch/f5;
  + Lch/g0;
  + Lch/g1;
  + Lch/g2;
  + Lch/g3;
  + Lch/g4;
  + Lch/h0;
  + Lch/h1;
  + Lch/h2;
  + Lch/h3;
  + Lch/h4;
  + Lch/i0;
  + Lch/i1;
  + Lch/i2;
  + Lch/i3;
  + Lch/i4;
  + Lch/j0;
  + Lch/j1;
  + Lch/j2;
  + Lch/j3;
  + Lch/j4;
  + Lch/k0;
  + Lch/k1;
  + Lch/k2;
  + Lch/k3;
  + Lch/k4;
  + Lch/l0;
  + Lch/l1;
  + Lch/l2;
  + Lch/l3;
  + Lch/l4;
  + Lch/m0;
  + Lch/m1;
  + Lch/m2;
  + Lch/m3;
  + Lch/m4;
  + Lch/n0;
  + Lch/n1;
  + Lch/n2;
  + Lch/n3;
  + Lch/n4;
  + Lch/o0;
  + Lch/o1;
  + Lch/o2;
  + Lch/o3;
  + Lch/o4;
  + Lch/o;
  + Lch/p0;
  + Lch/p1;
  + Lch/p2;
  + Lch/p3;
  + Lch/p4;
  + Lch/p;
  + Lch/q0;
  + Lch/q1;
  + Lch/q2;
  + Lch/q3;
  + Lch/q4;
  + Lch/q;
  + Lch/r0;
  + Lch/r1;
  + Lch/r2;
  + Lch/r3;
  + Lch/r4;
  + Lch/r;
  + Lch/s0;
  + Lch/s1;
  + Lch/s2;
  + Lch/s3;
  + Lch/s4;
  + Lch/s;
  + Lch/t0;
  + Lch/t1;
  + Lch/t2;
  + Lch/t3;
  + Lch/t4;
  + Lch/t;
  + Lch/u0;
  + Lch/u1;
  + Lch/u2;
  + Lch/u3;
  + Lch/u4;
  + Lch/u;
  + Lch/v0;
  + Lch/v1;
  + Lch/v2;
  + Lch/v3;
  + Lch/v4;
  + Lch/v;
  + Lch/w0;
  + Lch/w1;
  + Lch/w2;
  + Lch/w3;
  + Lch/w4;
  + Lch/w;
  + Lch/x0;
  + Lch/x1;
  + Lch/x2;
  + Lch/x3;
  + Lch/x4;
  + Lch/x;
  + Lch/y0;
  + Lch/y1;
  + Lch/y2;
  + Lch/y3;
  + Lch/y4;
  + Lch/y;
  + Lch/z0;
  + Lch/z1;
  + Lch/z2;
  + Lch/z3;
  + 
...✂

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed providesAnalyticsRequestFactory from here, because it's now being provided in PaymentSheetCommonModule. There is a duplicated bindings error if it's provided both places

@amk-stripe amk-stripe changed the title Add ErrorReporter for easy error analytics Add ErrorReporter for sending error analytics Mar 13, 2024
@amk-stripe amk-stripe marked this pull request as ready for review March 13, 2024 00:25
@amk-stripe amk-stripe requested review from a team as code owners March 13, 2024 00:25
import com.stripe.android.payments.core.analytics.ErrorReporter

@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
class FakeErrorReporter : ErrorReporter {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we move this to the payments-core-testing module, so it's not part of the main source set?

@@ -233,7 +243,8 @@ internal class CustomerRepositoryTest {
failsOnceStripeRepository(),
{ PaymentConfiguration(ApiKeyFixtures.FAKE_PUBLISHABLE_KEY) },
Logger.getInstance(false),
workContext = testDispatcher
workContext = testDispatcher,
errorReporter = FakeErrorReporter()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems wrong, we're passing in a new instance of FakeErrorReporter, and checking the instance that's a field in the class. (Looks like there's a few instances of this).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, thanks for catching this! Fixed

Copy link

emerge-tools bot commented Mar 13, 2024

1 build increased size, 1 build decreased size, 1 build had no size change

Name Version Download Change Install Change Approval
Financial Connections Example
com.stripe.android.financialconnections.example
20.39.0 (203900) 3.5 MB - 7.9 MB - N/A
⚠️ Stripe Identity Example
com.stripe.android.identity.example.theme1
20.39.0-theme1 (20) 5.9 MB ⬆️ 2.0 MB (52.58%) 12.5 MB ⬆️ 3.2 MB (34.1%) N/A
PaymentSheet Example
com.stripe.android.paymentsheet.example
20.39.0 (11) 8.5 MB ⬇️ 102 B 16.2 MB ⬆️ 1.6 kB N/A

Financial Connections Example 20.39.0 (203900)
com.stripe.android.financialconnections.example

No changes to report

Stripe Identity Example 20.39.0-theme1 (20)
com.stripe.android.identity.example.theme1

⚖️ Compare build
⏱️ Analyze build performance

Total install size change: ⬆️ 3.2 MB (34.1%)
Total download size change: ⬆️ 2.0 MB (52.58%)

Largest size changes

Item Install Size Change Download Size Change
📝 Model_ed586fd6ca47c8eebb513c4ffaaacc2c54e92162b145062d7022519fba0... ⬆️ 713.2 kB ⬆️ 662.1 kB
📝 libCapture.so ⬆️ 1.5 MB ⬆️ 585.0 kB
📝 Model_3b11c3ffacbbf390b932fb9a7024f1a0016f66281ea8c790f8b5903374a... ⬆️ 288.8 kB ⬆️ 268.7 kB
📝 Model_021c530a7efe77c0e90c4bfe19c3bebaaceee433103e4e6d4f1424d9218... ⬆️ 308.7 kB ⬆️ 265.5 kB
📝 Model_07c7ab860e77ec2e92bb822f6d62424b8595a5beb4340f6b2f7f6a4cffa... ⬆️ 120.4 kB ⬆️ 103.2 kB
View Treemap

Image of diff

PaymentSheet Example 20.39.0 (11)
com.stripe.android.paymentsheet.example

⚖️ Compare build
⏱️ Analyze build performance

Total install size change: ⬆️ 1.6 kB
Total download size change: ⬇️ 102 B

Largest size changes

Item Install Size Change Download Size Change
com.google.android.gms.common.wrappers.InstantApps ⬆️ 78.2 kB ⬆️ 35.6 kB
com.stripe.android.financialconnections.ui.components.TextKt ⬇️ -71.7 kB ⬇️ -32.6 kB
com.nimbusds.jose.shaded.asm.DefaultConverter ⬆️ 49.5 kB ⬆️ 22.5 kB
com.stripe.android.stripecardscan.camera.GetVerifyCameraAdapterKt ⬆️ 41.5 kB ⬆️ 18.9 kB
androidx.camera.core.impl.utils.executor.MainThreadExecutor ⬇️ -38.7 kB ⬇️ -17.6 kB
View Treemap

Image of diff


🛸 Powered by Emerge Tools

@@ -151,4 +158,10 @@ internal class CustomerApiRepository @Inject constructor(
).onFailure {
logger.error("Failed to update payment method $paymentMethodId.", it)
}

private fun ErrorReporter.report(errorEvent: ErrorReporter.ErrorEvent, stripeException: StripeException) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably worth making this internal, and moving it to the same file as EventReporter.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

err, I guess it has to be public with an @RestrictTo.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is the @RestrictTo just to prevent it from being part of the public API? If so, I think that's not needed (probably bc the EventReporter interface is internal?). Lmk if the change I made doesn't match what you expected here

@@ -189,4 +191,14 @@ internal interface EventReporter {
enum class CardBrandChoiceEventSource {
Edit, Add
}

companion object {
fun ErrorReporter.report(errorEvent: ErrorReporter.ErrorEvent, stripeException: StripeException) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a mistake on my end. I meant ErrorReporter, not EventReporter 🙈

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah gotcha. Updated. I replaced the existing report function with this one. If we need a different report function/need to overload it, we can add that when it's used

@amk-stripe amk-stripe enabled auto-merge (squash) March 13, 2024 18:52
@amk-stripe amk-stripe merged commit 9e5b646 into master Mar 13, 2024
15 checks passed
@amk-stripe amk-stripe deleted the error-reporter branch March 13, 2024 19:55
carlosmuvi-stripe pushed a commit that referenced this pull request Mar 13, 2024
* Create ErrorReporter and use it to send analytics on one error

* Remove unnecessary RestrictTo annotations

* Use errorReporter in more tests

* Add param name to make it more obvious what is being tested

* Fix testing issues with FakeErrorReporter

* Move FakeErrorReporter to payments-core-testing

* Move field extraction from StripeException into an extension function

* Move ErrorReporter extension to EventReporter file + fix imports

* Update ErrorReporter API
carlosmuvi-stripe added a commit that referenced this pull request Mar 13, 2024
* [FC-V3] Add V3 typography and colors (#7612)

* [skip ci] Start PR

* Adds new typefaces.

* Updates screenshots.

* Style fixes.

* Adds new colors.

* Generates screenshots.

* Updates colors.

* Adds background to previews.

* api dump.

* [FC-V3] Update Consent Pane (#7621)

* [skip ci] Start PR

* WIP

* WIP

* Updates loading.

* Removes resources.

* Adds screenshots.

* Reverts loading.

* Style fixes.

* Removes resource.

* [FC-V3] Update Data Access and Legal dialogs (#7634)

* [skip ci] Start PR

* Updates models.

* Updates UI.

* Adds legal details and data access styles.

* Updates layout to support modal mode.

* Updates list items.

* Updates screenshots.

* Ktlint.

* Detekt.

* Uses items indexed and last index.

* Removes row.

* Uses animated content to transition between image states.

* Adds debug resources.

* Ktlint fixes.

* Adds divider on content scroll and elevation in consent.

* Adds divider on content scroll and elevation in consent.

* Adds top shadow when content is scrollable.

* Documents Layout.

* Ktlint fixes.

* [FC-V3] Update Institution Picker Pane to v3 (#7641)

* [skip ci] Start PR

* WIP

* Adds loading / disabled states.

* Removes search mode.

* Removes search mode.

* Extracts institutionIcon and uses plain lazy column.

* Updates shadows on institution icons.

* Updates api dump.

* Adds clear search button.

* Ktlint fixes.

* Disable "search more" when loading.

* [FC-V3] Update Partner Auth and Prepane to V3 (#7696)

* [skip ci] Start PR

* Updates screen.

* Adds preview.

* Adds loading shimmer screenshots.

* Updates screenshots.

* [FC-V3] Add Exit bottom sheet dialog (#7769)

* [skip ci] Start PR

* Updates exit style.

* Adds icon.

* Generates screenshots.

* Generates screenshots.

* Updates bottom padding.

* [FC-V3] Update Manual Entry Pane to V3 (#7780)

* [skip ci] Start PR

* Updates manual entry content.

* Updates API.

* [Android] Update Account Picker Pane to V3 (#7736)

* [skip ci] Start PR

* Updates account view.

* Updates merchant data access box.

* Updates loading and error screens.

* Updates screenshots.

* Adds haptic feedback.

* Updates balance badge.

* Regenerates screenshots.

* Pascal case for enum.

* ContentAlpha.

* Adds spacedBy.

* Improves preview.

* Uses content alpha.

* Detekt fixes.

* Reverts content alpha.

* Updates API.

* [FC-V3] Update Networkng Link Signup to v3  (#7802)

* [skip ci] Start PR

* Updates signup pane.

* Adds legal details notice.

* Updates selected color and elevation.

* Updates screenshots.

* Ktlint fixes.

* [Android] Update Success Pane to V3 (#7761)

* [skip ci] Start PR

* Adds success pane.

* Improves animation.

* Adds animation constants.

* Updates texts.

* Adds preview parameter provider.

* Adds preview parameter provider.

* Updates booleans for readability.

* Removes api field.

* Apidump.

* (WIP) updates manual entry success.

* Uses success content in manual entry success.

* Ktlint fixes.

* Updates screenshots.

* Uses delegation and method reference.

* uses graphic layer.

* removes count.

* Adds comment.

* Uses last4 directly.

* Moves preview parameter to composable.

* Updates screenshots.

* Updates api.

* Adds link messaging.

* [Android] Update link account picker pane to v3 (#7804)

* [skip ci] Start PR

* Uses institution icon from partner account response.

* Uses layout.

* Updates loading view

* Updates screenshots.

* Adds missing screenshots.

* Adds click handler.

* Use clickable handler in Consent.

* Unifies mainContent.

* Updates API.

* Uses shared modal bottom sheet.

* Updates screenshots.

* Just navigates on successful attach.

* Update release notes for 20.37.0 (#7803)

* Bump version to 20.37.0 (#7805)

* Generate dokka for 20.37.0 (#7808)

* Improve stability of end to end tests. (#7811)

* Add CVC to `confirm` call in Link passthrough mode. (#7812)

* Show Link email & fix dark mode issues with `LinkButton`. (#7813)

* Make tweaks to Link inline signup (#7801)

* Make tweaks to Link inline signup

* Address code review feedback

- Make names consistent
- Add test for case where prefill is desired

* Update screenshots (#7815)

Co-authored-by: runner <runner@Mac-1706055070232.local>

* Use a more stable emulator. (#7818)

* [FC-V3] Update networking login warmup pane (#7830)

* [skip ci] Start PR

* Updates warmup screen.

* Regenerates screenshots.

* Exposes contentDescription.

* Updates spacing.

* Ktlint fix.

* Uses emoji

* Use @.

* [FC-V3] Update error screens (#7845)

* [skip ci] Start PR

* Regenerates screenshots.

* Detekt fixes.

* Regenerates API.

* Updates buttons.

* [FC-V3] Update networking verification panes (#7834)

* [skip ci] Start PR

* Exposes OTP customization fields.

* Updates verification panes.

* Uses alpha.

* Updates screenshots.

* Updates styles.

* Adds single task to sample app.

* Updates screenshots.

* Ktlint fixes.

* Fixes bottom sheet borders.

* Adds error feedback.

* Shows loading on prepane CTA while authorizing account.

* Hides institution icons on account picker.

* Formats urls.

* Updates screenshots.

* Updates line height.

* Slows down consent animation.

* Updates prepane, adds CTA and image style.

* Updates shadows.

* Fixes success text saving account to link for new user.

* Always shows footer in signup page.

* Updates verification title.

* Uses redacted formatted phone number.

* Improves shimmer.

* Adds email address label and updates shared colors.

* Updates label.

* Removes shimmer.

* [V3] Navigation changes (#7922)

* [FC-V3] Support display errors as navigation destinations (#7892)

* [skip ci] Start PR

* Adds error handler to simplify usage.

* Reverts changes.

* Properly handles reset and close cases.

* Reverts institution picker changes.

* Removes function.

* Re-enables back handler.

* Makes error handler executable.

* Adds test error.

* Makes function private

* Uses factory.

* Regenerates API.

* [FC-V3] Bottom sheet navigation support via Accompanist (#7882)

* [skip ci] Start PR

* First commit - adds accompanist lib and opens prepane in drawer.

* Moves exit pane to a destination.

* Removes modal.

* Handles modal UI within partner auth pane.

* Removes unused method.

* Updates screenshots.

* Updates dependencies file.

* Replaces Accompanist dependency by local replica.

* Regenerates API.

* Merge fixes.

* Adds comment.

* Adds tests.

* Regenerates screenshots and adds more.

* Regenerates API.

* Updates tests.

* Adds accompanist attribution.

* Moves exit logic to its own viewmodel.

* Makes callbacks non-optional.

* Uses financial connections modal for navigation.

* Adds optin.

* Updates screenshots.

* Make FC playground scrollable (#7927)

* Merges master.

* Make sure back button isn't shown on first screen (#7932)

* [FC-V3] Show networking Warmup pane in bottom sheet (#7923)

* [skip ci] Start PR

* Move login pane to bottom sheet.

* Adds tests.

* Regenerates screenshots.

* Removes loading state.

* Remove wrapping box.

* Revert.

* Fixes styling.

* Dismiss software keyboard on navigation (#7925)

* Dismiss software keyboard on navigation

* Add comment about using deprecated method

* Dismiss keyboard on forward navigation

* [FC-V3] Fixes pre-pane loading states (#7943)

* Adds action type.

* Keeps existing payload to prevent showing full-screen loading.

* Updates action.

* Updates screenshots.

* [FC-V3] Remove v2/v3 references (#7958)

* Removes v2 and v3 references.

* Removes v2 and v3 references.

* Regenerates screenshots.

* Fix lint

* Update screenshots following text padding change

* Use content padding in account picker screen (#7967)

* Make button height stay consistent during load (#7945)

* Move warning suppressions to baseline file (#7977)

* Fix missing elevation for logos on consent screen (#7930)

* Update connected_account_notice object for v3 (#7975)

* [skip ci] Start PR

* Adds connected account section to modals.

* Regenerates screenshots.

* Adds connected account tests.

* Ktlint fixes.

* Screenshots updated.

* Tweak keyboard in institution picker search (#7989)

* Tweak keyboard in institution picker search

- Show appropriate IME action
- Clear focus upon search

* Update detekt baseline

* Fix small-screen issues in Networking signup screen (#7994)

* Rename `Layout` to `LazyLayout`

* Add new eager `Layout`

* Use `Layout` in Link signup screen to allow moving focus

This didn't work before because the phone number text field wasn't visible on small devices.

* Remove animation delay

* Add missing v3 analytics events (#7996)

* [skip ci] Start PR

* Adds events.

* Adds tests.

* Uses space separator.

* Make event reporting non-blocking in FC (#8010)

* Make event reporting non-blocking in FC

* Remove irrelevant `suspend` modifiers

* Update tests

* [FC-V3] Adds test pill to toolbar when on testmode.  (#7960)

* Adds testmode field.

* Renames field.

* Screenshots updated.

* Updates baseline.

* Updates baseline.

* Fix detekt baseline issue

* Use hyphen in manual entry instructions (#8023)

* [V3] Fix Success animation transition (#8017)

* Removes optional rendering.

* Regenerates screenshots.

* use named parameter.

* [V3] Fix modal spaces (#8020)

* Fix modal spaces

* Updates screenshots.

* Fix clickable tests on Link screen.

* Centers disclaimer.

* Makes screenshots more v3.

* Don't count bottom sheets towards the back stack (#8022)

* Don't count bottom sheets towards the back stack

* Add Maestro test for returning user flow

The test checks the back button visibility

* Address code review feedback

Rename `collectCanGoBackAsState` to `collectCanShowBackIconAsState`, and rename `showBack` to `allowBackNavigation`. The latter is meant to convey that it’s more about business logic rather than back stack state.

* Add autofill for phone number and OTP fields (#7995)

* Extract autofill logic into modifier

* Add autofill for phone number and OTP fields

* Add test mode button

* Use banner instead

* Reduce diff

* [V3] Manual entry: Add autofill on testmode (#8027)

* Adds autofill on manual entry.

* Disable fields while loading.

* Auto submits form.

* Uses column to wrap composables.

* Regenerates screenshots.

* Fix disabled `Save to Link` button issue (#8025)

* Fix disabled `Save to Link` button issue

* Add tests

* Persist email in FC playground (#8034)

* Add gray placeholders for consent header logos (#8031)

* [skip ci] Start PR

* Adds grey loader.

* Simplifies logic.

* Removes load method.

* Regenerates API.

* Waits for all images to load.

* Simplifies code.

* Fix consent header for icons without background.

* Fixes wrong icon.

* Disable back navigation after `Not now` in Link warmup pane (#8033)

* Initial approach

* Revert "Initial approach"

This reverts commit e06d860.

* Use NavController-based approach

Changed `tryNavigateTo` from taking `popUpToCurrent: Boolean` to taking `popUpTo: PopUpToBehavior?)`. For situations where we want to pop two destinations (the bottom sheet and its referrer), we can now use `PopUpToBehavior.Route(String)`.

* Fix rebase issue

* Address code review feedback

Add comments for clarity

* Align exit modal confirm label with Web and iOS (#8038)

* Align exit modal confirm label with Web

* Update screenshots

* Use non-breaking spaces in `manually enter details` text (#8040)

* Add `TimeZoneRule` (#8045)

* [V3] Adds padding to inst picker search bar on scroll (#8036)

* [skip ci] Start PR

* Add 8dp padding underneath the institution picker search bar.

* Removes comment.

* Regenerates screenshots

* Regenerates screenshots

* Regenerates screenshots

* Regenerates screenshots

* Extracts to method.

* Inverts consent logo dots colors.

* Send correct pane in `onCloseClick` on two Link screens (#8055)

* Show manual entry CTA instead of close on unclassified errors if allowed (#8062)

* [skip ci] Start PR

* Adds allow manual entry check on error screen.

* Regenerates screenshots.

* Adds new screenshots.

* Expose underlying `StripeException` instead of `FinancialConnectionsError` (#8058)

* Expose underlying `StripeException` instead of `FinancialConnectionsError`

* Add UI test to cover close-with-error scenario

* [V3][Manual Entry] Extracts form fields from Mavericks state (#8060)

* WIP>

* Adds tests.

* Style fixes.

* Fixes preview.

* Fixes preview.

* Renames to state

* Updates state.

* Adds tests.

* PR feedback.

* Replace more en-dashes with hyphens (#8077)

* Update button arrangement in `ExitModal` (#8073)

* Update button arrangement in `ExitModal`

* Update screenshots

* Updates skip logic.

* [V3] customSuccessMessage on Success pane. (#8070)

* Resolves custom success message before landing on success pane.

* Adds test double.

* Regenerates API.

* Style fixes.

* Style fixes.

* [V3] logic bug bash udpates (Networking) (#8079)

* Hide not now button when auto navigating from signup pane.

* Stop calling networked accounts on verification pane.

* Updates tests.

* Adds submitted event on link account picker.

* Updates tests.

* [V3] Update Maestro tests (#8050)

* [skip ci] Start PR

* Update Testmode-Data-TestOauthInstitution.yaml

* Update Testmode-PaymentIntent-TestInstitution.yaml

* Update Testmode-PaymentIntent-TestInstitution-Networking.yaml

* Update Testmode-Token-ManualEntry.yaml

* Updates livemode tests.

* Test execution.

* Updates web tests.

* Updates maestro.

* Update web test.

* Updates manual entry test.

* Updates web test.

* Accounts auto select.

* Reset bitrise.

* Adds back not visible check.

* Updates test.

* Add drag handle to bottom sheets (#8043)

* Remove single `NoArgumentsDestination` subclass in `Destination` (#8099)

* Keyboard keeps showing up after browser (#8102)

* [skip ci] Start PR

* Remove focus after selecting institution.

* Move defaultBillingDetails and shippingDetails to PaymentMethodMetadata. (#8094)

* [Identity] Butter M2 phase 1 - Support microblink detector (#7883)

* Add ErrorReporter for sending error analytics (#8097)

* Create ErrorReporter and use it to send analytics on one error

* Remove unnecessary RestrictTo annotations

* Use errorReporter in more tests

* Add param name to make it more obvious what is being tested

* Fix testing issues with FakeErrorReporter

* Move FakeErrorReporter to payments-core-testing

* Move field extraction from StripeException into an extension function

* Move ErrorReporter extension to EventReporter file + fix imports

* Update ErrorReporter API

* fix test (#8100)

* remove io dispatcher

* inject global context

---------

Co-authored-by: Samer Alabi <141707240+samer-stripe@users.noreply.github.com>
Co-authored-by: Jay Newstrom <jaynewstrom@stripe.com>
Co-authored-by: Till Hellmund <tillh@stripe.com>
Co-authored-by: runner <runner@Mac-1706055070232.local>
Co-authored-by: Chen Cen <79880926+ccen-stripe@users.noreply.github.com>
Co-authored-by: amk-stripe <160939932+amk-stripe@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants