microsoft / AdaptiveCards-Mobile

MIT License
8 stars 13 forks source link

[iOS] Support For Compound button #140

Closed guptaabhishe closed 2 weeks ago

guptaabhishe commented 1 month ago

Support For compound button

This PR adds support for compound Button which is a new adaptive card element being proposed.

Spec for compound button

Property Required Type Allowed values
type (inherited) Yes String. Must be CompoundButton  
id (inherited)   String  
requires (inherited)   Object  
isVisible (inherited)   Boolean  
separator (inherited)   Boolean  
height (inherited)   String Auto, Stretch
horizontalAlignment (inherited)   String Left, Center, Right
Spacing (inherited)   String None, Small, Default, Medium, Large, ExtraLarge
targetWidth (inherited)   String VeryNarrow, Narrow, Standard, Wide
icon   IconInfo object (see next table)  
badge   String Markdown is not supported
title Yes String Markdown is not supported
description   String Markdown is not supported
select Action   Action object. All actions allowed except Action.ShowCard  

Spec for iconInfo

Property Required   Type Allowed values
name Yes   String The name of the icon, as per the Fluent icon directory. Same as the name of the new Icon element.
size     String xxSmall, xSmall, Small, Standard, Medium, Large, xLarge, xxLarge
style     String Regular, Filled
color     String default, dark, light, accent, good, warning, attention

Sample Card

Simulator Screenshot - iPhone 15 Pro - 2024-06-03 at 16 15 11

guptaabhishe commented 1 month ago

@microsoft-github-policy-service agree company="Microsoft"

guptaabhishe commented 2 weeks ago

Looks good to me! Do you think some unit tests can be added for this feature?

Added some unit tests