Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

show org name not displayName in most places#63907

Merged
sqs merged 2 commits into
mainfrom
sqs/org-namespace-display
Jul 19, 2024
Merged

show org name not displayName in most places#63907
sqs merged 2 commits into
mainfrom
sqs/org-namespace-display

Conversation

@sqs

@sqs sqs commented Jul 18, 2024

Copy link
Copy Markdown
Member

Previously, organizations would be displayed using their displayName, which was inconsistent and non-canonical. The displayName is also longer, so it's not suited to display in select menus and other similar places.

For example, when viewing the user menu or creating a batch change or saved search, the dropdown will now show sourcegraph instead of Sourcegraph (where the latter is the display name).

image

Test plan

Go to create a batch change or saved search and confirm that org names not displayNames are shown.

Changelog

  • The user menu and other filter menus now show the names of organizations, not their "display names", to avoid ambiguity. For example, these menus will now show abc-corp not ABC Corp (if the latter was the abc-corp's display name).

@sqs sqs requested a review from a team July 18, 2024 10:24
@cla-bot cla-bot Bot added the cla-signed label Jul 18, 2024
@sqs sqs force-pushed the sqs/org-namespace-display branch from 965353b to 027b049 Compare July 18, 2024 10:53
@sqs sqs requested a review from a team July 18, 2024 11:31

@BolajiOlajide BolajiOlajide left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think there's a conversation to be had around this change. There's been discussions during the Batch Changes era about displaying the displayName for both users and org namespace.
Whilst the displayName is non-canonical, it is the one slug that's easily editable and recognizable within Sourcegraph. In the user dropdown, the display name is what we show to users and this change could bring about confusion.

CleanShot 2024-07-18 at 12 45 05@2x

For example on S2, we have an org with the name sourcegraph and displayName of CodeSearch.

CleanShot 2024-07-18 at 12 45 38@2x

I've seen customers create orgs with weird names and they usually depend on the displayName especially during org changes.

CleanShot 2024-07-18 at 12 38 21@2x

Personally, I'd even prefer displaying the displayName for both User and Org in the namespace selector component.

@sqs

sqs commented Jul 18, 2024

Copy link
Copy Markdown
Member Author

@BolajiOlajide What if we change what’s displayed in the user menu as well to just show the name not displayName? Then it’s consistent.

What are the situations you’re aware of where that would be bad for customers?

@eseliger

Copy link
Copy Markdown
Member

Since displayName is not globally unique using that field could actually be quite misleading.

I wonder if we should have a displayName at all - or if we should, if we should instead say whenever you display displayName you also have to render the canonical name.

So overall I am ok with this change.

@BolajiOlajide

BolajiOlajide commented Jul 18, 2024

Copy link
Copy Markdown
Contributor

@BolajiOlajide What if we change what’s displayed in the user menu as well to just show the name not displayName? Then it’s consistent.

What are the situations you’re aware of where that would be bad for customers?

The one case that stands out was after a customer had a re-org, they wanted the org to reflect it's new name and all they did was update the displayName.

@BolajiOlajide

Copy link
Copy Markdown
Contributor

Since displayName is not globally unique using that field could actually be quite misleading.

I wonder if we should have a displayName at all - or if we should, if we should instead say whenever you display displayName you also have to render the canonical name.

So overall I am ok with this change.

Good point on it's uniqueness.
If you check the linked screenshot in my earlier message, we also have a displayName field for Users.

@BolajiOlajide

Copy link
Copy Markdown
Contributor

@sqs If we can make the update in the sidebar, it will at the very least reduce confusion from customers.

We can then communicate this change as time goes on.

@sqs sqs changed the title always show namespaceName not displayName in namespace selector show org name not displayName in most places Jul 19, 2024
@sqs sqs requested a review from BolajiOlajide July 19, 2024 05:59
@sqs sqs force-pushed the sqs/org-namespace-display branch from 027b049 to 3bb0431 Compare July 19, 2024 05:59
@sqs

sqs commented Jul 19, 2024

Copy link
Copy Markdown
Member Author

@BolajiOlajide Thanks! Updated all the other similar places where we showed the org displayName to just show the name.

@sqs sqs force-pushed the sqs/org-namespace-display branch 4 times, most recently from 941383e to 6801aa8 Compare July 19, 2024 11:33
@sqs sqs requested a review from a team July 19, 2024 11:33
Previously, organizations would be displayed using their `displayName`, which was inconsistent and non-canonical.

For example, when creating a batch change or saved search, the dropdown will now show `sourcegraph` instead of `Sourcegraph` (where the latter is the display name).
@sqs sqs force-pushed the sqs/org-namespace-display branch from 6801aa8 to 2b6e681 Compare July 19, 2024 11:49
The org displayName is not unique and is often longer, so let's just show the org name in most places.
@sqs sqs force-pushed the sqs/org-namespace-display branch from 2b6e681 to 6a7ffb9 Compare July 19, 2024 12:24
@sqs sqs enabled auto-merge (squash) July 19, 2024 12:26
@sqs sqs merged commit 4918fa7 into main Jul 19, 2024
@sqs sqs deleted the sqs/org-namespace-display branch July 19, 2024 12:30
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.

3 participants