Return with no avatar option and fix avatar popup layout issue #340
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add "No Avatar" option to avatar selection popup
Summary
Added "No Avatar" option: The avatar selection popup now includes a "No Avatar" option as the first choice, using the Wikimedia Commons image:
https://upload.wikimedia.org/wikipedia/commons/6/60/CapX_-_No_avatar.svg
Updated type definitions: Modified
Avatar
interface to supportnull
ID for the virtual "no avatar" optionFixed avatar removal: When selecting "No Avatar", the system now sends
null
to the backend instead of ID0
, which was causing validation errorsFixed avatar selection popup height to adapt itself when screen gets streched
Added Avatar Selection Popup test suite
Technical Details
AvatarSelectionPopup
component to include a virtual avatar withid: null
handleAvatarSelect
function to acceptnumber | null
parameterProfileEditMainWrapper
,ProfileEditMobileView
, andProfileEditDesktopView
Testing
yarn test -- AvatarSelectionPopup.test.tsx
to test each functionality of the component