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

feat: Add pronoun field to entry modal for users #6116

Merged
merged 19 commits into from
Jun 13, 2023

Conversation

nikk15
Copy link
Contributor

@nikk15 nikk15 commented Jun 7, 2023

From this UX Blast document: https://docs.google.com/document/d/13K_N5eBXk0aTBlHVoPUPIxpSWFeY2rP2EafVqS30fg4/edit?skip_itp2_check=true#heading=h.xcm1taufnky6

  • Added pronoun fields to entry modal and avatar set up
  • Added pronoun display to user select, guest lists and nametags
Screenshot 2023-06-09 at 4 00 08 PM Screenshot 2023-06-09 at 4 00 43 PM Screenshot 2023-06-09 at 4 00 56 PM Screenshot 2023-06-09 at 4 01 57 PM Screenshot 2023-06-09 at 4 00 22 PM

@nikk15 nikk15 marked this pull request as ready for review June 9, 2023 20:05
<a-entity class="nametag-text"
text="side: double; textAlign: center; color: #ddd; fontSize: 0.1;" text-raycast-hack
position="0 0.025 0.001"></a-entity>
<a-entity class="pronouns-text"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the only new line here.

Copy link
Contributor

@keianhzo keianhzo left a comment

Choose a reason for hiding this comment

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

If we also want to update the text color based on the theme for the pronoun text elements we should add it here:
https://github.com/mozilla/hubs/pull/6116/files#diff-f010909f986ed471df83ed99850af7a72b52d0433d806c250731df2f5b767629L282

Looks mostly good, I just pointed out a few things. Thanks for adding this!

src/components/name-tag.js Outdated Show resolved Hide resolved
src/storage/store.js Outdated Show resolved Hide resolved
src/components/name-tag.js Show resolved Hide resolved
Copy link
Contributor

@keianhzo keianhzo left a comment

Choose a reason for hiding this comment

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

This is almost ready, just a couple of nits.

this.updateHandRaised();
this.resizeNameTag();
}
},

updateNametagWidth(name) {
if (name) {
this.pronounsText?.el && this.pronounsText.el.components["text"].getSize(this.size);
Copy link
Contributor

Choose a reason for hiding this comment

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

I think both pronounText and nametagText should exist at this point so we can probably remove all the defensive code from here. We can probably also remove the name param and just pass the method name to the listener
this.nametagText.el.addEventListener("text-updated", this.updateNametagWidth, { once: true})
as long as we bind it here:
https://github.com/mozilla/hubs/blob/79f2fc11836c4573c546fb980f12c83afd1fb0c4/src/components/name-tag.js#L64

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The check for nametagText.el was legacy code, but I removed and you're correct, works fine! 👍

src/components/name-tag.js Outdated Show resolved Hide resolved
src/components/name-tag.js Show resolved Hide resolved
src/react-components/misc/useVolumeMeter.js Outdated Show resolved Hide resolved
@nikk15 nikk15 temporarily deployed to hc-bio June 13, 2023 18:05 — with GitHub Actions Inactive
@nikk15 nikk15 temporarily deployed to smoke June 13, 2023 18:05 — with GitHub Actions Inactive
@nikk15 nikk15 merged commit ab4035d into master Jun 13, 2023
12 checks passed
@nikk15 nikk15 deleted the add-pronoun-field-for-users branch June 13, 2023 18:46
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.

None yet

2 participants