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

MM-15562 Add a way to unregister post type components #2791

Merged
merged 1 commit into from
May 15, 2019
Merged

Conversation

hmhealey
Copy link
Member

This is needed for the NPS plugin because it stops using its custom post component at small screen sizes when there's not enough room to display it properly.

The REMOVED_PLUGIN_POST_COMPONENT action is already handled by the correct reducer, but there was nothing that actually emitted it.

Ticket Link

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

@hmhealey hmhealey added the 2: Dev Review Requires review by a core commiter label May 14, 2019
@hmhealey hmhealey added this to the v5.12.0 milestone May 14, 2019
@hmhealey hmhealey requested review from crspeller and hanzei May 14, 2019 14:03
Copy link
Member

@crspeller crspeller left a comment

Choose a reason for hiding this comment

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

So it detects the screen size change and unregisters it's component?

@hanzei
Copy link
Contributor

hanzei commented May 14, 2019

I'm still not knowable enough to review this. Please request a review from someone else please.

@hanzei hanzei removed their request for review May 14, 2019 17:05
@hmhealey
Copy link
Member Author

Oh right, I forgot your focus was on the server-side, hanzei. I'll re-assign it

@hmhealey hmhealey requested a review from lieut-data May 14, 2019 17:31
@hmhealey
Copy link
Member Author

@crspeller That's correct. I would've just had it implement it's own dropdown, but the fallback uses the post action dropdown which is pretty rich in features, and I didn't want to copy that over. This function was already used by the NPS plugin, but I forgot to actually submit this PR, so that behaviour is currently broken.
https://github.com/mattermost/mattermost-plugin-nps/blob/master/webapp/src/index.js#L21

@lieut-data lieut-data added 4: Reviews Complete All reviewers have approved the pull request and removed 2: Dev Review Requires review by a core commiter labels May 15, 2019
@lieut-data lieut-data merged commit 5ce6d60 into master May 15, 2019
@lieut-data lieut-data deleted the mm15562 branch May 15, 2019 01:44
@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 May 15, 2019
@amyblais amyblais added Changelog/Not Needed Does not require a changelog entry Docs/Not Needed Does not require documentation labels May 17, 2019
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 Docs/Not Needed Does not require documentation Tests/Not Needed Does not require new release tests
Projects
None yet
6 participants