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

Instance and community modlogs #1156

Merged
merged 13 commits into from
Mar 7, 2024
Merged

Instance and community modlogs #1156

merged 13 commits into from
Mar 7, 2024

Conversation

hjiangsu
Copy link
Member

@hjiangsu hjiangsu commented Feb 29, 2024

Pull Request Description

This draft PR introduces modlogs into Thunder. Most of the changes here shouldn't conflict with existing code since its mostly new (with the exception of some logic which adds the modlog action to the app bar)

As of right now, instance and community modlogs have been implemented. In the future, we can add additional modlogs (e.g., user modlogs) but that is out of scope for this PR. To access the modlogs, I've added an additional action to the respective app bar (general feed, and community). General feeds will navigate to the instance modlog, whereas communities will navigate to the community modlog.

Notes:

Todo:

  • Check to see that all the different moderation actions are included and parsed properly
  • Have a way to distinguish between instance/community modlog
  • Add more context to each mod action (e.g., link to the relevant post, comment, community, etc)
  • Double check compatibility between 0.18 and 0.19. I'll try to mainly focus on 0.19 support as a lot of instances have migrated already, but I'll still do some checks to make sure it doesn't completely break on 0.18
  • Fix icons with mod action filter

Issue Being Fixed

Issue Number: N/A

Screenshots / Recordings

4c766435-0e76-4bc3-b132-33a6f2c87bb0.mp4

Checklist

  • Did you update CHANGELOG.md?
  • Did you use localized strings where applicable?
  • Did you add semanticLabels where applicable for accessibility?

@micahmo
Copy link
Member

micahmo commented Feb 29, 2024

This is so awesome!!

@hjiangsu
Copy link
Member Author

I updated the video - it now shows more context per modlog entry (post/comment/user/community)

Let me know what you think of it and any suggestions for changes! I'll also bring in @machinaeZER0, @ggichure in here if you have any feedback on this!

@machinaeZER0
Copy link
Collaborator

Aw, I wish I could see the original implementation for comparison (there was a video here before, correct?). As a quicker take (on my phone), I think you've captured a lot of the functionality perfectly, but the button/pill setup feels like it could be done in a way to reduce duplication of information, if that makes sense? Being showing a blocked username in the body, then duplicating it in a pill below, showing a reply that requires action, then showing that text again in a pill below, etc.

I think there may be a more elegant way to handle this page than pills, but one baseline suggestion would be that since the pills handle all the relevant actions/links, and the inciting incident is broadly covered by the section highlighted in red (the "title"?), removing the non-pill section between those would reduce duplicative info. Thoughts on that approach, at least as a first step?

I could then also hidden comments being displayed in between those in non-pill form (still expandable, but with a "go to comment" link), but that might be personal preference. Mostly thinking that would feel closer to the inbox experience, which I think would be positive for UX consistency

You've laid down a great foundation here, so I do think it's just deciding where it can be streamlined :) great job so far!

@hjiangsu
Copy link
Member Author

hjiangsu commented Mar 2, 2024

Thanks for all the feedback! The original video is basically the same, except without the button/pills that you mentioned (community, user, comment, post)

I think you've captured a lot of the functionality perfectly, but the button/pill setup feels like it could be done in a way to reduce duplication of information

I agree with you here! Now that I look back at it, it does feel like there's a lot of information that is being duplicated.

I can maybe mess around and see what other layouts I can come up with, but I'm not too good at UI/UX so I appreciate any feedback 😅 If you do have any thoughts on alternatives, by all means let me know!

One thing I will note is that there is often a "reason" attached to each entry which is displayed in the body, so I'd have to figure out some place to put that if I were to get rid of the body section.

still expandable, but with a "go to comment" link

Ahh, the reason I did this instead of having a link to the comment is that often times, the comment content is removed. Although, maybe having the link is good so that it can provide some more context for the comment.

Thanks again for the feedback! I'll take those things into consideration 😄

@hjiangsu
Copy link
Member Author

hjiangsu commented Mar 2, 2024

So I played around with a few more layouts, and this is what I have so far! This is only for posts/comments. I haven't figured out how to make the layout yet for users (e.g., banned users). Let me know what you think of the changes!

