Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Display Adaptive Card Carousels

Đang mở
#144 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
javascript
Lĩnh vực
frontend

Hướng nghiên cứu

Bắt đầu với cấu hình Dynamic Card và ví dụ carousel bằng JavaScript được hiển thị trong issue, sau đó tái hiện kết quả thẻ trống bằng Adaptive Cards. So sánh payload của Adaptive Card với thiết lập Hero Card trước đó và xác minh việc hoàn tất bằng cách hiển thị nội dung thẻ đã ánh xạ trong Carousel hoặc ghi lại giải pháp thay thế được hỗ trợ.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Hi,

I have been using Dynamic Card attached to a Statement in a Scenario to generate a list of Hero Cards and display them in a Carousel layout, which works fine.

I am now trying to switch the Hero Cards with Adaptive Cards but just seeing empty cards returned in the Carousel. Am I missing something or should I look for an alternate way of implementing this? Appreciate any pointers.

Below is what I have tried so far:

Image

Image

(function(){
  var data = ${doctorsList};
  var cards = data.map(function(item) {
    return {
      type: "AdaptiveCard",
      version: "1.5",
      body: [
        {
          type: "Container",
          isVisible: true,
          items: [              
        {
          type: "Image",
          style: "person",
          url: item.imageUrl,
          altText: item.imageAltText,
          size: "medium"
         },
        {
          type: "TextBlock",
          text: item.title,
          weight: "bolder",
          size: "medium",
          wrap: true
        },
        {
          type: "TextBlock",
          text: item.subtitle,
          weight: "bolder",
          wrap: true,
          isSubtle: true
        },
       {
          type: "TextBlock",
          text: item.location,
          weight: "bolder",
          wrap: true,
          isSubtle: true
        }
           ]
      },
    {
      type: "ActionSet",
      actions: [
        {
          type: "Action.OpenUrl",
          title: "View Profile & Schedule",
          url: item.buttonUrl,
          id: item.buttonId
        }
      ]
    }
  ]
  }
});
  return cards;
})();

And below is what I had before inside the Dynamic Card:

(function(){
    var doctors = [];
    for (var i =0 ; i < ${doctors}.count; i++) {
        doctors.push(new builder.HeroCard()
            .title(${doctors}._result[i].title)
            .subtitle(${doctors}._result[i].specialty)
            .text(${doctors}._result[i].location)
            .images([builder.CardImage.create(session,${doctors}._result[i].image_url)])
            .buttons([builder.CardAction.openUrl(session,${doctors}._result[i].url,'View Profile')])
        
        );
    }
    return doctors;
    })()
Ngôn ngữ chính
JavaScript
Star
114
Fork
238
Merge trung bình
11 phút
Pull request đã merge (30 ngày)
1

Chuẩn bị môi trường

Chúng tôi chưa kiểm tra các tệp thiết lập môi trường của dự án này. Hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của microsoft/HealthBotContainerSample

Tất cả issue của microsoft/HealthBotContainerSample

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.