Skip to content

Commit b4ea052

Browse files
authored
feat: add Poll support (#2530)
1 parent 1a75c2a commit b4ea052

File tree

122 files changed

+6510
-494
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+6510
-494
lines changed
Loading
Loading
Loading
30.2 KB
Loading
Loading
Loading
Loading
Loading
128 KB
Loading
Loading

docusaurus/docs/React/components/contexts/component-context.mdx

+74-2
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,30 @@ Custom UI component to display a attachment previews in `MessageInput`.
6565
| --------- | ---------------------------------------------------------------------------------------------- |
6666
| component | <GHComponentLink text='AttachmentPreviewList' path='/MessageInput/AttachmentPreviewList.tsx'/> |
6767

68+
### AttachmentSelector
69+
70+
Custom UI component to control adding attachments to MessageInput, defaults to and accepts same props as:
71+
72+
| Type | Default |
73+
| --------- | ---------------------------------------------------------------------------------------- |
74+
| component | <GHComponentLink text='AttachmentSelector' path='/MessageInput/AttachmentSelector.tsx'/> |
75+
76+
### AttachmentSelectorInitiationButtonContents
77+
78+
Custom UI component for contents of attachment selector initiation button.
79+
80+
| Type |
81+
| --------- |
82+
| component |
83+
84+
### AudioRecorder
85+
86+
Custom UI component to display AudioRecorder in `MessageInput`.
87+
88+
| Type | Default |
89+
| --------- | ------------------------------------------------------------------------------ |
90+
| component | <GHComponentLink text='AudioRecorder' path='/MessageInput/AudioRecorder.tsx'/> |
91+
6892
### AutocompleteSuggestionItem
6993

7094
Custom UI component to override the default suggestion Item component.
@@ -155,9 +179,9 @@ Custom UI component to be displayed when the `MessageList` is empty.
155179
| --------- | ------------------------------------------------------------------------------------------------- |
156180
| component | <GHComponentLink text='EmptyStateIndicator' path='/EmptyStateIndicator/EmptyStateIndicator.tsx'/> |
157181

158-
### FileUploadIcon
182+
### FileUploadIcon (deprecated)
159183

160-
Custom UI component for file upload icon.
184+
Custom UI component for file upload icon. The component is now deprecated. Use [`AttachmentSelectorInitiationButtonContents`](#attachmentselectorinitiationbuttoncontents) instead.
161185

162186
| Type | Default |
163187
| --------- | ----------------------------------------------------------------------- |
@@ -309,6 +333,46 @@ Custom UI component to override default pinned message indicator.
309333
| --------- | ---------------------------------------------------------------- |
310334
| component | <GHComponentLink text='PinIndicator' path='/Message/icons.tsx'/> |
311335

336+
### PollActions
337+
338+
Custom UI component to override default poll actions rendering in a message.
339+
340+
| Type | Default |
341+
| --------- | ------------------------------------------------------------------------------ |
342+
| component | <GHComponentLink text='PollActions' path='/Poll/PollActions/PollActions.tsx'/> |
343+
344+
### PollContent
345+
346+
Custom UI component to override default poll rendering in a message.
347+
348+
| Type | Default |
349+
| --------- | ------------------------------------------------------------------ |
350+
| component | <GHComponentLink text='PollContent' path='/Poll/PollContent.tsx'/> |
351+
352+
### PollCreationDialog
353+
354+
Custom UI component to override default poll creation dialog contents.
355+
356+
| Type | Default |
357+
| --------- | --------------------------------------------------------------------------------------------------- |
358+
| component | <GHComponentLink text='PollCreationDialog' path='/Poll/PollCreationDialog/PollCreationDialog.tsx'/> |
359+
360+
### PollHeader
361+
362+
Custom UI component to override default poll header in a message.
363+
364+
| Type | Default |
365+
| --------- | ---------------------------------------------------------------- |
366+
| component | <GHComponentLink text='PollHeader' path='/Poll/PollHeader.tsx'/> |
367+
368+
### PollOptionSelector
369+
370+
Custom UI component to override default poll option selector.
371+
372+
| Type | Default |
373+
| --------- | -------------------------------------------------------------------------------- |
374+
| component | <GHComponentLink text='PollOptionSelector' path='/Poll/PollOptionSelector.tsx'/> |
375+
312376
### QuotedMessage
313377

314378
Custom UI component to override quoted message UI on a sent message.
@@ -325,6 +389,14 @@ Custom UI component to override the message input's quoted message preview.
325389
| --------- | -------------------------------------------------------------------------------------------- |
326390
| component | <GHComponentLink text='QuotedMessagePreview' path='/MessageInput/QuotedMessagePreview.tsx'/> |
327391

392+
### QuotedPoll
393+
394+
Custom UI component to override the rendering of quoted poll.
395+
396+
| Type | Default |
397+
| --------- | ---------------------------------------------------------------- |
398+
| component | <GHComponentLink text='QuotedPoll' path='/Poll/QuotedPoll.tsx'/> |
399+
328400
### ReactionSelector
329401

330402
Custom UI component to display the reaction selector.

docusaurus/docs/React/components/contexts/message-input-context.mdx

+8
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,14 @@ Function to insert text into the value of the underlying `textarea` component.
229229
| ------------------------------ |
230230
| (textToInsert: string) => void |
231231

232+
### isThreadInput
233+
234+
Signals that the MessageInput is rendered in a message thread (Thread component).
235+
236+
| Type |
237+
| ------- |
238+
| boolean |
239+
232240
### isUploadEnabled
233241

234242
If true, file uploads are enabled in the currently active channel.

docusaurus/docs/React/components/core-components/channel.mdx

+72
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,30 @@ Custom UI component to display an attachment previews in `MessageInput`.
142142
| --------- | ---------------------------------------------------------------------------------------------- |
143143
| component | <GHComponentLink text='AttachmentPreviewList' path='/MessageInput/AttachmentPreviewList.tsx'/> |
144144

145+
### AttachmentSelector
146+
147+
Custom UI component to control adding attachments to MessageInput, defaults to and accepts same props as:
148+
149+
| Type | Default |
150+
| --------- | ---------------------------------------------------------------------------------------- |
151+
| component | <GHComponentLink text='AttachmentSelector' path='/MessageInput/AttachmentSelector.tsx'/> |
152+
153+
### AttachmentSelectorInitiationButtonContents
154+
155+
Custom UI component for contents of attachment selector initiation button.
156+
157+
| Type |
158+
| --------- |
159+
| component |
160+
161+
### AudioRecorder
162+
163+
Custom UI component to display AudioRecorder in `MessageInput`.
164+
165+
| Type | Default |
166+
| --------- | ------------------------------------------------------------------------------ |
167+
| component | <GHComponentLink text='AudioRecorder' path='/MessageInput/AudioRecorder.tsx'/> |
168+
145169
### AutocompleteSuggestionItem
146170

147171
Custom UI component to override the default suggestion Item component.
@@ -609,6 +633,46 @@ Custom UI component to override default pinned message indicator.
609633
| --------- | ---------------------------------------------------------------- |
610634
| component | <GHComponentLink text='PinIndicator' path='/Message/icons.tsx'/> |
611635

636+
### PollActions
637+
638+
Custom UI component to override default poll actions rendering in a message.
639+
640+
| Type | Default |
641+
| --------- | ------------------------------------------------------------------------------ |
642+
| component | <GHComponentLink text='PollActions' path='/Poll/PollActions/PollActions.tsx'/> |
643+
644+
### PollContent
645+
646+
Custom UI component to override default poll rendering in a message.
647+
648+
| Type | Default |
649+
| --------- | ------------------------------------------------------------------ |
650+
| component | <GHComponentLink text='PollContent' path='/Poll/PollContent.tsx'/> |
651+
652+
### PollCreationDialog
653+
654+
Custom UI component to override default poll creation dialog contents.
655+
656+
| Type | Default |
657+
| --------- | --------------------------------------------------------------------------------------------------- |
658+
| component | <GHComponentLink text='PollCreationDialog' path='/Poll/PollCreationDialog/PollCreationDialog.tsx'/> |
659+
660+
### PollHeader
661+
662+
Custom UI component to override default poll header in a message.
663+
664+
| Type | Default |
665+
| --------- | ---------------------------------------------------------------- |
666+
| component | <GHComponentLink text='PollHeader' path='/Poll/PollHeader.tsx'/> |
667+
668+
### PollOptionSelector
669+
670+
Custom UI component to override default poll option selector.
671+
672+
| Type | Default |
673+
| --------- | -------------------------------------------------------------------------------- |
674+
| component | <GHComponentLink text='PollOptionSelector' path='/Poll/PollOptionSelector.tsx'/> |
675+
612676
### QuotedMessage
613677

614678
Custom UI component to override quoted message UI on a sent message.
@@ -625,6 +689,14 @@ Custom UI component to override the message input's quoted message preview.
625689
| --------- | -------------------------------------------------------------------------------------------- |
626690
| component | <GHComponentLink text='QuotedMessagePreview' path='/MessageInput/QuotedMessagePreview.tsx'/> |
627691

692+
### QuotedPoll
693+
694+
Custom UI component to override the rendering of quoted poll.
695+
696+
| Type | Default |
697+
| --------- | ---------------------------------------------------------------- |
698+
| component | <GHComponentLink text='QuotedPoll' path='/Poll/QuotedPoll.tsx'/> |
699+
628700
### ReactionSelector
629701

630702
Custom UI component to display the reaction selector.

0 commit comments

Comments
 (0)