Skip to content
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

When showing username and organization together, hide individual org names #873

Open
allanlasser opened this issue Nov 22, 2024 · 1 comment
Labels
design Colors, fonts, layout and other visual elements good first issue Good for newcomers

Comments

@allanlasser
Copy link
Member

Feedback from @morisy:

In the document view, documents that are associated with a user's org instead of another org currently use the attribution field in the bottom right to go something like "Michael Morisy (morisy)" with their username being in the organization field. If it's uploaded by an individual and not attached to a non-individual organization, it should just list their name, not the org (or in this case, username) associated with their individual account. Example here: https://next.www.documentcloud.org/documents/25330349-opposition-to-motion-to-dismiss/


I can think of two places where we're rendering user names in this way: in the DocumentMetadata and in the DocumentListItem.

Unrelated to UI presentation, we should be collapsing user accounts into individual org "profiles", and relying on the individual org for things that we're calling "Yours". This is partly a Squarelet issue, since you can't edit individual org details now, and partly a DocumentCloud backend issue, since we should have documents associated with individual orgs (if we aren't already).

@allanlasser allanlasser added the design Colors, fonts, layout and other visual elements label Nov 22, 2024
@eyeseast eyeseast added the good first issue Good for newcomers label Nov 25, 2024
@allanlasser
Copy link
Member Author

allanlasser commented Nov 26, 2024

We also have this logic in DocumentEmbed:

  $: contributedBy = settings.onlyshoworg ? org : `${user} (${org})`;

And this in api/document:

function userOrgString(document: Document): string

All this can be reconciled by a Contributor component:

<DocumentContributor document:Document orgOnly:boolean />

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design Colors, fonts, layout and other visual elements good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants