-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Strip leading and trailing spaces from most/all fields #10130
Comments
Hi @zorae, I want to work on this issue. It is a useful improvement to streamline data entry and prevent formatting errors. I'll review potential edge cases where leading/trailing spaces might be necessary and ensure the implementation excludes those fields. Please let me know if this feature has any additional details or preferences! |
Thanks @QuangPhung15! a) has the advantage that it gives librarians immediate feedback so they know they don‘t have to manually remove spaces. But I foresee that this could be annoying for multi-line fields like bio or work description where a librarian might start writing something, add a space or line break at the end and deselect the field before coming back to continue writing. Option a) would have to be implemented client-side, while b) could be either client- or server-side. |
Would it also be possible to substitute multiple space characters to only one, something like: |
@zorae can we please be enumerative of the exact fields you believe this should be applied to? Even if we start with only a few, that is more likely to make forward progress than requiring folks who don't have librarian context / experience from having to figure out what fields we might be talking about. Thank you! Also, as @scottbarnes mentioned to me in a passing, there may be edge cases, like author, where there are things like ", Sr." or other prefixes that end up complicating these rules. |
@mekarpeles Some fields I would find particularly useful are author name, bio, date of birth, date of death, edition title, work title, and work description. @scottbarnes Can you clarify what the issue would be with the “, Sr.” suffix? It ends with a period, so I don’t see how a rule that strips out whitespace at the end of a field would affect it. |
I apologize, I think I misheard this when the issue came up as including the stripping of periods. |
Proposal
When editing an author, work, or edition, invisible characters such as spaces and tabs should be automatically stripped from the beginning and end of a field.
Justification
Problem: Librarians may accidentally include leading/trailing spaces, which – if not manually removed – are saved to the database. This can lead to e.g. author names looking weird.
Impact: Librarians can save time, e.g. when pasting names from external sites.
Note: We would have to check for edge cases in which leading/trailing spaces have a legitimate use and exclude those fields.
Breakdown
Requirements Checklist
Related files
Stakeholders
Instructions for Contributors
Please run these commands to ensure your repository is up to date before creating a new branch to work on this issue and each time after pushing code to Github, because the pre-commit bot may add commits to your PRs upstream.
The text was updated successfully, but these errors were encountered: