jargonsdev/jargons.dev

Implement logic to disable submission button in the editor when content is empty

开放

#42 创建于 2024年4月14日

 (3 条评论) (0 个反应) (0 位负责人)MDX (45 个派生)auto 404
:arrow_upper_right: medium priority:sparkles: enhancementhacktoberfest

仓库指标

星标
 (54 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

Currently, users can submit a new word without entering any content or title. To improve the quality of submissions, we should implement a logic that disables the submission button when either the content or title field is empty. Additionally, we should consider implementing a minimum input length requirement for the content field to ensure meaningful contributions.

Related Files:

Steps:

  1. Implement a check in the editor add new word action to disable the submission button if the content or title field is empty.
  2. Display a message or tooltip to inform users that both fields are required for submission.
  3. Consider implementing a minimum input length requirement for the content field (e.g., at least 50 characters).

Expected Behavior:

  • The submission button should be disabled if the content or title field is empty.
  • Users should receive a clear message or tooltip indicating that both fields are required.
  • The content field should require a minimum of 50 characters for submission.

Additional Information:

  • This enhancement will help improve the quality of contributions by ensuring that users provide meaningful content when submitting new words.
  • I thought that at least 50 characters can assure us of a meaningful content; is this too much or less!? kindly share your thought 😉

贡献者指南