Page MenuHomePhabricator

[native] introduce copy username functionality to user profiles
ClosedPublic

Authored by ginsu on Aug 22 2023, 9:33 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 23, 6:55 PM
Unknown Object (File)
Thu, Nov 21, 7:26 AM
Unknown Object (File)
Thu, Nov 21, 7:26 AM
Unknown Object (File)
Thu, Nov 21, 7:26 AM
Unknown Object (File)
Thu, Nov 21, 7:26 AM
Unknown Object (File)
Thu, Nov 21, 7:23 AM
Unknown Object (File)
Fri, Nov 15, 4:28 AM
Unknown Object (File)
Oct 22 2024, 1:00 PM

Details

Summary

With profiles, we want to give the user the ability to easily copy another user's username into their clipboard. This diff introduces this functionality.

In the figma doc, @ted described how this functionality should behave:

The “Copy username” toggle will turn into “Username copied!” to confirm that the username has been copied successfully. The toggle will revert back to the default state after 3 seconds.

Here are the screenshots of the designs:

Screenshot 2023-08-22 at 12.32.39 PM.png (2×3 px, 1 MB)

Depends on D8914

Test Plan

Please see demo video below

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ginsu edited the test plan for this revision. (Show Details)
ginsu added reviewers: atul, inka.
ginsu added a subscriber: ted.
ginsu requested review of this revision.Aug 22 2023, 9:51 AM
native/components/user-profile.react.js
27 ↗(On Diff #30236)

Prefer using sleep to setTimeout

This revision is now accepted and ready to land.Aug 26 2023, 4:38 PM

address comments / rebase before landing