Skip to content

Commit cd8e740

Browse files
LiamSarsfieldmatticbot
authored andcommitted
Forms: Display star rating icons in response inspector (#46874)
* Forms: Add FieldRating component for response inspector * Forms: Display star rating icons in response inspector * Add changelog entry * Forms: Add accessibility support to FieldRating component * Forms: Add unit tests for FieldRating component * Forms: Add validation and clamping to FieldRating - Validate rating and max values are finite and non-negative - Clamp rating to max value to prevent overflow (e.g., 7/5 shows 5 stars) - Fall back to "-" for non-numeric values Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Forms: Show filled and empty stars for rating display Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Forms: Add strict numeric parsing for rating values Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Forms: Add upper bound for rating icons to prevent DOM bloat Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Forms: Extract RatingIcon component for reuse Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Forms: Extract RatingIcon to shared module Move RatingIcon component from input-rating/edit.js to a dedicated rating-icon.js file to allow importing without editor dependencies. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Forms: Add MAX_RATING_ICONS constant to shared module Move the max rating icons limit to rating-icons.js as a shared constant. Update field-rating/edit.js to import and use it. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Forms: Use shared rating modules in dashboard Import RatingIcon and MAX_RATING_ICONS from the shared modules instead of the block editor files to avoid pulling in unnecessary dependencies. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * add strokeWidth as option to rating icon * thinner stroke on empty stars * simplify output on early bails --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/21641914065 Upstream-Ref: Automattic/jetpack@3cf71ee
1 parent 61fa492 commit cd8e740

File tree

0 file changed

+0
-0
lines changed

    0 file changed

    +0
    -0
    lines changed

    0 commit comments

    Comments
     (0)