Page MenuHomePhabricator

[web] Add "Use ENS avatar" option to `EditUserAvatarMenu`
ClosedPublic

Authored by atul on Aug 2 2023, 12:48 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 3, 9:48 AM
Unknown Object (File)
Wed, Apr 3, 9:47 AM
Unknown Object (File)
Wed, Apr 3, 9:47 AM
Unknown Object (File)
Wed, Apr 3, 9:47 AM
Unknown Object (File)
Wed, Apr 3, 9:47 AM
Unknown Object (File)
Wed, Apr 3, 9:42 AM
Unknown Object (File)
Feb 27 2024, 12:10 AM
Unknown Object (File)
Feb 27 2024, 12:10 AM
Subscribers

Details

Summary

Adds menu item to EditUserAvatarMenu to allow SIWE accounts to set ENS avatar.

Test Plan

comm.eth account can set ENS avatar:

atul account cannot set ENS avatar:

2c122c.png (1×1 px, 110 KB)

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

atul published this revision for review.Aug 2 2023, 12:50 AM
atul added inline comments.
web/avatars/edit-user-avatar-menu.react.js
100 ↗(On Diff #29471)

Using the exact copy from native (see D8065)

102 ↗(On Diff #29471)

Shoutout @tomek for adding iconComponent prop to MenuItem in D8306 which made things more flexible.

accepting but please address comment inline before landing

web/avatars/edit-user-avatar-menu.react.js
120–125 ↗(On Diff #29471)

I would personally prefer if instead of this ternary expression, we implemented menuItems by pushing the menu items into a "results" array based off condition like we did in native: https://github.com/CommE2E/comm/blob/master/native/avatars/edit-user-avatar.react.js#L89C3-L113C6

This revision is now accepted and ready to land.Aug 2 2023, 9:03 AM
web/avatars/edit-user-avatar-menu.react.js
125–127 ↗(On Diff #29496)

Personally would strongly prefer if "Reset to default" was always visible (grayed out if anything), but I'll match native for consistency.

This revision was landed with ongoing or failed builds.Aug 2 2023, 9:01 PM
This revision was automatically updated to reflect the committed changes.