Skip to content

feat(UserNicknamesPanel): add ability to set IRC display nickname#449

Open
SuperManifolds wants to merge 7 commits intodevelopfrom
supermanifolds/448
Open

feat(UserNicknamesPanel): add ability to set IRC display nickname#449
SuperManifolds wants to merge 7 commits intodevelopfrom
supermanifolds/448

Conversation

@SuperManifolds
Copy link
Member

Closes #448

Description

  • Add setDisplayNickname action to call PUT /nicknames/:id/display endpoint
  • Add star icon button to set any nickname as display nickname
  • Update UI to show star/delete buttons only for non-display nicknames
  • Add faStar icon to fontawesome library
  • Refresh user profile after setting display nickname to update UI

Additional Information

Demo

https://fuelrats.cloud/s/4NiNcdZXgfTLFsH

Acceptance Tasks

Contributor's Checklist

  • This PR was created to resolve an existing issue or set of issues.
  • This PR satisfies any and all acceptance criteria laid out by issue(s) it resolves.
  • I have discussed creating this PR with the maintainers in the issue(s) beforehand.
  • I have thoroughly tested the changes this PR introduces in a local development environment.
  • I have linted the entire codebase using yarn lint and confirmed there are no errors or warnings.
  • I have followed the commit conventions laid out by CONTRIBUTING.md.

Maintainer's Checklist

  • User-facing changes this PR introduces have been captured in a changeset.
  • This PR has been linted and tested locally as a part of the review process.
  • All issues this PR resolves have been properly linked before merging.

- Add setDisplayNickname action to call PUT /nicknames/:id/display endpoint
- Add star icon button to set any nickname as display nickname
- Update UI to show star/delete buttons only for non-display nicknames
- Add faStar icon to fontawesome library
- Refresh user profile after setting display nickname to update UI
@changeset-bot
Copy link

changeset-bot bot commented Jul 31, 2025

🦋 Changeset detected

Latest commit: 64c2433

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
fuelrats.com Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

- Consolidate conditional rendering for nickname buttons
- Use filled/outline star icons to show display status
- Add hover tooltips for icon buttons
- Replace generic div selector with .controlContainer class
- Fix prop ordering in UserNicknamesPanel component
- Fix color hex case and property order in styles
Copy link
Member

@UncleClapton UncleClapton left a comment

Choose a reason for hiding this comment

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

Hey Ran into a 500 from the API when setting the display nick. Would that just be because we're in lowers?

error id: 71de695d-0143-48c6-ba46-ca2608529495

Glad it did error though, because I entirely forgot controlling the loading state for action buttons is wonky.

faSignature,
faSpaceShuttle,
faSpinner,
faStar,
Copy link
Member

Choose a reason for hiding this comment

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

we also need to provide the regular version, since this only provides the solid version. Sorry I forgot we don't actually have this icon pack in here yet. without adding it the icon won't load properly.

Screenshot 2025-09-07 at 11 01 08

To fix:

  1. run yarn add "@fortawesome/free-regular-svg-icons@^5.15.4"
  2. add export to library.js
export {
  faStar as farStar,
} from '@fortawesome/free-regular-svg-icons'

…ntation

- Add @fortawesome/free-regular-svg-icons for outline star icon
- Use filled/outline stars to distinguish current vs settable display nicknames
- Add hover tooltips to icons for better UX
- Replace custom error handling with standardized getResponseError utility
- Create NicknameErrorBox for user-friendly error messages (404, 409, 422)
- Clear errors at start of operations to prevent stale error states
- Fix loading states to return proper boolean values
@SuperManifolds
Copy link
Member Author

I suspect the error 500 is due to funkiness with IRC server interaction on the dev API, I had already tested this locally and it works, I will look into why it's not working on the dev api

onConfirm={handleSetDisplayNickname}
onConfirmText="">
<FontAwesomeIcon fixedWidth icon={['far', 'star']} />
<FontAwesomeIcon fixedWidth icon="farStar" title="Set as display nickname" />
Copy link
Member

Choose a reason for hiding this comment

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

the previous ['far', 'star'] value was the correct icon. This value does not work and results in an error.

Could not find icon { prefix: 'fas', iconName: 'farStar' }

We only need to rename the export in library.js to deal with the naming conflict, but the name used by <FontAwesomeIcon /> remains the same. These are values defined within the icon objects we export in library.js

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.

As a rat I want to be able to change my IRC display nick from the profile

2 participants