web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / Thumb rating buttons n...
Copilot Studio
Suggested Answer

Thumb rating buttons not displaying

(0) ShareShare
ReportReport
Posted on by
I followed this article (https://learn.microsoft.com/en-us/microsoft-copilot-studio/customize-default-canvas) to customize the look of my agent but now the thumb-rating buttons are not displaying. It does display if I put it up without the customization but it doesn't match our branding or look as clean/user friendly. How do I get them to display? I have this in test so I can't share links.
Plain-Bot.png
Custom-Bot.png

Your file is currently under scan for potential threats. Please wait while we review it for any viruses or malicious content.

Categories:
I have the same question (1)
  • Suggested answer
    SwatiSTW Profile Picture
    809 Super User 2026 Season 1 on at
    @SS-13011357-0
     
    1. Your custom canvas won’t auto-show thumbs → you must add your own UI in WebChat.
    2. Use activityMiddleware to render thumb up/ thumbs down under each bot message.
    3. On click, send a messageReaction via directLine.postActivity() with replyToId = activity.id.
    4. Scope CSS to #webchat so your branding CSS doesn’t hide buttons.
    // 1) createDirectLine as you already do
    const directLine = window.WebChat.createDirectLine({ token });
    const userId = "u_" + Math.random().toString(36).slice(2);
    // 2) helper: send reaction
    function reactTo(activityId, type /* "like" | "dislike" */) {
      return directLine.postActivity({
        type: "messageReaction",
        from: { id: userId, role: "user" },
        replyToId: activityId,
        reactionsAdded: [{ type }]
      });
    }
    // 3) add thumbs UI under each bot message
    const React = window.WebChat.React;
    const h = React.createElement;
    const activityMiddleware = () => (next) => (card) => {
      const a = card.activity;
      if (!a || a.type !== "message" || a.from?.role !== "bot") return next(card);
      return h("div", null,
        next(card),
        h("div", { className: "cc-reactions" },
          h("button", { type: "button", className: "cc-reaction-btn", onClick: () => reactTo(a.id, "like").subscribe() }, "👍"),
          h("button", { type: "button", className: "cc-reaction-btn", onClick: () => reactTo(a.id, "dislike").subscribe() }, "👎"),
        )
      );
    };
    // 4) render webchat with middleware
    window.WebChat.renderWebChat(
      { directLine, userID: userId, styleOptions, activityMiddleware },
      document.getElementById("webchat")
    );
    /* 5) minimal scoped styling */
    #webchat .cc-reactions { display:flex; gap:8px; justify-content:flex-end; margin-top:6px; }
    #webchat .cc-reaction-btn { border:1px solid #ccc; background:transparent; border-radius:999px; padding:4px 10px; cursor:pointer; }
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Copilot Studio

#1
Valantis Profile Picture

Valantis 277

#2
11manish Profile Picture

11manish 206

#3
sannavajjala87 Profile Picture

sannavajjala87 156 Super User 2026 Season 1

Last 30 days Overall leaderboard