Rocket.Chat icon indicating copy to clipboard operation
Rocket.Chat copied to clipboard

fix: Avatar disabling when it is set to Default

Open thepiyush-303 opened this issue 1 year ago • 5 comments

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

thepiyush-303 avatar Dec 10 '24 20:12 thepiyush-303

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

dionisio-bot[bot] avatar Dec 10 '24 20:12 dionisio-bot[bot]

⚠️ 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

changeset-bot[bot] avatar Dec 10 '24 20:12 changeset-bot[bot]

These changes in parent component will disable whole UserAvatarEditor also disables Upload option which is not desirable. Screencast from 2024-12-11 12-02-26

thepiyush-303 avatar Dec 11 '24 06:12 thepiyush-303

@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?

dougfabris avatar Dec 12 '24 20:12 dougfabris

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!

thepiyush-303 avatar Dec 13 '24 05:12 thepiyush-303