thunder icon indicating copy to clipboard operation
thunder copied to clipboard

Additional moderator actions and post action bottom sheet redesign

Open hjiangsu opened this issue 1 year ago • 0 comments

Pull Request Description

This draft PR adds new moderator actions to the post bottom sheet. Additionally, I've also redesigned the post bottom sheet to be more intuitive, and moved the existing moderator actions into their corresponding categories.

Note: to scope down the changes in this PR, no admin-related actions will be implemented. There are stubs for admin related actions, but they will be commented out in the meantime.

Here is a high level overview of the changes:

  • Removed the previous bottom sheet actions, and replaced it with equivalent widgets. The previous logic was split up into multiple files/widgets to improve code readability and modularity.
  • Added ability to report a given post
  • Added moderator action to ban/unban a user from a community
  • Added moderator action to add/remove a user as a moderator to a community

The available actions will change depending on the status of the user. The following section will list out all the available actions that are enabled based on the authentication/user status:

For guest accounts:

  • User
    • Visit user profile Community
    • Visit community Instance
    • Visit community/user instance
  • All sharing options

For logged in accounts (normal users not moderators of community):

  • Quick actions (voting, saving, marking as read, hiding, etc)
  • Post
    • Reporting post (new)
  • User
    • Visit user profile
    • Block user
  • Community
    • Visit community
    • Subscribe to community
    • Block community
  • Instance
    • Visit community/user instance
    • Block instance
  • All sharing options

For moderator accounts:

  • Quick actions (voting, saving, marking as read, hiding, etc)
  • Post
    • Reporting post (new)
    • Lock post
    • Remove post
    • Pinning post to community
  • User
    • Visit user profile
    • Block user
    • Ban user from community
    • Add user as community moderator
  • Community
    • Visit community
    • Subscribe to community
    • Block community
  • Instance
    • Visit community/user instance
    • Block instance
  • All sharing options

TODOs:

  • Fix commented out callback functions in the following widgets:
    • lib/community/widgets/post_card.dart
    • lib/community/widgets/post_card_view_comfortable.dart
  • Re-test all existing and new actions

Issue Being Fixed

Issue Number: N/A

Screenshots / Recordings

Checklist

  • [ ] If a new package was added, did you ensure it uses an appropriate license and is actively maintained?
  • [ ] Did you use localized strings (and added appropriate descriptions) where applicable?
  • [ ] Did you add semanticLabels where applicable for accessibility?

hjiangsu avatar Sep 27 '24 19:09 hjiangsu