Skip to content
This repository was archived by the owner on May 24, 2022. It is now read-only.

Conversation

ltfschoen
Copy link
Contributor

Screenshots:

screen shot 2019-01-24 at 2 22 24 pm

screen shot 2019-01-24 at 2 22 16 pm

@Tbaut
Copy link
Collaborator

Tbaut commented Jan 24, 2019

From my test we could allow up to 34 characters on the account list, eg:
image
compared to
image

and keep the 25 char limit on the header view.
Should we limit the amount of char in the name field at account creation/import?

@ltfschoen
Copy link
Contributor Author

ltfschoen commented Feb 3, 2019

From my test we could allow up to 34 characters on the account list, eg:
image
compared to
image

and keep the 25 char limit on the header view.
Should we limit the amount of char in the name field at account creation/import?

It's different for me. If I change to allow up to 34 chars on the account list, it appears as follows. If I instead allow up to 31 chars it looks ok

screen shot 2019-02-04 at 8 47 04 am

And since we're not using a monospaced font (with a fixed-width), the amount of space that the characters take up depends on the characters that the user uses in their name. For example, if the user has a name with 50 characters that just contains dots and commas (where a comma appears every 5th character), then it only takes up 2/3 of the width on the Account List page, whereas if their name contains 50 characters that just contains capital letters, then only half of their name fits in on the Account List Page.

In both screenshots below I've allowed up to 34 characters. Not that the account that contains only dots and a comma every 5th character ends with ... since that's what we're adding to the end when we're shortening the name

Screenshots

Account name with 50 characters that just contains commas and dots
screen shot 2019-02-04 at 8 54 59 am

Account name with 50 characters that just contains capital letters
screen shot 2019-02-04 at 8 54 51 am

So if I allow up to 22 characters to allow for a worst case name that has all capital letters, then it looks like the following and just fits in on the Account List page:

screen shot 2019-02-04 at 9 07 19 am

But perhaps we should approach it a different way.

  1. Switch to a monospaced font (with a fixed-width and no kerning) for Account Names (i.e. Courier, Courier New, Lucida Console, Monaco, and Consolas, etc).
  2. Calculate when to shorten the name and the appropriate width to shorten it to based on the quantity of different kinds of characters (after categorising different characters by their width)

Also, answering your question, yes, we should we limit the amount of characters in the name field at account creation/import

@Tbaut
Copy link
Collaborator

Tbaut commented Feb 11, 2019

But perhaps we should approach it a different way.

Totally, what about using something like text-overflow: ellipsis ?

@Tbaut
Copy link
Collaborator

Tbaut commented Feb 27, 2019

Hey @ltfschoen, do you want to go on with this PR or have you had other thoughts to do it?

@ltfschoen
Copy link
Contributor Author

Sorry for delayed response. The text-overflow: ellipsis idea is brilliant idea

@ltfschoen
Copy link
Contributor Author

@Tbaut I've pushed a commit using text-overflow: ellipsis, it appears to work great

@Tbaut
Copy link
Collaborator

Tbaut commented Mar 18, 2019

Thanks a lot, that works well.

  • One thing I could notice is that Capital and lower letters are cut, the big "T" isn't fully visible and the "p" and "g" also. It happens only on the token list view :
    image

@ltfschoen
Copy link
Contributor Author

@Tbaut I've pushed a commit to prevent the clipping from occurring on Linux

Copy link
Collaborator

@Tbaut Tbaut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm thanks!

@Tbaut Tbaut merged commit 0f66041 into master Mar 18, 2019
@Tbaut Tbaut deleted the luke-390-shorten-account-name-v2 branch March 18, 2019 21:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants