`GenericContentMainArea`: optional close button rendered by the core

Aperta
#307 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
45/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
react, typescript
Ambito
frontend

Direzione di ricerca

Start from the reference implementation in external-video-player-graphql/component.tsx (the Styled.ExternalVideoCloseButton block) and compare it with the current GenericContentMainArea component and its GenericContentMainAreaProps. Read how the presenter flag reaches that content and how RTL and primary styling are handled, since the new closeButton option must reuse the same button and layering. Done means the prop is added, core renders the button only for the presenter (or behind an allowed flag) above plugin content, and no item re-creation is needed on presenter change.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

The external video player shows a close button in the top right corner of the content, for the presenter only:

// external-video-player-graphql/component.tsx
isPresenter ? (
  <Styled.ExternalVideoCloseButton
    color="primary" icon="close" size="sm" hideLabel
    onClick={stopExternalVideoShare}
    label={intl.formatMessage(intlMessages.closeExternalVideoLabel)}
  />
) : null

GenericContentMainArea only takes contentFunction, so a plugin has to draw its own button inside its content, copying the core styles (position: absolute; top: 0; right: 0, RTL handling, primary colors). It also has to re-render that content when the presenter changes, without recreating the item, which would put it back on top of the presentation area for everyone. The result can drift from the core look, and every plugin does it a little differently.

Proposal

Add an optional close button to GenericContentMainAreaProps, rendered by the core with the same component as the external video:

new GenericContentMainArea({
  contentFunction: (element) => { ... },
  closeButton: {
    label: 'Stop sharing website',   // aria-label / tooltip
    onClick: () => { /* remove the content */ },
  },
});

The core would show it only to the presenter, as for the external video, or the plugin could choose with an allowed flag. It should follow RTL and stay above the plugin content.

Lingua principale
Nessun dato sulla lingua
Stelle
17
Fork
18
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di bigbluebutton/bigbluebutton-html-plugin-sdk

Tutte le issue di bigbluebutton/bigbluebutton-html-plugin-sdk

Issue simili

Altre issue su Web Dev

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.