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

Rate limiting tab #1031

Merged
merged 12 commits into from
May 24, 2023
Merged

Conversation

SleeplessOne1917
Copy link
Member

This closes #981. This is what the rate limiting page looks like:
rate limiting page
I also took the liberty of refactoring the tabs into a reusable component.

In addition to this, there was a comment I left on the issue that I'm not sure anyone saw:

I'm wondering if only rate limiting should be in its own tab, or if it should be split up even more. Currently, the site tab on the admin page takes up a lot of vertical space and has a lot of information: this means users have to scan through a bunch of stuff to find the setting they want and, when they want to save, have to scroll all the way to the bottom of a long page. Compartmentalizing the settings into a few more tabs should make it both easier to find the setting you're looking for and reduce the scroll distance needed to reach the save button.

Here's what I'm thinking for compartmentalizing the Site tab settings into:

Personalization

  • Name
  • Icon
  • Banner
  • Description
  • Theme
  • Sidebar
  • Legal

General

  • Enable Downvotes
  • Enable NSFW
  • Registration Mode
  • Only admins can create communities
  • Require email verification
  • Email admins on receiving new applications
  • Email admins on receiving new reports
  • Private Instance
  • Hide modlog mod names
  • Slur filter regex
  • Languages
  • Max actor name length
  • Captcha enabled

Federation

  • Federation enabled
  • Allowed/blocked instances
  • Federation debug mode
  • Federation worker count

Rate Limiting

All the rate limiting options.

Taglines

Emoji

Let me know what you think.

Considering those changes would be outside the scope of the rate limit tab, I didn't implement them. Thoughts on the proposed change @dessalines @Nutomic?

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.

Once that console logs removed, feel free to merge.

src/shared/components/common/tabs.tsx Outdated Show resolved Hide resolved
{
key: "settings",
label: i18n.t("settings"),
getNode: this.userSettings,
Copy link
Member

Choose a reason for hiding this comment

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

Nice.

@makotech222
Copy link
Contributor

Related, can you try and break out the banned users list into its own tab and make it cleaner? hexbear has thousands and it blows up the page.

@SleeplessOne1917
Copy link
Member Author

@makotech222 I can do that as part of that reorganization in a separate PR.

@SleeplessOne1917
Copy link
Member Author

@dessalines I just realized I might need to add some translation before I merge. I'm wondering if should take the strings such as "Message rate limit" and use just "Rate Limit" as the label of the top input and use "Member", "Post", etc. as the tab names. Thoughts?

render() {
return (
<form onSubmit={linkEvent(this, submitRateLimitForm)}>
<h5>Rate Limit Options</h5>
Copy link
Member

Choose a reason for hiding this comment

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

i18n here too.

@dessalines
Copy link
Member

I'm wondering if should take the strings such as "Message rate limit" and use just "Rate Limit" as the label of the top input and use "Member", "Post", etc. as the tab names. Thoughts?

Up to you, whichever is easiest.

@dessalines
Copy link
Member

K translations are merged now.

@SleeplessOne1917 SleeplessOne1917 merged commit ebb5198 into LemmyNet:main May 24, 2023
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.

Separate Rate limit settings into its own tab
3 participants