Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

MM-13209: use textbox channel from context #2108

Merged
merged 5 commits into from
Dec 3, 2018

Conversation

lieut-data
Copy link
Member

Summary

This avoids relying on a global notion of the current channel, which only applies to the centre and not the RHS, fixing an issue with the autocomplete suggesting users not appropriate for the RHS.

Ticket Link

https://mattermost.atlassian.net/browse/MM-13209

Checklist

  • Ran make check-style to check for style errors (required for all pull requests)
  • Ran make test to ensure unit and component tests passed
  • Added or updated unit tests (required for all new features)
  • Needs to be implemented in mobile (link to PR or User Story)
  • Has server changes (please link)
  • Has redux changes: MM-13209: add makeGetProfilesNotInChannel selector mattermost-redux#726
  • Has UI changes
  • Includes text changes and localization file (.../i18n/en.json) updates
  • Touches critical sections of the codebase (auth, posting, etc.)

This avoids relying on a global notion of the current channel, which only applies to the centre and not the RHS.
@lieut-data lieut-data added 2: Dev Review Requires review by a core commiter CherryPick/Approved Meant for the quality or patch release tracked in the milestone labels Nov 29, 2018
@lieut-data lieut-data added this to the v5.6.0 milestone Nov 29, 2018
actions: bindActionCreators({
autocompleteUsersInChannel,
autocompleteUsersInChannel: (prefix) => autocompleteUsersInChannel(prefix, ownProps.channelId),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could just have the Textbox pass the channelId into the action when it calls it? Since it's coming from ownProps, the Textbox knows about channelId either way, and I don't have a good understanding of how ownProps works with mapDispatchToProps to know if doing this has any side effects

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree.

@amyblais amyblais added the 4: Reviews Complete All reviewers have approved the pull request label Nov 30, 2018
@lieut-data lieut-data removed the 2: Dev Review Requires review by a core commiter label Dec 3, 2018
@lieut-data lieut-data merged commit 61fbdae into master Dec 3, 2018
@lieut-data lieut-data deleted the mm-13209-use-textbox-channel-id branch December 3, 2018 14:32
lieut-data added a commit that referenced this pull request Dec 3, 2018
* MM-13209: fix textbox to bind channel from props

This avoids relying on a global notion of the current channel, which only applies to the centre and not the RHS.

* update mattermost-redux

* code review feedback

* update mattermost-redux
@lieut-data lieut-data added CherryPick/Done Successfully cherry-picked to the quality or patch release tracked in the milestone and removed CherryPick/Approved Meant for the quality or patch release tracked in the milestone labels Dec 3, 2018
@amyblais amyblais added Changelog/Not Needed Does not require a changelog entry Docs/Not Needed Does not require documentation labels Dec 3, 2018
@lindy65 lindy65 added Tests/Not Needed Does not require new release tests and removed 4: Reviews Complete All reviewers have approved the pull request labels Dec 5, 2018
@JtheBAB JtheBAB mentioned this pull request Jan 15, 2019
9 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Changelog/Not Needed Does not require a changelog entry CherryPick/Done Successfully cherry-picked to the quality or patch release tracked in the milestone Docs/Not Needed Does not require documentation Tests/Not Needed Does not require new release tests
Projects
None yet
5 participants