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

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

[Feature] Standalone Spacer component #322

Closed TimRoe closed 1 month ago

TimRoe commented 1 month ago

Description of Change

Screenshots/Video

Horizontal (default size):

image

Vertical (default size):

image

Testing

Validated Spacer stories in iOS/Android/Web. The stories are a little janky on iOS/Android (Horizontal can go off the screen if you expand it, Vertical the Buttons have different widths due to not being in a container to span), but it functionally demonstrates the Spacer behavior given it being tricky to show a non-visible element. Validated unit tests fail as expected when changing the expect values.

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:

TimRoe commented 1 month ago

Regarding the weirdness in iOS/Android Storybook, do you think this could be resolved by adding some sort of wrapper with padding around our stories? I think we discussed this as well during the QA call with Adam and Tom.

I think the weirdness with the Vertical story probably could, I assume it's fitting to the text length due to whatever I had wrapping it instead of spanning the full screen width like the Button otherwise does.

The Horizontal story is weird because I'm not sure RN does horizontal screen scrolling--it definitely wouldn't make sense to wrap though given the entire point of the spacer is to provide space within what's visible. The weirdness there is making it large makes the visual elements go off the screen, which is exactly what one would expect so it's not really broken at all per se, but just a little goofy.