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

Separate TextField from TextFieldSection #9592

Merged
merged 1 commit into from
Nov 12, 2024

Conversation

samer-stripe
Copy link
Collaborator

Summary

Separate TextField from TextFieldSection

Motivation

This allows for better control of padding coming from TextFieldSection

Testing

  • Added tests
  • Modified tests
  • Manually verified

)
}
content = content,
)
Copy link
Collaborator Author

@samer-stripe samer-stripe Nov 11, 2024

Choose a reason for hiding this comment

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

I initially considered allowing multiple modifiers for TextFieldSection: one for the Section and one for TextField but Jetpack Compose produces a warning if attempting to have modifiers with names other than modifier.

I imagine this was done for better practices when writing Composables in order to indicate that a Composable should be split up if there are multiple modifiers required in order make it work.

This is mainly why I went with the option to make TextFieldSection a Section that reads a textFieldController for a majority of its values then have the consumer pass TextField as part of its content.

Copy link
Contributor

github-actions bot commented Nov 11, 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.8 MiB │   3.8 MiB │ +259 B │   8.4 MiB │   8.4 MiB │ +516 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.9 KiB │  24.9 KiB │    0 B 
      res │ 902.3 KiB │ 902.3 KiB │    0 B │   1.4 MiB │   1.4 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 │ 199.8 KiB │ 199.8 KiB │   +5 B │ 440.1 KiB │ 440.1 KiB │    0 B 
──────────┼───────────┼───────────┼────────┼───────────┼───────────┼────────
    total │  11.4 MiB │  11.4 MiB │ +261 B │  20.2 MiB │  20.2 MiB │ +513 B 

 DEX     │ old   │ new   │ diff           
─────────┼───────┼───────┼────────────────
   files │     1 │     1 │  0             
 strings │ 39762 │ 39760 │ -2 (+6 -8)     
   types │ 13711 │ 13712 │ +1 (+5 -4)     
 classes │ 11403 │ 11404 │ +1 (+2 -1)     
 methods │ 58604 │ 58606 │ +2 (+145 -143) 
  fields │ 38907 │ 38908 │ +1 (+256 -255) 

 ARSC    │ old  │ new  │ diff 
─────────┼──────┼──────┼──────
 configs │  242 │  242 │  0   
 entries │ 6190 │ 6190 │  0
APK
    compressed     │    uncompressed    │                                           
──────────┬────────┼───────────┬────────┤                                           
 size     │ diff   │ size      │ diff   │ path                                      
──────────┼────────┼───────────┼────────┼───────────────────────────────────────────
  3.8 MiB │ +259 B │   8.4 MiB │ +516 B │ ∆ classes.dex                             
  7.8 KiB │   -4 B │   7.7 KiB │   -4 B │ ∆ assets/dexopt/baseline.prof             
  1.2 KiB │   +2 B │   1.2 KiB │    0 B │ ∆ META-INF/CERT.RSA                       
 49.7 KiB │   +2 B │ 117.5 KiB │    0 B │ ∆ META-INF/MANIFEST.MF                    
    272 B │   +1 B │     120 B │    0 B │ ∆ META-INF/version-control-info.textproto 
    1 KiB │   +1 B │     907 B │   +1 B │ ∆ assets/dexopt/baseline.profm            
──────────┼────────┼───────────┼────────┼───────────────────────────────────────────
  3.9 MiB │ +261 B │   8.5 MiB │ +513 B │ (total)
