-
Notifications
You must be signed in to change notification settings - Fork 340
feat: Added max length validation in file upload modal in file description #1037
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
base: develop
Are you sure you want to change the base?
feat: Added max length validation in file upload modal in file description #1037
Conversation
| import TypingUsers from '../TypingUsers/TypingUsers'; | ||
| import useSearchMentionUser from '../../hooks/useSearchMentionUser'; | ||
|
|
||
| const DEFAULT_CHAR_LIMIT = 5000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably, the limit is set in the RC server. We have to make sure we read these settings from the RC server instead of hardcoding 5000; we can use this as a fallback though.
|
Hello @Spiral-Memory, I’ve addressed your review comment Could you please check it again |
|
|
||
| const useSettingsStore = create((set) => ({ | ||
| messageLimit: 5000, | ||
| messageLimit: null, // Will be fetched from RC server (Message_MaxAllowedSize) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can set 5000 incase server fails to respond as fallback
| const [isPending, setIsPending] = useState(false); | ||
| const messageRef = useRef(null); | ||
|
|
||
| // Mention UI states |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove comments
|
Addressed the review points @Spiral-Memory please check |
Brief Title
Acceptance Criteria fulfillment
Added a 5000-character limit for the file description
Show an alert message when the description exceeds the limit
Display the character counter below the description input (left: alert, right: counter)
Fixes #1036
final1.mp4
PR Test Details
Note: The PR will be ready for live testing at https://rocketchat.github.io/EmbeddedChat/pulls/pr-<pr_number> after approval. Contributors are requested to replace
<pr_number>with the actual PR number.