Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add interface for default_to_current_conversation field on conversation selects #154

Closed
yhatt opened this issue Apr 30, 2020 · 0 comments · Fixed by #155
Closed

Add interface for default_to_current_conversation field on conversation selects #154

yhatt opened this issue Apr 30, 2020 · 0 comments · Fixed by #155
Labels
enhancement New feature or request

Comments

@yhatt
Copy link
Owner

yhatt commented Apr 30, 2020

Today Slack has added default_to_current_conversation field into (multi_)conversation_select menu.
https://api.slack.com/changelog#April_2020

A more direct route to messaging in response to modals: the new default_to_current_conversation field allows your conversation_select and multi_conversation_select menus to be pre-populate the currently open conversation.

Proposal

We have already a lot of props for <ConversationSelect> and have to make a simple interface if possible.

The added field is mutually exclusive with initial_conversations, so I think that to accept current special string in initialConversation prop (or aliased value prop) is better.

<Modal title="test">
  {/* Pre-select a conversation that opened modal from. */}
  <ConversationsSelect label="Send to..." initialConversation="current" />
</Modal>

At the present time, multi_conversations_select does not seem to be able to mix the current conversation along with specific conversations. Probably <ConversationsSelect multiple value={['current', 'C0123456789']} /> is valid as Block Kit JSON, but Slack API will ignore the state of default_to_current_conversation generated from current value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant