Add standard component for notifications (BBBToast)
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
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
Additional context
- Current implementation reference:
bigbluebutton-html5/imports/ui/services/notification/index.jsandbigbluebutton-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'sSendNotificationCommandArguments:message,icon,type,options: { helpLabel, helpLink, autoClose },content,small), which is a good cross-check for the prop set above. bigbluebutton-html5currently depends onreact-toastifyfor stacking/positioning/auto-dismiss; worth deciding whetherBBBToastshould stay presentation-only (consumer wires up their own toast engine, likeBBBModaldoes withopen/onRequestClose) or whether the library should also ship a toast-engine/container.
- Lingua principale
- TypeScript
- Stelle
- 2
- Fork
- 5
- Merge medio
- 2g 5h
- PR unite (30g)
- 9
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di bigbluebutton/bbb-ui-components-react
-
BBButton: subtle variant with neutral color has an opaque white background, so it renders white on white in dark modeForse già presa @nisatsama l’ha presa 3 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
bigbluebutton/bbb-ui-components-react#100 · 1 commento ·
-
Add support for dark themeApertaenhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 30/100
-
enhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
-
enhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
Tutte le issue di bigbluebutton/bbb-ui-components-react
Issue simili
-
Add: YRF Music NepalApertastreams:add
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
walletbeat/walletbeat#1558 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
hawk-digital-environments/HAWKI#438 ·
I maintainer di solito rispondono entro 1 giorno
-
Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
GiganticMinecraft/seichi-portal-frontend#1165 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno