Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional moderator actions and post action bottom sheet redesign #1567

Merged
merged 9 commits into from
Oct 18, 2024

Conversation

hjiangsu
Copy link
Member

@hjiangsu hjiangsu commented Sep 27, 2024

Pull Request Description

This 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:

General

  • Quick actions (vote, save, mark as read, hide) [Authenticated accounts and above]
  • Visit user, community, instance profiles [All]
  • Sharing options [All]

Post

  • Reporting posts [Authenticated accounts and above] (new)
  • Locking posts [Moderator and above]
  • Removing posts [Moderator and above]
  • Pinning posts to community [Moderator and above]

User

  • Blocking user [Authenticated accounts and above]
  • Banning user from community [Moderator and above] (new)
  • Adding user to community moderators [Moderator and above] (new)

Community

  • Subscribe to community [Authenticated accounts and above]
  • Block communities [Authenticated accounts and above]

Instance

  • Block instances [Authenticated accounts and above]

Issue Being Fixed

Issue Number: N/A

Screenshots / Recordings

Guest Account Moderator
simulator_screenshot_FD82EF47-806C-45CE-B82A-4549D4B7B310 simulator_screenshot_6E260DC0-9592-4100-8B5A-25F83DF03123 simulator_screenshot_91DCE1E3-EAC5-40CC-9B9C-3DDCDF07A375
N/A simulator_screenshot_A17722A9-8689-433D-BBD1-5A3A8BAFAA94 simulator_screenshot_37B06BF2-7B0D-4F1A-A708-107E1E6032B8
simulator_screenshot_836F3D39-F873-4904-8C88-EA53201E0F10 simulator_screenshot_0260857C-06F7-4197-90A6-2F0DCA64C9DB simulator_screenshot_C1485431-C894-45F2-BB7C-36D840BA9A3C
simulator_screenshot_9474D37D-7143-4BB8-A0A8-D87C005BBAEB simulator_screenshot_2954EA8A-7AFA-42C7-A459-E67FE69F2B50 simulator_screenshot_BF290083-7AF8-4307-B7FD-8EED8A4DB42E
simulator_screenshot_E29C7223-61C9-4B9D-AF3D-D768F6CC8B59 simulator_screenshot_1E94F42A-9A43-4D6B-93B0-10531F99D4BE simulator_screenshot_DA9E4003-7BEA-497E-A3C4-AFB2F48FECD3
simulator_screenshot_81BAA8C1-4E78-4537-AF0A-53AF6AFAE606 simulator_screenshot_163F2E3D-494B-4371-AB63-E47D1EC91278 simulator_screenshot_5DC41D1C-3812-4F3C-B865-53A76E118875

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 hjiangsu force-pushed the refactor/post-actions-bottom-sheet branch from 9671621 to b7e109a Compare October 12, 2024 19:27
@hjiangsu
Copy link
Member Author

hjiangsu commented Oct 16, 2024

Issues present after testing:

  • Banning user from community does not work as intended (fixed)

Note: I've opted to keep remove the ability to set the "expiry" date on banned users because I was not able to get the automatic unban to work (need to dig further to see how the automatic unban feature works for Lemmy)

@hjiangsu hjiangsu marked this pull request as ready for review October 16, 2024 18:30
@hjiangsu
Copy link
Member Author

As this is a relatively large change, I'll be merging this in to allow some time for internal/dev testing. Let me know if you notice any issues! @micahmo 😄

@hjiangsu hjiangsu merged commit 037d624 into develop Oct 18, 2024
1 check passed
@hjiangsu hjiangsu deleted the refactor/post-actions-bottom-sheet branch October 18, 2024 15:51
@micahmo
Copy link
Member

micahmo commented Oct 18, 2024

Looks great just from the screenshots! 😊 I'll definitely take some time to play around with it. I might also have to fix some conflicts in some my pending PRs. 😊

@hjiangsu
Copy link
Member Author

Thanks! I also wanted to say sorry for the delay in reviewing the other PRs, I'll definitely try to speed those up to reduce further conflicts if possible!

@micahmo
Copy link
Member

micahmo commented Oct 18, 2024

No problem at all, I know things have been busy! I've slowed down my contributions as well so as to not overwhelm you. I know reviewing can be one of the most tedious parts of managing an open source project. If/when some of those other PRs get cleaned up, I'd be happy to jump back in and continue contributing! Especially as a new version of Lemmy is coming down the pipe. 😊

@micahmo
Copy link
Member

micahmo commented Oct 18, 2024

@hjiangsu I've noticed a couple things so far.

  1. It looks like, to navigate back from a bottom sheet subpage, you can now only click the back icon, as opposed to the whole header. I'm sure this change was intentional, but I just wanted to bring it up as it's not only changing existing behavior, but now also makes the post bottom sheets behave differently than other bottom sheets throughout the app (like comments).
  2. There are also other minor visual differences between the post bottom sheet and other bottom sheets in the app, like how each action item has a bolded title now. To me it looks a little too bold, but I'm probably just used to the way it used to be.
  3. The share button within the post viewer is supposed to jump directly to the share subpage of the post bottom sheet, but it now just brings up the main page (so you have to click again to share).
qemu-system-x86_64_MtJRSzDNrq.mp4

@hjiangsu
Copy link
Member Author

Thanks for mentioning these issues!

It looks like, to navigate back from a bottom sheet subpage, you can now only click the back icon, as opposed to the whole header. I'm sure this change was intentional, but I just wanted to bring it up as it's not only changing existing behavior, but now also makes the post bottom sheets behave differently than other bottom sheets throughout the app (like comments).

This was an intentional change - the intent being matching the behaviour of how app bars "back" buttons work. I do plan to overhaul the comments bottom sheet as well to match up with the behaviour of the post bottom sheet.

All that being said, I am open to reverting this behaviour back to the old behaviour if its undesired!

There are also other minor visual differences between the post bottom sheet and other bottom sheets in the app, like how each action item has a bolded title now. To me it looks a little too bold, but I'm probably just used to the way it used to be.

I can try to reduce the boldness of the action items to be less jarring - I mainly wanted a visual separation of the main action and the subtitles. As I mentioned above, I do plan to change the comment bottom sheet to match up visually with the new changes introduced here!

The share button within the post viewer is supposed to jump directly to the share subpage of the post bottom sheet, but it now just brings up the main page (so you have to click again to share).

Oops, that missed my testing, nice catch! 😅

@micahmo
Copy link
Member

micahmo commented Oct 18, 2024

I'm good with whatever direction you want to head; just keep in mind that all other bottom sheets throughout the app will need to be updated, not just comments. I'm not sure if you created new widgets for the action items, but I think existing sheets use PickerItem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants