Skip to content

[6.x] Forms 2: Extract star rating, ranking and image choice into UI components - #15068

Merged
jackmcdade merged 8 commits into
forms-2from
forms-2-extract-fieldtypes
Aug 14, 2026
Merged

[6.x] Forms 2: Extract star rating, ranking and image choice into UI components#15068
jackmcdade merged 8 commits into
forms-2from
forms-2-extract-fieldtypes

Conversation

@duncanmcclean

@duncanmcclean duncanmcclean commented Jul 23, 2026

Copy link
Copy Markdown
Member

This pull request refactors three of the fieldtypes added in Forms 2, extracting their markup and behaviour into reusable UI components.

StarRating, RankList and ChoiceGrid are now exported from @statamic/cms, so they're available to the rest of the Control Panel and to addons. The fieldtypes themselves are now thin wrappers that map their config onto the component's props.

@jackmcdade
jackmcdade self-requested a review August 14, 2026 02:57
@jackmcdade jackmcdade self-assigned this Aug 14, 2026
The thumb was padded as if `min` always equaled `step`, so a min of `2` shifted the fill onto the wrong star (and was a non step fraction). Solution was to pad from `min` and `offset` by half the gap so .5 values land on the star center instead of halfway through the cell.

@jackmcdade jackmcdade left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! I tested em pretty hard. Found an issue w/ half-stars on the StarRating component but got it fixed up.

@jackmcdade
jackmcdade merged commit 291bb65 into forms-2 Aug 14, 2026
61 checks passed
@jackmcdade
jackmcdade deleted the forms-2-extract-fieldtypes branch August 14, 2026 04:00
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.

2 participants