-
Notifications
You must be signed in to change notification settings - Fork 50
feat(spx-gui): support editing user display name in profile modal #2840
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
base: dev
Are you sure you want to change the base?
Conversation
Summary of ChangesHello @aofei, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the user profile editing experience by enabling users to update their display name directly within the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request successfully implements the feature to allow users to edit their display name. The changes to the API type UpdateSignedInUserParams correctly enforce that at least one field is provided for an update. The UI changes in EditProfileModal.vue enable the editing functionality and add appropriate validation. I have one minor suggestion to improve data consistency by trimming whitespace from the description field before submission, just as is done for displayName.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR enables users to edit their display name in the profile modal, extending the existing profile editing functionality which previously only allowed editing the description field. The changes align the TypeScript API types with the backend's PUT /user endpoint requirements.
Changes:
- Updated
UpdateSignedInUserParamsto use a discriminated union type requiring at least one ofdisplayNameordescription - Made the display name field editable in the EditProfileModal with validation for blank values
- Added whitespace trimming for display name on submission
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| spx-gui/src/apis/user.ts | Updated type definition to support optional displayName and description fields with at least one required |
| spx-gui/src/components/community/user/EditProfileModal.vue | Made display name field editable with validation, added trimming on submit |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Code Review SummaryThe implementation successfully enables display name editing with proper i18n support and type safety. The code follows project conventions and is well-structured. Key Strengths:
Action Items: |
Update `UpdateSignedInUserParams` to accept `displayName` in addition to `description`, requiring at least one of the two fields to align with the updated `PUT /user` API. In `EditProfileModal`, the display name field is now editable instead of being a disabled input showing `user.displayName`. Add validation to ensure the display name is not blank, and trim whitespace before submitting. Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
acfee08 to
1761bd2
Compare
Update
UpdateSignedInUserParamsto acceptdisplayNamein addition todescription, requiring at least one of the two fields to align with the updatedPUT /userAPI.In
EditProfileModal, the display name field is now editable instead of being a disabled input showinguser.displayName. Add validation to ensure the display name is not blank, and trim whitespace before submitting.