department-of-veterans-affairs / va-mobile-library

https://department-of-veterans-affairs.github.io/va-mobile-library/
ISC License
1 stars 0 forks source link

[Feature] Create Radio Button Component #586

Open TimRoe opened 2 weeks ago

TimRoe commented 2 weeks ago

Description of Change

Created the Radio button component. Given the extreme similarities to Checkbox/Checkbox group, this involved pulling out a shared component (CheckboxRadio) to have shared code under the hood and basically just conditionally swap the icon. Then Radio button itself was formed off modifying Checkbox group so only one would be selected.

Testing Packages

Screenshots/Video

iOS: Not recorded in Storybook because ExpoGo app was updated and, unlike Android, there's no way to install an older version so it's out of commission until we update dependencies to the newer SDK.

Android:

https://github.com/user-attachments/assets/c165b259-0f57-421a-9b2c-809f68592ac4

Web:

https://github.com/user-attachments/assets/b42dc73d-239e-4ad2-ae09-51c3e7bf9918

Flagship (iOS):

https://github.com/user-attachments/assets/56cd2c16-1217-4602-9a24-3d06d8fb580d

Flagship (Android):

https://github.com/user-attachments/assets/5b5d38f5-61f1-422a-970a-6d95af31037a

Testing

Smoke tested nothing appeared to break with existing Checkbox/Checkbox group with the transition to shared underlying component with Radio.

Validated Radio button appeared to be behaving as expected in Web/iOS/Android (including iOS/Android in flagship). One bug noted with VoiceOver (iOS) only where it intermittently (more often than not, but not always) when activating a different radio will read out that it is unselected then immediately read out again that it is selected; bug #596 created.

PR Checklist

Code reviewer validation:

Publish

If changes warrant a new version per the versioning guidelines and the PR is approved and ready to merge: