microsoft / microsoft/AdaptiveCards

{Linked:Bug25741511;Linked:Bug24983095} New Feature Request: Rating control (stars)

Open
#3,054 34 comments 9 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A11ySev2 A11yWCAG Area-Accessibility Area-Renderers Bug Feature HCL-AdaptiveCards-Android HCL-AdaptiveCards-Mobile HCL-E+D Platform-Android Product-AC Unshipped Feature
Dominant language
C#
Stars
2k
Forks
595
Avg merge
1d 19h
Merged PRs (30d)
1

Description

Proposal: Adaptive Cards Feedback Controls

Summary

Feedback control features should be implemented in the Adaptive Cards framework. Specifically, the framework should allow for binary feedback (i.e., thumbs up/thumbs down functionality), as well as the traditional star-rating feedback. These controls should be flexible enough to fit the needs of any card author.

Rationale

  • Several customers have directly expressed interest in tools allowing users to easily send feedback, such as a star-rating system or a thumbs up/thumbs down system. Customers are currently finding workarounds to this functionality, but a native feature would improve usability for both users and developers.
  • User feedback and customer data are key for companies to gauge success and explore avenues for improvement. Feedback control functionality for Adaptive Cards would facilitate easier collection of feedback and data points.
  • Both the traditional star-rating control as well as a separate thumbs up/thumbs down control are necessary due to the different use cases between the two controls. A binary system may be better suited for situations in which a company values quantity of responses (a user may be more inclined to respond with fewer options). In fact, Netflix recently made the switch to a binary feedback system after finding that this type of system received 200% more user responses than the traditional star-rating system. On the other hand, a company that values more engaged feedback, such as Yelp or Amazon in the case of restaurant and product reviews, may find that a star-rating system better suits its needs.

Scope

Capability Priority
This proposal will allow card authors to gather user feedback on an Adaptive Card, both on a 5-point and binary (2-point) scale Must
This proposal will allow card authors access to customization features for feedback control, including the ability to change rating icons, rating scale, and rating labels Should
This proposal will allow end users to see dynamic card changes in response to actions like hover and click Should
This proposal will allow card authors display-only capabilities for their ratings Could
This proposal will allow card authors to create a slider rating Could

Important Notes

  • Example 1: Medical survey
    image

    • Features of note:
      • Labels for options
      • Flexible quantity of options
      • Icon customization
  • Example 2: Yelp restaurant feedback
    yelpcatpureedited

    • Features of note:
      • Dynamic hover changes rating icons
      • Dynamic hover changes elements outside of rating; once an option is clicked, this could potentially lead to further input options based on the initial rating option (e.g., a bad rating will lead to an optional text box appearing asking the end user to explain their rationale)
      • Basic five-point rating system
  • Example 3: Simple 5-star rating
    image

  • Example 4: Rating sliders
    image

  • Example 5: Binary controls
    image

Open Questions

  • Should default rating icons should be native to the host? If so, this may add an extra burden to the host

Adaptive Cards-specific Considerations

Schema

https://github.com/microsoft/AdaptiveCards/compare/master...specs/3054-2

Introduce a new Input.Rating element.

standard

{
    "type": "AdaptiveCard",
    "body": [
        ...
        {
            "type": "Input.Rating",
            "id": "userRating"
        }
    ],
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "version": "1.0"
}

Customizing the number of stars

Say they want 6 stars...

{
    "type": "AdaptiveCard",
    "body": [
        ...
        {
            "type": "Input.Rating",
            "id": "userRating",
            "maxValue": 6
        }
    ],
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "version": "1.0"
}

Customizing the icons

image

{
  "type": "AdaptiveCard",
  "body": [
    {
      "type": "Input.Rating",
      "id": "userRating",
      "icons": {
        "unselected": {
          "type": "Image",
          "url": "https://yelp.com/icons/unselectedStar.png"
        },
        "selected": {
          "type": "Image",
          "url": "https://yelp.com/icons/selectedStar.png"
        }
      }
    }
  ],
  "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
  "version": "1.0"
}

Host Config

There should not be any changes to the host config.

Down-level impact

If the authors were using work arounds for previous versions, they could choose move to the simpler version of having native feedback controls.

Host burden

It is possible that the host would have to configure how they would like stars to show up in terms of color and style, but they could just render as default stars.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked schema comparison and the proposed Input.Rating schema in the issue, then review how Adaptive Cards input elements are represented and rendered across hosts. Done would require an agreed design and implementation covering the stated rating controls, customization, interaction behavior, and host considerations.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.