Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android] Adding support for RatingInput and readOnly Rating Element #144

Merged
merged 18 commits into from
Jun 3, 2024

Conversation

singhmanp0707
Copy link
Collaborator

@singhmanp0707 singhmanp0707 commented May 23, 2024

Support for New Rating elements

This PR adds support for two new elements: "Input.Rating" and "Rating". First one is for taking rating value as input from users and second one shows rating value in read only mode.

Spec for Input.Rating:

Property name Required Type Allowed values Description
type Yes String, must be Input.Rating
id Yes String
requires Object
isVisible Boolean
separator Boolean
height String Auto, Stretch
horizontalAlignment String Left, Center, Right
spacing String None, Small, Default, Medium, Large, ExtraLarge
targetWidth String VeryNarrow, Narrow, Standard, Wide
label String
isRequired Boolean
errorMessage String
valueChangedAction Action object, can only be an Action.ResetInputs
value Number The number of stars selected by default. Cannot exceed max if max is specified.
SMBA: just ensure it’s a number
max Number The total number of stars. Maximum and default is 5.
SMBA: just ensure it’s a number
allowHalfSteps Boolean Determines if the user can select half stars
size String Medium or Large The size of the stars
color String Neutral or Marigold The color of the stars

Spec for Read Only Rating:

Property name Required Type Allowed values Description
type Yes String, must be Rating
id String
requires Object
isVisible Boolean
separator Boolean
height String Auto, Stretch
horizontalAlignment String Left, Center, Right
spacing String None, Small, Default, Medium, Large, ExtraLarge
targetWidth String VeryNarrow, Narrow, Standard, Wide
value Number The number of stars selected. Cannot exceed max if max is specified.
count Number The number of ratings that make up the average (see the gold star in the example above)
max Number The total number of stars. Maximum and default is 5.
size String Medium or Large The size of the stars
color String Neutral or Marigold The color of the stars
style String Default or Compact In compact mode, only one star is displayed.

Sample Card

RatingElement

@singhmanp0707 singhmanp0707 removed the request for review from ardlank June 3, 2024 08:12
@singhmanp0707 singhmanp0707 merged commit 050f4d4 into main Jun 3, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants