Decathlon / vitamin-ios

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

feat: chip implementation for uikit #111

Closed daniel-dumortier closed 1 year ago

daniel-dumortier commented 1 year ago

Changes description

This PR adds the Chip component for UIKit version.

Context

Implements the UIKit part of issue #20

Checklist

Does this introduce a breaking change?

Screenshots

iPhone

Simulator Screen Shot - iPhone 8 - 2023-01-18 at 14 05 04 Simulator Screen Shot - iPhone 8 - 2023-01-18 at 14 04 58 Simulator Screen Shot - iPhone SE (3rd generation) - 2023-03-03 at 16 34 17

iPad

Simulator Screen Shot - iPad (9th generation) - 2023-01-18 at 14 05 57 Simulator Screen Shot - iPad (9th generation) - 2023-03-03 at 16 35 12

Other information

SimonLeclercq commented 1 year ago

@daniel-dumortier, I have some issues with the current chips: 1 - filter variant display a tag on iOS sample, but it's not required on this platform. 2 - I'm not able to close an input-chips. I don't know if it's due to the sample or if it's not provided.

Thanks ☺️

daniel-dumortier commented 1 year ago

@SimonLeclercq Regarding filter variant: Do you mean a badge(and not a tag) ? Honestly, there were two sources, and I did not know which one was the good one:

I decided to implement the more complex one ;). Before reverting my code, can you confirm that Figma is the source of truth (and eventually update ZeroHeight) ?

Regarding the input variant : All variant can be provided with an action callback that will be launched when user taps the chip. I thought it was a better idea to let the responsibility of the dismissal of the input chip within this callback to the app developer. But I you think it should be an intrinsic behavior of this component, that's ok for me, i'll dismiss the chip ans execute the callback just after.

SimonLeclercq commented 1 year ago

@daniel-dumortier yes I mean badge, excuse me.

Well noted regarding the two sources of truth, I'll take this point. Issue here: https://github.com/Decathlon/vitamin-design/issues/191

I'll take a look a callback and give you more detail as soon as possible 😀

daniel-dumortier commented 1 year ago

@SimonLeclercq Done, the badge has been removed, you can find the last showcase on slack

sonarcloud[bot] commented 1 year 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