Decathlon / vitamin-ios

Decathlon Design System UI components for iOS & iPadOS applications
https://www.decathlon.design
Apache License 2.0
48 stars 14 forks source link

feat(foundations): radius implementation #43

Closed daniel-dumortier closed 2 years ago

daniel-dumortier commented 2 years ago

Changes description

Add a VitaminRadius enum to define all allowed corner radiuses as constants

Context

This PR resolves #8 , by providing fixed corner radius for every view

Checklist

Does this introduce a breaking change?

Screenshots

iPhone

image image image

iPad

image image

Other information

I explored many ideas for this foundation, such as a method that would directly modify the corner radius of any view, but that felt a little too invasive to me. I preferred just defining the correct values in an enum, and let the developer use them (every iOS developer should know how to apply a radius to a view ;) ) I also hesitated for the VitaminRadius between two solution :

Finallyn the first one felt more intuitive, but i am open to discussion.

Note : After discussion with @lauthieb , I took advantage of this PR to modify colors of labels in the the showcase for shadows, to unify the screens between shadows and radius, and have a render more like the figma one.

sonarcloud[bot] commented 2 years ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication