jargonsdev / jargonsdev/jargons.dev
Implement logic to disable submission button in the editor when content is empty
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- MDX
- Sterne
- 56
- Forks
- 45
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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:
- Implement a check in the editor add new word action to disable the submission button if the content or title field is empty.
- Display a message or tooltip to inform users that both fields are required for submission.
- 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 😉
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit src/pages/editor/new/index.astro und src/components/islands/word-editor.jsx und verfolge dann die Aktion zum Hinzufügen eines neuen Worts sowie deren aktuelle Übermittlungssteuerung. Die Aufgabe ist abgeschlossen, wenn ein leerer Titel oder Inhalt die Übermittlung verhindert, Benutzer eine Meldung zu Pflichtfeldern sehen und die vereinbarte Mindestlänge des Inhalts erzwungen wird.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript, react
- Bereich
- frontend, web-dev
- Issue-Typ
- Feature
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100