From baed32ed83a062773a6a8e6b1a72d37a7ab6aa3f Mon Sep 17 00:00:00 2001 From: infinite-persistence Date: Wed, 24 Feb 2021 08:47:20 +0800 Subject: [PATCH] Lowered 'Channel Description' limit from 5000 to 3000 chars. ## Issue Closes 5571: Limit description length on channel edit ## Notes Similar to the previous value of '5000', this is a trial-and-error estimate. --- ui/component/channelEdit/view.jsx | 4 ++-- ui/constants/form-field.js | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ui/component/channelEdit/view.jsx b/ui/component/channelEdit/view.jsx index d2fdffb5d..8ab311f18 100644 --- a/ui/component/channelEdit/view.jsx +++ b/ui/component/channelEdit/view.jsx @@ -6,7 +6,7 @@ import classnames from 'classnames'; import { FormField } from 'component/common/form'; import Button from 'component/button'; import TagsSearch from 'component/tagsSearch'; -import { FF_MAX_CHARS_IN_DESCRIPTION } from 'constants/form-field'; +import { FF_MAX_CHARS_IN_DESCRIPTION_CHANNEL } from 'constants/form-field'; import ErrorText from 'component/common/error-text'; import ChannelThumbnail from 'component/channelThumbnail'; import { isNameValid, parseURI } from 'lbry-redux'; @@ -317,7 +317,7 @@ function ChannelForm(props: Props) { placeholder={__('Description of your content')} value={params.description} onChange={text => setParams({ ...params, description: text })} - textAreaMaxLength={FF_MAX_CHARS_IN_DESCRIPTION} + textAreaMaxLength={FF_MAX_CHARS_IN_DESCRIPTION_CHANNEL} /> } diff --git a/ui/constants/form-field.js b/ui/constants/form-field.js index 35e117f63..e6e2b6a04 100644 --- a/ui/constants/form-field.js +++ b/ui/constants/form-field.js @@ -1,4 +1,5 @@ export const FF_MAX_CHARS_DEFAULT = 2000; export const FF_MAX_CHARS_IN_COMMENT = 2000; export const FF_MAX_CHARS_IN_DESCRIPTION = 5000; +export const FF_MAX_CHARS_IN_DESCRIPTION_CHANNEL = 3000; export const FF_MAX_CHARS_IN_POST = 10000; -- 2.45.2