This PR is under heavy WIP but I’d like to have some feedback on what’s been done already and explain some of the things I made. I’ll update the PR description accordingly when it’s not a draft anymore.
So this PR aims to allow people to see their pending posts as described here: Can I view my own topic that is awaiting moderation? - feature - Discourse Meta.
The approach here is to display a new section (named
Pending) on the user activity page. As for the drafts, a counter is displayed to know at a glance how many pending posts a user has. Since a post awaiting moderation isn’t a real post until it’s approved, it won’t show in the
All section. (like it was for the drafts previously)
For now the
Pending section is always there but it would probably be nice to only show it when it makes sense (with a site setting for example).
I’ve just started to add specs for the ruby side of the code and there are none for the JS side for now. I’ve also made some small refactors, I’ll explain more things by commenting directly on the PR.