I placed the "reason" at the bottom (if there is a reason)

Posts:

e39d86c7-5dce-4fe8-aedf-f03e8dccc584.mp4

Comments:

e59d4077-dfe1-47c7-838e-75f0d14dc15a.mp4

@hjiangsu
Copy link
Member Author

hjiangsu commented Mar 3, 2024

Another update, I've added a different layout for users/communities:

Users:

Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-03-02.at.16.05.14.mp4

Communities:

Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-03-02.at.16.04.41.mp4

@machinaeZER0
Copy link
Collaborator

I think this looks really good! I wonder if it would be helpful to use either our profile or inbox pages as a jumping off point for making some sort of "landing page" from which a mod could browse these different categories (posts/comments/users/etc). The landing page could also have a section for admin stuff like setting/managing roles in a community, perhaps?

I do like the idea of being able to take actions like blocking/unblocking stuff on a long press or something (or exposing other interactions) to keep these sections compact, though if a lot of actions need completing then hiding stuff in a sub menu will add a lot of steps for mods... Something to think about. Maybe a (collapsible?) icon bar under each item with intuitive icons would work for any "quick actions."

It will definitely be a lot of Stuff, so it's quite an undertaking to make sure everything is laid out in an intuitive way! Do we know of any examples in other apps that could be used as reference?

@hjiangsu
Copy link
Member Author

hjiangsu commented Mar 5, 2024

I wonder if it would be helpful to use either our profile or inbox pages as a jumping off point for making some sort of "landing page" from which a mod could browse these different categories (posts/comments/users/etc).

Hmm, this might be possible, but it might be slightly harder to filter out events based on categories. From a technological standpoint, the API accepts different filters, but those filters are based on actions rather than categories if that makes sense (e.g., the API allows us to filter events for featuring/unfeaturing posts, removing/restoring posts, etc. but it doesn't provide a filter for general "post" related actions).

I do like the idea of being able to take actions like blocking/unblocking stuff on a long press or something

I like the ideas that you mentioned - in particular, being able to perform actions on this page (given that you have the correct role). For example, an instance admin could navigate to the instance modlog and perform related actions there (undo/redo a specific event). Similarly, a community moderator could navigate to the community modlog.

I think if the general concept and design looks good, we can use this as the starting point for modlogs? We can then further iterate and add more features into here (like the quick actions that you mentions) in separate PRs!

@machinaeZER0
Copy link
Collaborator

That makes sense to me!

@hjiangsu hjiangsu marked this pull request as ready for review March 7, 2024 16:56
@hjiangsu
Copy link
Member Author

hjiangsu commented Mar 7, 2024

This should be ready to go now. I'll go ahead and merge it in first.

@micahmo Feel free to review if you'd like, but no need to since I know there's quite a bit of changes in this one. You can check the changes made to the existing code (and ignore the new additions)! The following things have also been added to this one:

  • Added some fixes to build on web properly (upgraded dependencies, adjustments to lib/utils/cache.dart)
  • Adjusted the logic so that we clean up both deleted and removed comments (previously, we only cleaned up deleted comments)

Copy link
Member

@micahmo micahmo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't look too closely but it all LGTM. 😊

@hjiangsu hjiangsu merged commit da8894f into develop Mar 7, 2024
1 check passed
@hjiangsu hjiangsu deleted the feature/modlog branch March 7, 2024 17:51
@micahmo micahmo changed the title Draft: Instance and community modlogs Instance and community modlogs Mar 8, 2024
@micahmo
Copy link
Member

micahmo commented Mar 8, 2024

@hjiangsu How would you feel about putting the new modlog button under a popup menu on the main feed like it is on community feeds?

Pros:

  • We will probably have more actions there at some point, so it will have to be overflowed eventually, and then users might be upset that it moved.
  • The icon is a bit heavy compared to the rest of the UI in that area.

Cons:

  • It might hide the discoverability of a cool new feature.

Just a point for discussion. 😊

@hjiangsu
Copy link
Member Author

hjiangsu commented Mar 8, 2024

Definitely! I'm all for placing the modlog into a popup menu

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.

3 participants