Prevent or mitigate extra whitespace in user names #1380
Labels
area: ruby
Changes to server-side code
priority: medium
type: analysis
Potential changes that require some design/architecture/code analysis before we start implementing.
meta:291173
We have some users with names that begin or end with lots of spaces, and there are some with expanses of spaces in the middle. This leads to confusing rendering, as shown in the linked post. When we show last activity, a user card, a history entry, a comment, etc, the user name (and its extents) should be clear.
A code-only change would be to trim the user name anywhere it's displayed (ignoring blocks of whitespace in the middle for now), but I have the feeling there's lots of code that just calls "user.name" or whatever the property is, so that'd be a lot of call sites. I don't know how hard it is to fix it at the DB level and what error checking/handling we'd need to put around that. A change like that might also annoy the affected users. Possibly a compromise would be to add a "full name" field (or some such), displayed on the profile only, seeding that with the current user names and then trimming the existing names. Maybe there are better approaches. This requires more analysis.
The text was updated successfully, but these errors were encountered: