FEATURE: add category banner for why a user cannot post (PR #9576)

Adds a category banner for why a user is unable to post in a category.

Additionally adds the same message to the disabled new topic button’s title

Screenshot from 2020-04-28 15-47-36

Screenshot from 2020-04-28 15-53-44

GitHub

Why not also have it appear when you click the button as an error-ish dialog?

On Tue, Apr 28, 2020 at 3:55 PM Jeff Wong notifications@github.com wrote:

Adds a category banner for why a user is unable to post in a category.

Additionally adds the same message to the disabled new topic button’s title

[image: Screenshot from 2020-04-28 15-47-36] https://user-images.githubusercontent.com/1322534/80545583-95242700-8968-11ea-90b2-15fa1500935e.png

[image: Screenshot from 2020-04-28 15-53-44] https://user-images.githubusercontent.com/1322534/80545590-9a817180-8968-11ea-9167-5127a1c74dc5.png

You can view, comment on, or merge this pull request online at:

https://github.com/discourse/discourse/pull/9576 Commit Summary

  • FEATURE: add category banner for why a user cannot post

File Changes

Patch Links:

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/discourse/discourse/pull/9576, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALTWVJGMQFCBFVJ2ZUZ5NTRO5NGVANCNFSM4MTHRZPA .

The new topic button is disabled if they don’t have permissions, so clicking on it wouldn’t do anything. Between the banner and the title, I consider those as sufficient nuclear options for forums looking to tack up “Look, you really can’t post here yet” signs

Right, I’m saying enable it, then clicking or tapping it also shows that same text? For extra teachings!

On Tue, Apr 28, 2020 at 5:48 PM Jeff Wong notifications@github.com wrote:

The new topic button is disabled if they don’t have permissions, so clicking on it wouldn’t do anything. Between the banner and the title, I consider those as sufficient nuclear options for forums looking to tack up “Look, you really can’t post here yet” signs

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/discourse/discourse/pull/9576#issuecomment-620929054, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALTWVNBGKCIRQI6NW4XBLDRO52PNANCNFSM4MTHRZPA .

Ah, gotcha, I misunderstood - we can do that!

You probably don’t need to pass currentUser in here, as all components have access to this.currentUser.