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

fix: make fullName/display name an empty string if null #1170

Merged
merged 2 commits into from
Sep 15, 2024
Merged

Conversation

clintonlunn
Copy link
Collaborator


name: Pull request
about: Create a pull request
title: ''
labels: ''
assignees: ''


What type of PR is this?(check all applicable)

  • refactor
  • feature
  • bug fix
  • documentation
  • optimization
  • other

Description

If a user created an account, set a username but not a display name, the display name (fullName) would be null. To prevent this, we can use a nullish coalesce operator to check for null and convert to an empty string.

NOTE: this did not happen if the user set a display name and then deleted it. In that case, the display name would already be an empty string, not reverted back to null.

Related Issues

Issue #1160

What this PR achieves

Prevent the user from seeing null in the tab title. Instead of null, it will become an empty string.

Screenshots, recordings

(staging env without change)
image

(local env with change)
image

Notes

Copy link

vercel bot commented Sep 14, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
open-tacos ✅ Ready (Inspect) Visit Preview Sep 14, 2024 6:39pm

@clintonlunn
Copy link
Collaborator Author

@vnugent

small bug fix. I defaulted the display name in the title to be an empty string, but the bug ticket indicates that it should instead be the username. Do you have a preference?

i.e. (/u/ntest) • 2 Photos on OpenBeta versus ntest (/u/ntest) • 2 Photos on OpenBeta

@clintonlunn
Copy link
Collaborator Author

Also, the wording was weird when the user had 0 photos uploaded, I fixed the grammar for that.

Instead of saying. "Photo on OpenBeta" it now says "0 Photos on OpenBeta"

image

@clintonlunn clintonlunn linked an issue Sep 15, 2024 that may be closed by this pull request
@vnugent vnugent merged commit a1b5204 into develop Sep 15, 2024
8 of 10 checks passed
@vnugent vnugent deleted the null-in-title branch September 15, 2024 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

null shown in title on profile page
2 participants