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

Moderation/content action overhaul #2258

Merged
merged 46 commits into from
Dec 6, 2023
Merged

Moderation/content action overhaul #2258

merged 46 commits into from
Dec 6, 2023

Conversation

SleeplessOne1917
Copy link
Member

Description

This started out as a simple bug fix and turned into a full scale refactor and UI overhaul because the existing UI for this stuff was pretty janky. The screenshots should show what I'm going for.

Note: Some existing icons were deleted to use pairs of icons that have the same art style.

Screenshots

Mod action dropdown - comment

image

Mod action dropdown - post

image

Ban dialog

image

Report dialog

image
The remove dropdown looks the same.

Purge dialog

image

Transfer community dialog

image
The appoint as mod and appoint as admin are basically the same.

TODO:

  • Get consensus on the verbiage. Waiting until that's settled to update the translations repo.
  • Have at least one other dev test locally since this was a large refactor.

Copy link
Member

@dessalines dessalines left a comment

Choose a reason for hiding this comment

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

I'm testing the functionality rn, but you might as well start on i18n, because there's a lot of it. We can always tweak those strings later.

src/shared/components/comment/comment-node.tsx Outdated Show resolved Hide resolved
src/shared/components/post/post.tsx Outdated Show resolved Hide resolved
src/shared/components/post/post.tsx Outdated Show resolved Hide resolved
src/shared/components/common/mod-action-form-modal.tsx Outdated Show resolved Hide resolved
src/shared/components/common/mod-action-form-modal.tsx Outdated Show resolved Hide resolved
@SleeplessOne1917
Copy link
Member Author

@dessalines Regarding speak as moderator, I got this comment on a PR I opened for the backend. It seems people think it's a feature and not a bug. It may be worth keeping the current functionality and just changing the verbiage in the dropdown.

cc @Nutomic

@dessalines
Copy link
Member

@Nutomic got that fixed in LemmyNet/lemmy#4222 (IE, only letting you distinguish your own comment).

@LemmyNet LemmyNet deleted a comment from asimons04 Dec 1, 2023
@SleeplessOne1917 SleeplessOne1917 marked this pull request as ready for review December 6, 2023 02:18
@SleeplessOne1917
Copy link
Member Author

SleeplessOne1917 commented Dec 6, 2023

I addressed everything that needed to be addressed. The only thing that I can't do much about at the moment are the purge issues you pointed out. I ran into issues with purges, but they didn't break the page like you described. From what I've done:

  • Purge post: works as expected
  • Purge comment: purges the comment and not its children. Unsure if this behavior is intentional.
  • Purge user: definitely buggy. Posts and comments from the user don't get removed, although you will get an error if you navigate to the user's page

Copy link
Member

@dessalines dessalines left a comment

Choose a reason for hiding this comment

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

Besides the missing i18n below:

  • After any modal is shown then dismissed (such as remove / restore a comment) it breaks scrolling, and I have to do a page refresh.

Everything else seems to be working well tho.

src/shared/components/common/mod-action-form-modal.tsx Outdated Show resolved Hide resolved
src/shared/components/common/mod-action-form-modal.tsx Outdated Show resolved Hide resolved
src/shared/components/post/post.tsx Outdated Show resolved Hide resolved
@SleeplessOne1917
Copy link
Member Author

@dessalines all your points are addressed. Should be good to go.

@SleeplessOne1917 SleeplessOne1917 enabled auto-merge (squash) December 6, 2023 22:34
Copy link
Member

@dessalines dessalines left a comment

Choose a reason for hiding this comment

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

Sweet! Everything tested out great. We can address any smaller bugs later. I'll start a build to put this on voyager.lemmy.ml in a minute.

@SleeplessOne1917 SleeplessOne1917 merged commit 8594a30 into main Dec 6, 2023
2 checks passed
@SleeplessOne1917 SleeplessOne1917 deleted the remove-post branch December 6, 2023 23:39
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