Page MenuHomePhabricator

[web] Allow copying the link
ClosedPublic

Authored by tomek on Jun 16 2023, 4:33 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, May 5, 6:59 AM
Unknown Object (File)
Sat, May 4, 5:14 AM
Unknown Object (File)
Sat, May 4, 5:14 AM
Unknown Object (File)
Sat, May 4, 5:14 AM
Unknown Object (File)
Sat, May 4, 5:13 AM
Unknown Object (File)
Sat, May 4, 4:43 AM
Unknown Object (File)
Tue, Apr 30, 11:01 AM
Unknown Object (File)
Apr 8 2024, 9:41 PM
Subscribers

Details

Summary

Call clipboard copy API just like in other places on web. The discussion about operation feedback is still in progress https://www.figma.com/file/a1nkbWgbgjRlrOY9LVurTz?node-id=11400:282507#473816740.

Depends on D8238

Test Plan

Click copy button and check if the link is in the clipboard.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

tomek requested review of this revision.Jun 16 2023, 4:54 AM
web/invite-links/view-invite-link-modal.react.js
28 ↗(On Diff #27833)

Are there other places where we generate this link? I'm a fan of having a single source of truth for such values somewhere in lib/ to make it easier to change where we e.g. migrate to a new domain.

I did sth similar in lib/utils/blob-service.js. What do you think?

web/invite-links/view-invite-link-modal.react.js
28 ↗(On Diff #27833)

I see it is hardcoded in two places on native. Can we define this somewhere in lib?

web/invite-links/view-invite-link-modal.react.js
28 ↗(On Diff #27833)

Yep, that makes sense!

Looks good but remember to define the URL in one place

This revision is now accepted and ready to land.Jun 22 2023, 3:23 AM

Rebase - use extracted function

This revision was automatically updated to reflect the committed changes.