Skip to content

Commit

Permalink
feat: add Poll support (#2530)
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinCupela authored Nov 1, 2024
1 parent 1a75c2a commit b4ea052
Show file tree
Hide file tree
Showing 122 changed files with 6,510 additions and 494 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docusaurus/docs/React/assets/end-poll-dialog.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docusaurus/docs/React/assets/poll-results.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
76 changes: 74 additions & 2 deletions docusaurus/docs/React/components/contexts/component-context.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,30 @@ Custom UI component to display a attachment previews in `MessageInput`.
| --------- | ---------------------------------------------------------------------------------------------- |
| component | <GHComponentLink text='AttachmentPreviewList' path='/MessageInput/AttachmentPreviewList.tsx'/> |

### AttachmentSelector

Custom UI component to control adding attachments to MessageInput, defaults to and accepts same props as:

| Type | Default |
| --------- | ---------------------------------------------------------------------------------------- |
| component | <GHComponentLink text='AttachmentSelector' path='/MessageInput/AttachmentSelector.tsx'/> |

### AttachmentSelectorInitiationButtonContents

Custom UI component for contents of attachment selector initiation button.

| Type |
| --------- |
| component |

### AudioRecorder

Custom UI component to display AudioRecorder in `MessageInput`.

| Type | Default |
| --------- | ------------------------------------------------------------------------------ |
| component | <GHComponentLink text='AudioRecorder' path='/MessageInput/AudioRecorder.tsx'/> |

### AutocompleteSuggestionItem

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

### FileUploadIcon
### FileUploadIcon (deprecated)

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

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

### PollActions

Custom UI component to override default poll actions rendering in a message.

| Type | Default |
| --------- | ------------------------------------------------------------------------------ |
| component | <GHComponentLink text='PollActions' path='/Poll/PollActions/PollActions.tsx'/> |

### PollContent

Custom UI component to override default poll rendering in a message.

| Type | Default |
| --------- | ------------------------------------------------------------------ |
| component | <GHComponentLink text='PollContent' path='/Poll/PollContent.tsx'/> |

### PollCreationDialog

Custom UI component to override default poll creation dialog contents.

| Type | Default |
| --------- | --------------------------------------------------------------------------------------------------- |
| component | <GHComponentLink text='PollCreationDialog' path='/Poll/PollCreationDialog/PollCreationDialog.tsx'/> |

### PollHeader

Custom UI component to override default poll header in a message.

| Type | Default |
| --------- | ---------------------------------------------------------------- |
| component | <GHComponentLink text='PollHeader' path='/Poll/PollHeader.tsx'/> |

### PollOptionSelector

Custom UI component to override default poll option selector.

| Type | Default |
| --------- | -------------------------------------------------------------------------------- |
| component | <GHComponentLink text='PollOptionSelector' path='/Poll/PollOptionSelector.tsx'/> |

### QuotedMessage

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

### QuotedPoll

Custom UI component to override the rendering of quoted poll.

| Type | Default |
| --------- | ---------------------------------------------------------------- |
| component | <GHComponentLink text='QuotedPoll' path='/Poll/QuotedPoll.tsx'/> |

### ReactionSelector

Custom UI component to display the reaction selector.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,14 @@ Function to insert text into the value of the underlying `textarea` component.
| ------------------------------ |
| (textToInsert: string) => void |

### isThreadInput

Signals that the MessageInput is rendered in a message thread (Thread component).

| Type |
| ------- |
| boolean |

### isUploadEnabled

If true, file uploads are enabled in the currently active channel.
Expand Down
72 changes: 72 additions & 0 deletions docusaurus/docs/React/components/core-components/channel.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,30 @@ Custom UI component to display an attachment previews in `MessageInput`.
| --------- | ---------------------------------------------------------------------------------------------- |
| component | <GHComponentLink text='AttachmentPreviewList' path='/MessageInput/AttachmentPreviewList.tsx'/> |

### AttachmentSelector

Custom UI component to control adding attachments to MessageInput, defaults to and accepts same props as:

| Type | Default |
| --------- | ---------------------------------------------------------------------------------------- |
| component | <GHComponentLink text='AttachmentSelector' path='/MessageInput/AttachmentSelector.tsx'/> |

### AttachmentSelectorInitiationButtonContents

Custom UI component for contents of attachment selector initiation button.

| Type |
| --------- |
| component |

### AudioRecorder

Custom UI component to display AudioRecorder in `MessageInput`.

| Type | Default |
| --------- | ------------------------------------------------------------------------------ |
| component | <GHComponentLink text='AudioRecorder' path='/MessageInput/AudioRecorder.tsx'/> |

### AutocompleteSuggestionItem

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

### PollActions

Custom UI component to override default poll actions rendering in a message.

| Type | Default |
| --------- | ------------------------------------------------------------------------------ |
| component | <GHComponentLink text='PollActions' path='/Poll/PollActions/PollActions.tsx'/> |

### PollContent

Custom UI component to override default poll rendering in a message.

| Type | Default |
| --------- | ------------------------------------------------------------------ |
| component | <GHComponentLink text='PollContent' path='/Poll/PollContent.tsx'/> |

### PollCreationDialog

Custom UI component to override default poll creation dialog contents.

| Type | Default |
| --------- | --------------------------------------------------------------------------------------------------- |
| component | <GHComponentLink text='PollCreationDialog' path='/Poll/PollCreationDialog/PollCreationDialog.tsx'/> |

### PollHeader

Custom UI component to override default poll header in a message.

| Type | Default |
| --------- | ---------------------------------------------------------------- |
| component | <GHComponentLink text='PollHeader' path='/Poll/PollHeader.tsx'/> |

### PollOptionSelector

Custom UI component to override default poll option selector.

| Type | Default |
| --------- | -------------------------------------------------------------------------------- |
| component | <GHComponentLink text='PollOptionSelector' path='/Poll/PollOptionSelector.tsx'/> |

### QuotedMessage

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

### QuotedPoll

Custom UI component to override the rendering of quoted poll.

| Type | Default |
| --------- | ---------------------------------------------------------------- |
| component | <GHComponentLink text='QuotedPoll' path='/Poll/QuotedPoll.tsx'/> |

### ReactionSelector

Custom UI component to display the reaction selector.
Expand Down
Loading

0 comments on commit b4ea052

Please sign in to comment.