If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Developers" community channel.
New contributors please see our Developer's Guide, specifically for machine setup and for developer workflow.
Notes: Jira ticket
Add a count, similar to the channel member icon, to the pinned post icon in the channel header. The count should increment when a post is pinned and decrement when a post is unpinned.
Implementation suggestion is to add a pin count to the channel object.

I'll take this!
Great, thanks @lisakycho! :)
@esethna Would you have answers on the above questions from @pepf, or be able to gather that information?
@pepf apologies for the delayed response. I pinged Lisa to check but I think it's safe to take this one over if you're still interested.
Regarding #2, I'm going to add @sudheerDev to help answer the question on the API. In terms of what to display during the call, do we have any existing behavior built into the channel member count component? As the proposal is to use the same component for the pinned count. I imagine the number is populated as part of channel loading and then it will update for users viewing the channel whenever new posts are pinned.
@pepf Hey, Yes you would have to call an api but we dont have an explicit call for just count so you would have to use https://api.mattermost.com/#tag/channels%2Fpaths%2F~1channels~1%7Bchannel_id%7D~1pinned%2Fget
During the load you can follow the same behavior as the channel members count and show -. We cannot use the same component as channel members as it is a pop up component and this is slighly different but you can tweak the existing component HeaderIconWrapper and add a new prop.
Note: keep an eye out for socket events if the count is getting auto incremented if a team member pins a new post.
@esethna I see one problem with this though. Once pinned messages are opened they stay open for channel switch but the count which is in header is about the channel you are in so, this might be a little weird. What should be expected in this state? or how should it work?
Happy to have a crack at this if that's ok.
I am pretty new to all of this and have basic knowledge of ReactJS but would appreciate some further tips on how to tackle this issue.
My understanding is I want to pass down a pin count prop into the HeadIconWrapper and display that count next to the PinIcon component. The part I am unsure of is how to acquire the pin count, making use of the api call mentioned in the comments above. Is this api call made in the ChannelHeader component or elsewhere? Any examples I can take a look at for direction?
Pinging @esethna / @sudheerDev on the above questions ^
Hey @mase00001, Thanks for the interest.
This ticket stirred up an internal conversation about the changes it needs for the behaviour described.
This most possibly requires server changes including socket emits and DB changes for the pin count to sync in real-time across browser tabs and devices.
We will update you soon with more information about this. Meanwhile please feel free to grab any other ticket if you find interesting to work on.
Cheers!
Hi @mase00001, completely our fault for opening the help wanted issue but only realizing some of the server changes that may be required, and which we are still thinking through.
Are there any other help wanted tickets you'd be interested tackling for Hacktoberfest?
No problem at all, I'll have a look at some of the other mattermost react issues and see how I go :)
@sudheerDev Is there an update about this ticket? If not, would you mind closing this issue, until the discussion is resolved.
This issue looks duplicated with #10145.
If there is no action, this should be closed.
Thanks for the hint @kaakaa!
Most helpful comment
No problem at all, I'll have a look at some of the other mattermost react issues and see how I go :)