DEX
STRINGS:

   old   │ new   │ diff       
  ───────┼───────┼────────────
   39762 │ 39760 │ -2 (+6 -8) 
  
  + LD7/N;
  + Lv6/K;
  + [LD7/C;
  + [LD7/z;
  + [Lv6/H;
  + ~~R8{"backend":"dex","compilation-mode":"release","has-checksums":false,"min-api":21,"pg-map-id":"016f3ba","r8-mode":"full","version":"8.7.14"}
  
  - LF8/X1;
  - VLLIZZLLII
  - VLLIZZLLLII
  - VLZILL
  - [LD7/A;
  - [LD7/v;
  - [Lv6/E;
  - ~~R8{"backend":"dex","compilation-mode":"release","has-checksums":false,"min-api":21,"pg-map-id":"4585225","r8-mode":"full","version":"8.7.14"}
  

TYPES:

   old   │ new   │ diff       
  ───────┼───────┼────────────
   13711 │ 13712 │ +1 (+5 -4) 
  
  + LD7/N;
  + Lv6/K;
  + [LD7/C;
  + [LD7/z;
  + [Lv6/H;
  
  - LF8/X1;
  - [LD7/A;
  - [LD7/v;
  - [Lv6/E;
  

METHODS:

   old   │ new   │ diff           
  ───────┼───────┼────────────────
   58604 │ 58606 │ +2 (+145 -143) 
  
  + A.b c() → K
  + A7.z <init>(String, int, x, D, y, I1, q, R1, J1)
  + B5.e0 <init>(D, q, G, boolean, c, int)
  + B5.s j(Object, Object) → Object
  + D7.B <init>(String, String, String, String, c, c)
  + D7.C <clinit>()
  + D7.C <init>(r, String, String, c, c)
  + D7.C describeContents() → int
  + D7.C equals(Object) → boolean
  + D7.C hashCode() → int
  + D7.C toString() → String
  + D7.C writeToParcel(Parcel, int)
  + D7.D <init>()
  + D7.D d() → c
  + D7.D j() → c
  + D7.D z() → boolean
  + D7.E <init>(L, int)
  + D7.E g(Object, Object) → Object
  + D7.F <init>(Object, int)
  + D7.G l(Object, Object, Object, Object) → Object
  + D7.H <init>(Object, int)
  + D7.H b(Object, d) → Object
  + D7.I <init>(L, d)
  + D7.I g(Object, Object) → Object
  + D7.I m(d, Object) → d
  + D7.I o(Object) → Object
  + D7.J <init>(boolean, A0, a, boolean, boolean, boolean, String, String, String, z, a, String)
  + D7.J equals(Object) → boolean
  + D7.J hashCode() → int
  + D7.J toString() → String
  + D7.K <init>(g)
  + D7.K <init>(m)
  + D7.K <init>(h)
  + D7.K <init>(a)
  + D7.K <init>(W)
  + D7.K <init>(Object, int)
  + D7.K <init>(e[])
  + D7.K create(Class) → o0
  + D7.K create(Class, c) → o0
  + D7.K create(b, c) → o0
  + D7.L <init>(J, Application, b, h0)
  + D7.L h(boolean, boolean) → c
  + D7.L i(L, boolean) → c
  + D7.L j() → b
  + D7.L k(D, A, String, String, Z0) → z
  + D7.L l() → c
  + D7.L m() → j
  + D7.L n(c)
  + D7.M <init>(c, boolean, k, boolean, f0)
  + D7.M i(Object) → Object
  + D7.N <init>(boolean, k, f0)
  + D7.N a() → Object
  + D7.e <init>(L, k, d)
  + D7.g <init>(L, k, d)
  + D7.h <init>(k, L, W, W, d)
  + D7.s <init>(int, Object, boolean)
  + D7.t <init>(boolean, w0, int)
  + D7.t g(Object, Object) → Object
  + D7.u <init>(int, Object, Class, String, String, int, int)
  + D7.u a() → Object
  + D7.v <init>(int)
  + D7.v createFromParcel(Parcel) → Object
  + D7.v newArray(int) → Object[]
  + D7.w <init>(c, c, boolean)
  + D7.w d() → c
  + D7.w z() → boolean
  + D7.x <init>(A, String, String, String, c, c)
  + D7.x j() → c
  + D7.y <init>(t1)
  + D7.z <clinit>()
  + D7.z <init>(String)
  + D7.z describeContents() → int
  + D7.z equals(Object) → boolean
  + D7.z hashCode() → int
  + D7.z toString() → String
  + D7.z writeToParcel(Parcel, int)
  + F6.b <init>(G, q)
  + F8.J1 <init>(v1, boolean, int, p, c, int, int, o, int, int)
  + F8.K1 <init>(A, boolean, boolean, String, String, A1, boolean, boolean, p, J, f0, e0, c, c, int, int)
  + F8.L1 <init>(int, int, List, boolean)
  + F8.L1 g(Object, Object) → Object
  + F8.M1 <init>(W, c, int)
  + F8.M1 <init>(c, W, int)
  + F8.N1 <init>(z1, boolean, p, int, int)
  + F8.N1 <init>(boolean, int, a, a, int)
  + F8.O1 <init>(h, int)
  + F8.O1 i(Object) → Object
  + F8.P1 <init>(v1, c, W, W, W)
  + F8.Q1 <init>(List, a, d)
  + F8.Q1 m(d, Object) → d
  + F8.Q1 o(Object) → Object
  + F8.R1 <init>(boolean, c, List, d)
  + F8.S1 <clinit>()
  + F8.S1 a() → Object
  + F8.T1 <init>(W, h, int, W, d)
  + F8.T1 g(Object, Object) → Object
  + F8.T1 m(d, Object) → d
  + F8.T1 o(Object) → Object
  + F8.U1 <init>(String, int)
  + F8.V1 <init>(String, h, int)
  + F8.V1 i(Object) → Object
  + F8.W1 <clinit>()
  + F8.W1 a(List, boolean, p, int)
  + F8.W1 b(v1, boolean, int, p, c, int, int, o, p, int, int)
  + F8.W1 c(int, p, boolean) → u0
  + F8.W1 d(p, v1, boolean, Integer, a, p, int, int)
  + F8.W1 e(A, boolean, boolean, String, String, A1, boolean, boolean, p, J, f0, e0, c, c, p, int, int)
  + F8.W1 f(x1, boolean, c, p, int)
  + F8.W1 g(z1, boolean, p, p, int, int)
  + F8.i1 <init>(p, v1, boolean, Integer, a, int
...✂

@samer-stripe samer-stripe force-pushed the samer/text-field-section-update branch from 9212a5c to 542cb7c Compare November 11, 2024 23:29
@samer-stripe samer-stripe marked this pull request as ready for review November 12, 2024 14:38
@samer-stripe samer-stripe requested review from a team as code owners November 12, 2024 14:38
@samer-stripe samer-stripe merged commit 7f91db7 into master Nov 12, 2024
16 checks passed
@samer-stripe samer-stripe deleted the samer/text-field-section-update branch November 12, 2024 14:44
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.

2 participants