`MediaAreaOption`: support an active state like the built-in options

Đang mở Phù hợp với người mới
#305 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ó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
72/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
react, typescript
Lĩnh vực
frontend

Hướng nghiên cứu

Bắt đầu trong media-sharing/component.tsx, nơi MediaButton được render với color="default" được mã hóa cứng, và tìm định nghĩa MediaAreaOptionProps được API plugin sử dụng. Thêm một boolean tùy chọn active vào kiểu đó và truyền nó dưới dạng color={active ? "primary" : "default"}. Hoàn tất khi một tùy chọn plugin được tạo với active: true hiển thị cùng màu chính như các tùy chọn chia sẻ tích hợp và việc bỏ qua nó giữ nguyên giao diện mặc định hiện tại.

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

Mô tả

Built-in Media Area options show when their content is being shared. "Slides" uses color="active" (light blue tile, blue icon), and "Video link" and "Camera as content" use color="primary" while they are shared. Plugin options are always rendered with color="default":

// media-sharing/component.tsx
<MediaButton
  key={item.id}
  dataTest={item.dataTest}
  color="default"
  ...

and MediaAreaOptionProps has no field for it. A plugin that shares something into the presentation area cannot show the presenter that its content is live. The only workaround is to change the label, or to pass an svgContent icon with a hard-coded fill.

Proposal

Add an optional field to MediaAreaOptionProps, passed through to MediaButton:

new MediaAreaOption({
  label: 'Website',
  icon,
  tooltip: 'Change or stop sharing the website',
  allowed: true,
  active: true, // or: color: 'default' | 'active' | 'primary'
  onClick: () => {},
});

A boolean active that maps to the same color the built-in sharing options use (primary) keeps the look consistent, and plugins cannot pick arbitrary styles.

Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
17
Fork
18
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

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

  • Không có Dockerfile hay tệp Docker Compose
  • Có mẫu pull request
  • Không có hướng dẫn đóng góp

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 bigbluebutton/bigbluebutton-html-plugin-sdk

Tất cả issue của bigbluebutton/bigbluebutton-html-plugin-sdk

Issue tương tự

Thêm issue về Web Dev

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.