fix: Avatar disabling when it is set to Default
This PR introduces a new prop, profileAvatar, in the UserAvatarEditor component. The profileAvatar prop is passed from the AccountProfileForm component and indicates whether the value is undefined or a valid AvatarObject. This distinction determines whether the "Default Avatar" option should be disabled or enabled.
Proposed changes (including videos or screenshots)
Issue(s)
Closes #34159
Steps to test or reproduce
Further comments
Looks like this PR is not ready to merge, because of the following issues:
- This PR is missing the 'stat: QA assured' label
- This PR is missing the required milestone or project
Please fix the issues and try again
If you have any trouble, please check the PR guidelines
⚠️ No Changeset found
Latest commit: d2bd80e1624f6930cc05f9bb923f60976ba54343
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
These changes in parent component will disable whole UserAvatarEditor also disables Upload option which is not desirable.
@thepiyush-303 I looked at it deeper and indeed my recommendation didn't work.
I send some changes, please take a look if it make sense too you.
Would be nice to add some tests on it as well, are you up to it?
The changes you provided seem valid at first glance, but they are not functioning as expected. When the form is submitted, the value is being lost, as demonstrated in this clip.
Screencast from 2024-12-13 11-04-45.webm
Working on it!