Skip to content
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(APP-3693): Update InputFileAvatar component to handle initial preview and add onCancel callback #384

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

shan8851
Copy link
Contributor

@shan8851 shan8851 commented Jan 9, 2025

Description

Update InputFileAvatar component to handle initial preview and add onCancel callback
Update IProposalActionUpdateMetadataDaoMetadata logo property to avatar

Task: APP-3693

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • I have selected the correct base branch.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • Any dependent changes have been merged and published in downstream modules.
  • I ran all tests with success and extended them if necessary.
  • I have updated the CHANGELOG.md file in the root folder of the package after the [UPCOMING] title and before the
    latest version.
  • I have tested my code on the test network.

@shan8851 shan8851 requested a review from cgero-eth January 9, 2025 14:08
Comment on lines 53 to 54
initialValue,
onCancel,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes works fine, I was thinking if we could change a bit the properties to align the component to a form field component. What if for instance we have a value property instead of initialValue and we remove the imagePreview local state? The value might be an object like { url: string, file?: File } and we can combine the onFIleSelect and onCancel to one onChange property

@shan8851 shan8851 requested a review from cgero-eth January 10, 2025 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants