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

✨ Show warning for high profile accounts based on follower count #235

Merged
merged 2 commits into from
Nov 18, 2024

Conversation

foysalit
Copy link
Contributor

This PR adds a prominently visible warning when actioning an account with follower count more than a configured value (through env var)

Screenshot 2024-11-15 at 20 41 00

Copy link
Contributor

@matthieusieben matthieusieben left a comment

Choose a reason for hiding this comment

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

Pretty straight forward 👍

@@ -828,22 +834,37 @@ function Form(
function useSubjectQuery(subject: string) {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit, and probably a more general comment, but I think that the get profile part would be better implemented as its own useSubjectProfile hook. This would allow for better composability and maintainability in the future.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah that's fair. just don't have many places here where profile is needed in isolation so feels more natural for me to tie it to repo/record data fetcher for now at least.

<Alert
type="warning"
title="High profile account"
body={`This user has more than ${HIGH_PROFILE_FOLLOWER_THRESHOLD} followers. Please take caution when moderating this account.`}
Copy link
Contributor

Choose a reason for hiding this comment

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

Should the actual count be displayed here (since we have the info at hand) ?

@arcalinea arcalinea temporarily deployed to follower-count-warning - ozone-staging PR #235 November 18, 2024 15:32 — with Render Destroyed
@foysalit foysalit merged commit e90cf54 into main Nov 18, 2024
3 checks passed
@matthieusieben matthieusieben deleted the follower-count-warning branch November 18, 2024 16:14
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