GetJobber / atlantis

🔱 Atlantis
https://atlantis.getjobber.com
MIT License
27 stars 30 forks source link

feat(components): Add testID to Divider and dynamically reference size and direction props #2137

Open taylorvnoj opened 1 day ago

taylorvnoj commented 1 day ago

Motivations

Updating Divider in @jobber/components as part of our continued effort to increase prop consistency between equivalent web and mobile components.

Now Divider props are exactly the same in mobile and web versions

Changes

Added

A new testID prop exists on the div. A test for that prop was also added in Divider.test.tsx

Changed

In following a similar pattern to other components in Atlantis, I decided to dynamically reference the size and direction props to ensure the component is tightly coupled to the available size/direction options. This means a few new files were created - DividerSizes.module.css and DividerDirections.module.css. This also DRYs up a bit of the logic in Divider.tsx

Testing

Testing the pre-release in product is linked below. UI/UX wise, everything remains the same as it was before. You can now add a testID .


In Atlantis we use Github's built in pull request reviews.

Random photo of Atlantis

github-actions[bot] commented 1 day ago

Published Pre-release for cb1111932f4fe1c7e60730feb46f7407a076b6d5 with versions:

  - @jobber/components@6.3.1-JOB-97733-cb11119.2+cb111193

To install the new version(s) for Web run:

npm install @jobber/components@6.3.1-JOB-97733-cb11119.2+cb111193