-
-
Notifications
You must be signed in to change notification settings - Fork 99
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: Random avatar generator for profiles #154 #207
Conversation
Someone is attempting to deploy a commit to a Personal Account owned by @Sanchitbajaj02 on Vercel. @Sanchitbajaj02 first needs to authorize it. |
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.
Great job, @DaSeeker67! 🎉 Thank you for submitting your pull request. Your contribution is valuable and we appreciate your efforts to improve our project. Keep being the part of the community!
'We will promptly review your changes and offer feedback. Keep up the excellent work!
Kindly remember to check our Contributing Guidelines'
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.
Resolve Merge Conflicts.
@DaSeeker67 please resolve the merge conflicts to get this pull request merged |
@DaSeeker67 do you want any help with this... |
WalkthroughThis update integrates a new feature for generating avatars for users upon registration and saving their data. It enhances user authentication by adding password strength and matching validations. The avatar generation logic uses user data to create a unique avatar URL. Additionally, the user interface receives minor adjustments in styling and dynamic image source setting, improving the overall user experience. The Redux state and types are updated to accommodate the new avatar URL data. Changes
Related issues
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (5)
- src/backend/auth.api.ts (3 hunks)
- src/backend/avatarGenerator.ts (1 hunks)
- src/components/pages/user/index.tsx (1 hunks)
- src/redux/reducers/authReducer.ts (1 hunks)
- src/types/index.d.ts (1 hunks)
Additional comments: 7
src/backend/avatarGenerator.ts (1)
- 1-13: The implementation of
generateAvatar
function looks good and follows best practices for URL generation based on user inputs. Ensure that the inputs (name
,variant
,size
,colors
) are validated before calling this function to prevent any unexpected behavior or errors.src/redux/reducers/authReducer.ts (1)
- 13-13: The addition of the
avatarURL
field to theinitialState
object inauthReducer
is consistent and aligns with the feature requirements. Ensure that other parts of the application that consume thecreds
object are updated to handle the newavatarURL
field appropriately.src/types/index.d.ts (1)
- 28-28: The addition of the
avatarURL
field to theuserDetail
type is appropriate and enhances type safety by ensuring its presence in user details. Ensure that all parts of the application that create or manipulateuserDetail
objects are updated to include theavatarURL
field in accordance with the updated type definition.src/components/pages/user/index.tsx (1)
- 52-60: The updates to dynamically set the
src
attribute of theImage
component based on user data and adjust itswidth
andheight
attributes are consistent with the feature's objectives to display generated avatars. Ensure to test the UI thoroughly to confirm that these changes result in the desired visual and functional outcomes on the user profile page.src/backend/auth.api.ts (3)
- 4-4: The import of
generateAvatar
is correctly implemented to support avatar generation during user registration. This aligns with the feature's objectives.- 15-23: The addition of password validation checks enhances security by enforcing password strength requirements. Ensure that these checks are thoroughly tested to confirm they work as expected without hindering the user registration process.
- 23-23: The use of
generateAvatar
withinregisterUser
andsaveDataToDatabase
to generate and save avatar URLs is a key part of the feature implementation. Ensure that error handling around avatar generation and database operations is robust to manage any potential issues gracefully. Additionally, thoroughly test the registration process to confirm that avatars are correctly generated and saved.Also applies to: 207-214
…02#207) Co-authored-by: Sanchit Bajaj <55249639+Sanchitbajaj02@users.noreply.github.com>
* refactor: solved the bug mentioned in #246 * feat: replaced react-toastify with sonner lib (#242) * feat: new changes * feat: replaced react-toastify with sonner * feat: yarn file * refactor: added requested changes --------- Co-authored-by: Sanchit Bajaj <55249639+Sanchitbajaj02@users.noreply.github.com> * feat: Form validation (#243) * feat: add detailed footer section * fix: form-validation bug * fix: changed footer alignment (#239) * fix: patch global scrollbar bug (#250) * Random avatar generator for profiles #154 (#207) Co-authored-by: Sanchit Bajaj <55249639+Sanchitbajaj02@users.noreply.github.com> * refactor: patch navbar bug * refactor: patch navbar bug 2 --------- Co-authored-by: Sanchit Bajaj <55249639+Sanchitbajaj02@users.noreply.github.com> Co-authored-by: Monu <142221687+monoMonu@users.noreply.github.com> Co-authored-by: Kom Senapati <komnoob123@gmail.com> Co-authored-by: Amit Mishra <65525769+DaSeeker67@users.noreply.github.com>
…02#207) Co-authored-by: Sanchit Bajaj <55249639+Sanchitbajaj02@users.noreply.github.com>
* refactor: solved the bug mentioned in Sanchitbajaj02#246 * feat: replaced react-toastify with sonner lib (Sanchitbajaj02#242) * feat: new changes * feat: replaced react-toastify with sonner * feat: yarn file * refactor: added requested changes --------- Co-authored-by: Sanchit Bajaj <55249639+Sanchitbajaj02@users.noreply.github.com> * feat: Form validation (Sanchitbajaj02#243) * feat: add detailed footer section * fix: form-validation bug * fix: changed footer alignment (Sanchitbajaj02#239) * fix: patch global scrollbar bug (Sanchitbajaj02#250) * Random avatar generator for profiles Sanchitbajaj02#154 (Sanchitbajaj02#207) Co-authored-by: Sanchit Bajaj <55249639+Sanchitbajaj02@users.noreply.github.com> * refactor: patch navbar bug * refactor: patch navbar bug 2 --------- Co-authored-by: Sanchit Bajaj <55249639+Sanchitbajaj02@users.noreply.github.com> Co-authored-by: Monu <142221687+monoMonu@users.noreply.github.com> Co-authored-by: Kom Senapati <komnoob123@gmail.com> Co-authored-by: Amit Mishra <65525769+DaSeeker67@users.noreply.github.com>
Related Issue
Random avatar generator for profiles #154
Description
created the function to generate random avatar from boring avatar during the signup saved the generated link into the db and use the link to show the avatar in the user profile page
Screenshots
some authentication error