Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Spec] RatingView #273

Open
dhindrik opened this issue Sep 7, 2020 · 5 comments
Open

[Spec] RatingView #273

dhindrik opened this issue Sep 7, 2020 · 5 comments
Labels
feature-request A request for a new feature.

Comments

@dhindrik
Copy link

dhindrik commented Sep 7, 2020

RatingView

A rating view that shows stars. Could be used for showing reviews etc.

I wrote this blog post about how to create the control, https://danielhindrikes.se/index.php/2020/06/30/building-a-rating-control-using-xamarin-forms-shapes/. I think that is a good start but I will probably do some improvements to it when I implement it if this view is accepted.

API

RatingView

Properties

API Description
Rating The current value to show. Will redraw the stars and it is backed by a BindableProperty field
Max The number of stars to show. Will redraw the stars and it is backed by a BindableProperty field
FillColor The color to fill the stars with. Will redraw the stars and it is backed by a BindableProperty field
StrokeColor The color of strokes/border of the starts. Will redraw the stars and it is backed by a BindableProperty field
StorkeThickness The thickness of the stroke. Will redraw the stars and it is backed by a BindableProperty field
IsSelectionEnabled Enable or disable if users should be able to select a value. It is backed by a BindableProperty field

Events

API Description
RatingChanged If selection is enabled and the users tap a star this event will be fired.

Platform Compatibility

Difficulty : medium

@dhindrik dhindrik added the feature-request A request for a new feature. label Sep 7, 2020
@jfversluis
Copy link
Member

On the other side, there is a bug for iOS so we can proberly not merge this until Xamarin.Forms 5.0 is released.

In that case, we're going to hold off for this until then. Also see #172. I'm not really liking the idea of adding stuff that is broken from day 1 and we know about it. That will only cause confusion and issues that will linger around maybe forever.

Also the experimental flags is a thing, I think it's a bad practice for a library to enable experimental flags on a users app. I like the idea of this control, but we either need to implement it differently or wait for Forms to catch up.

Didn't @jsuarezruiz also have something like this in one of his samples?

@roubachof
Copy link

https://github.com/jsuarezruiz/TemplateUI/wiki/Rate

@angelru
Copy link

angelru commented Oct 9, 2020

rate is included in toolkit or TemplateUI?

@jsuarezruiz
Copy link
Collaborator

Rate is available in TemplateUI. It use Shapes API, so, we need to wait a little bit until increase the version used in the XCT. After that, I will be happy porting the control from TemplateUI to XCT and, @dhindrik will ping you to have your help.

@Cfun1
Copy link
Contributor

Cfun1 commented Feb 6, 2021

@jfversluis, @jsuarezruiz any update on this ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request A request for a new feature.
Projects
None yet
Development

No branches or pull requests

6 participants