okTurtles / group-income

A decentralized and private (end-to-end encrypted) financial safety net for you and your friends.
https://groupincome.org
GNU Affero General Public License v3.0
331 stars 44 forks source link

#2325 - add `stringMax()` validator for user display name #2328

Closed SebinSong closed 2 months ago

SebinSong commented 2 months ago

closes #2325

cypress[bot] commented 2 months ago

group-income    Run #3012

Run Properties:  status check passed Passed #3012  •  git commit a6bc9f9c2e ℹ️: Merge 2a1c9855f39b2888b07b867846d27b55397bf9ed into 1d951cdb8065f8ef87ff6ea89767...
Project group-income
Branch Review refs/pull/2328/merge
Run status status check passed Passed #3012
Run duration 10m 44s
Commit git commit a6bc9f9c2e ℹ️: Merge 2a1c9855f39b2888b07b867846d27b55397bf9ed into 1d951cdb8065f8ef87ff6ea89767...
Committer Sebin Song
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 10
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 111
View all changes introduced in this branch ↗︎
corrideat commented 2 months ago

Is this a good idea (or at least the 80 characters limit)? While I agree it's usually excessive, there are many cases where someone's full name can be pretty long (e.g., Pablo Picasso, Hubert Blaine Wolfeschlegelsteinhausenbergerdorff (yes, that's the 'short' version)).

Another example: Karl-Theodor zu Guttenberg (the current German politician).

However, whether someone would use their very long full name as a display name, I'm not sure.

taoeffect commented 2 months ago

Karl-Theodor zu Guttenberg

That's 26 characters

Pablo Picasso, Hubert Blaine Wolfeschlegelsteinhausenbergerdorff

64 characters.

So yeah... I think 80 is sufficient. 😄

SebinSong commented 2 months ago

@corrideat Its my perception that people with long name usually want to use a shorter version when possible and also often encourage others to do so too.(Who would enjoy typing 80 characters each time they call someone in the chat?)

corrideat commented 2 months ago

Karl-Theodor zu Guttenberg

Karl-Theodor Maria Nikolaus Johann Jacob Philipp Franz Joseph Sylvester Buhl-Freiherr von und zu Guttenberg

Pablo Picasso

Pablo Diego José Francisco de Paula Juan Nepomuceno Cipriano de la Santísima Trinidad Ruiz Picasso

Hubert Blaine Wolfeschlegelsteinhausenbergerdorff

This one is over half a KiB

Its my perception that people with long name usually want to use a shorter version when possible and also often encourage others to do so too

Probably that's what most prefer, yes. But since 80 characters aren't going to fit on screen / the UI component anyhow, it seems like an arbitrary limit.