Sage-Bionetworks / sage-monorepo

Where OpenChallenges, Schematic, and other Sage open source apps are built
https://sage-bionetworks.github.io/sage-monorepo/
Apache License 2.0
23 stars 12 forks source link

[Story] Allow user/data curator to specify the avatar initials for organizations #1481

Closed tschaffter closed 1 year ago

tschaffter commented 1 year ago

What projects is this story for?

OpenChallenges

As a user, I want

As a user/data curator, I want to be able to customize the initials displayed in the avatar (when no image is available) so that I can prevent "mistakes" made when inferring the initials from the name of the organization.

The same could apply to users when we resume working on the user implementation.

Description

No response

Acceptance criteria

Out of scope:

Tasks

Anything else?

Have you linked this story to a GitHub Project?

tschaffter commented 1 year ago

@vpchung How would you like to address this "issue" mentioned by Solly?

vpchung commented 1 year ago

Hmm... One possible option would be to add shortName back to the data model, which is already included in our OpenChallenges Data google sheets. (I had added it so that we can more easily generate a slug name/login).

For example, I saw that James mentioned that the acronym for University of Illinois Urbana-Champaign is UIUC, not UOIU, and this is reflected with what we currently captured in our google sheets as well :-) (row 203)

Going with this route does come with the caveat in that not every organization may have a short name. But in that case, we could default back to what we are currently doing, where we take the first letter of every word in the organization name? We can also additionally remove any instances of "of" and "the" and "and" before taking the initials, which would address Solly's observation.

vpchung commented 1 year ago

^ oh wait... another possible issue is that not every short name will be an acronym.... in that case, maybe instead of shortName, we add acronym to the data model?

What are your thoughts? @tschaffter @mdsage1

tschaffter commented 1 year ago

@vpchung I like your suggestion to add the property acronym to the data and API models. Having a "short name" wouldn't solve the issue raised by Solly as the short name may still include token like "of", which would still lead to the avatar component to generate "incorrect" initials.

@mdsage1 This PR is a good opportunity for you to learn:

Here are the tasks:

tschaffter commented 1 year ago

@vpchung suggested to process the org name to generate a better "acronym".