Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Add standard component for notifications (BBBToast)

未关闭
#72 0 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

@Arthurk12 已经在做这个了。

开始于 2026年9月4日。

  • #103 来自 @Arthurk12 —— 未关闭

评估

这个 Issue 还没有评估数据。

描述

enhancement

Is your feature request related to a problem? Please describe.
bigbluebutton-html5 has its own hand-rolled toast notification implementation (imports/ui/services/notification + imports/ui/components/common/toast, on top of react-toastify) that isn't part of this shared component library. It's used in 44+ files across the client (errors, status changes, chat push alerts, recording/breakout/screenshare notices, plugin-triggered notifications, etc.), so it's a core, high-reuse UI primitive that belongs here instead of being duplicated/reimplemented per consuming app.

Describe the solution you'd like
A BBBToast component (the presentational notification card) with a props surface derived from every current call site in bigbluebutton-html5:

Property Type Default Description
message React.ReactNode — Primary text/title of the notification.
type 'default' | 'info' | 'success' | 'warning' | 'error' 'default' Visual variant; drives the default icon and color.
icon React.ReactNode | string | false icon matched to type Custom icon, or false to hide it entirely.
content React.ReactNode — Optional secondary content (description, links, action buttons) shown below a separator.
showSeparator boolean true Shows/hides the divider between message and content.
small boolean false Compact variant for space-constrained placements.
disablePointer boolean true Whether the toast shows a pointer cursor (i.e. reads as clickable).
onClick () => void — Click handler for the whole toast (e.g. open a related chat/panel).
actionLabel string — Label for an optional secondary action button rendered in the toast.
onActionClick () => void — Handler for the action button (current impl only supports opening a URL via helpLink/helpLabel; generalizing to a callback is recommended).
autoClose number | false 5000 Auto-dismiss delay in ms, or false to persist until manually dismissed.
closeButton boolean true Shows/hides the close (X) button.
onRequestClose () => void — Callback fired when the toast is dismissed.
id string auto-generated Custom id, for de-duplication or programmatically updating/dismissing a specific toast.

Describe alternatives you've considered
Keeping the toast logic duplicated in each consuming app (current state) — leads to visual drift between BBB's own client and other apps built on this component library.

Affected component(s)
New component: BBBToast.
Proposed API / Usage Example

import { BBBToast } from '@bigbluebutton/bbb-ui-components-react';

<BBBToast
  type="warning"
  message="You are muted"
  content="Click to unmute"
  autoClose={5000}
  onClick={() => unmute()}
/>

Screenshots or mockups

Image

Additional context

  • Current implementation reference: bigbluebutton-html5/imports/ui/services/notification/index.js and bigbluebutton-html5/imports/ui/components/common/toast/component.jsx.
  • The BBB plugin SDK already exposes an equivalent, stable public contract for third-party plugins (bigbluebutton-html-plugin-sdk's SendNotificationCommandArguments: message, icon, type, options: { helpLabel, helpLink, autoClose }, content, small), which is a good cross-check for the prop set above.
  • bigbluebutton-html5 currently depends on react-toastify for stacking/positioning/auto-dismiss; worth deciding whether BBBToast should stay presentation-only (consumer wires up their own toast engine, like BBBModal does with open/onRequestClose) or whether the library should also ship a toast-engine/container.
主要语言
TypeScript
星标
2
派生
5
平均合并
2 天 5 小时
30 天内合并 PR
9

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

bigbluebutton/bbb-ui-components-react 的其他 Issue

查看 bigbluebutton/bbb-ui-components-react 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。