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)
Sun, Nov 10, 12:32 PM
Unknown Object (File)
Sat, Nov 9, 4:04 AM
Unknown Object (File)
Sun, Nov 3, 5:41 PM
Unknown Object (File)
Fri, Nov 1, 8:20 AM
Unknown Object (File)
Fri, Nov 1, 8:20 AM
Unknown Object (File)
Fri, Nov 1, 8:20 AM
Unknown Object (File)
Fri, Nov 1, 8:20 AM
Unknown Object (File)
Oct 20 2024, 9:02 PM
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
Branch
master
Lint
No Lint Coverage
Unit
No Test Coverage

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.