jargonsdev / jargonsdev/jargons.dev

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

Aperta
#42 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

:arrow_upper_right: medium priority :sparkles: enhancement hacktoberfest
Lingua principale
MDX
Stelle
56
Fork
45
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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:**

- https://github.com/babblebey/jargons.dev/blob/main/src/pages/editor/new/index.astro
- https://github.com/babblebey/jargons.dev/blob/main/src/components/islands/word-editor.jsx

**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 😉

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Start with src/pages/editor/new/index.astro and src/components/islands/word-editor.jsx, then trace the add-new-word action and its current submission controls. Done means empty title or content prevents submission, users see a required-fields message, and the agreed minimum content length is enforced.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
javascript, react
Ambito
frontend, web-dev
Tipo di issue
Funzionalità
Difficoltà
2/5
Tempo stimato
1-3 ore
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.