Skip to content
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

10130/feature/stripping leading and trailing whitespaces from form input #10249

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Spaarsh
Copy link
Contributor

@Spaarsh Spaarsh commented Jan 1, 2025

Closes #10130

feature

Technical

The implementation deals solely with changes in the frontend JavaScript for the add.html and edit.html pages.

Testing

The PR affects the pages required for adding a new book, editing an existing edition and adding a new edition to existing book.

  1. Opening the page

    • Adding a New Book - go to the bottom of the home page and click on the "Add a new book" option.
    • Editing the edition of a book - visit any book's page and click on the "Edit" button on the top right.
    • Adding a new edition of a book - visit any book's page and scroll down to the editions table and click on the "Add another edition?" option.
  2. Fill any of the input fields while intentionally adding leading and/or trailing white-spaces, and deselect the field.

  3. If the leading and trailing white-spaces disappear, the intended behavior has been achieved.

Screenshot

Stakeholders

@scottbarnes

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 0% with 14 lines in your changes missing coverage. Please review.

Project coverage is 17.49%. Comparing base (3025f5d) to head (e6bc337).
Report is 80 commits behind head on master.

Files with missing lines Patch % Lines
openlibrary/plugins/openlibrary/js/add-book.js 0.00% 5 Missing ⚠️
openlibrary/plugins/openlibrary/js/edit.js 0.00% 5 Missing ⚠️
openlibrary/plugins/openlibrary/js/index.js 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10249      +/-   ##
==========================================
+ Coverage   17.44%   17.49%   +0.05%     
==========================================
  Files          89       88       -1     
  Lines        4792     4778      -14     
  Branches      848      845       -3     
==========================================
  Hits          836      836              
+ Misses       3436     3423      -13     
+ Partials      520      519       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Strip leading and trailing spaces from most/all fields
3 participants