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

AO3-5977 Hide "Approve All Unreviewed Comments" button from admins on works #4966

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

WelpThatWorked
Copy link
Contributor

@WelpThatWorked WelpThatWorked commented Nov 21, 2024

Issue

https://otwarchive.atlassian.net/browse/AO3-5977

Purpose

Hides the "Approve All Unreviewed Comments" button if an admin is viewing a work with comment moderation turned on.

Credit

Jake Faulkner

Copy link
Collaborator

@sarken sarken left a comment

Choose a reason for hiding this comment

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

Hi, Jake, and thanks for the pull request!

I've left a review comment, and while there's already a test in features/admins/admin_post_news.feature that checks that the button is visible on news posts, we'd appreciate it if you could add a test to features/admins/admin_works.feature that ensures the button isn't visible on works.

I've assigned the Jira issue to you and set its status to In Review so no one will mistakenly create a duplicate pull request. I've also given your account permission to comment on, assign, and transition issues in the future.

Thanks again for contributing! If you have any questions, you can contact us at otw-coders@transformativeworks.org.

app/controllers/comments_controller.rb Outdated Show resolved Hide resolved
@WelpThatWorked
Copy link
Contributor Author

Test added, threw in a check for the per-comment "Approve" button as well, since I don't see it anywhere else.

Used the helper, and decided to let it hide the button on works with no unreviewed comments as well, since the button would do nothing in that case.

@WelpThatWorked WelpThatWorked marked this pull request as draft November 23, 2024 08:00
… works

Also hides "Approve All Unreviewed Comments" when there are no unreviewed comments.
@WelpThatWorked WelpThatWorked marked this pull request as ready for review November 23, 2024 16:15
features/step_definitions/web_steps.rb Outdated Show resolved Hide resolved
app/views/comments/unreviewed.html.erb Outdated Show resolved Hide resolved
Copy link
Collaborator

@sarken sarken left a comment

Choose a reason for hiding this comment

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

Thank you!

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

Successfully merging this pull request may close these issues.

2 participants