usdigitalresponse / usdr-gost

USDR-hosted grants management tools
http://grants.usdigitalresponse.org
Apache License 2.0
30 stars 21 forks source link

Replace mailto links under Team Status to be copy link #2730

Open ClaireValdivia opened 7 months ago

ClaireValdivia commented 7 months ago

Why is this issue important?

behavior for clicking mailto links is confusing and very dependent on user's mail settings

Current State

On new grant details page, under Team Status, a user's email appears as a mailto: link under the status they applied

Expected State

Acceptance Criteria:

Implementation Plan

Relevant Code Snippets

Rough draft provided by @jeffsmohan

caitlinwinner commented 6 months ago

https://www.figma.com/proto/0TAG7bAtKIyRBxtCcknrxz/Users-%26-Teams?type=design&node-id=402-15506&t=UGeOmqqiCgNXVkrt-0&scaling=contain&page-id=308%3A10487&starting-point-node-id=402%3A15481

See Sam's prototype for copy / toast behavior.

samserif23 commented 6 months ago

Please Note

The prototype has an alternative toast version, as seen with the last user on the page, "David Saris." This toast is in line with that table row and appears directly next to the email link the user has clicked. I find this more evident in this context than our 'full page' toast seen with the other users, and I welcome discussion on which version to take.

ClaireValdivia commented 6 months ago

Thanks Sam! a few follow up questions for @samserif23 and @caitlinwinner

image

samserif23 commented 6 months ago

Hi Claire, Initial responses are below. Will talk through these with Caitlin and edit as necessary:

samserif23 commented 6 months ago

@ClaireValdivia Link to Figma > USDR Design System > Toast Component

ClaireValdivia commented 6 months ago

@TylerHendrickson acceptance criteria and designs have been added, passing to you for implementation details! let me know of any questions

TylerHendrickson commented 6 months ago

@samserif23 What do you think about changing the icon to the left of the email address to the Bootstrap files icon instead of removing the icon altogether?

I see two benefits in moving to the files icon:

Here's an example of what this would look like according to our styling: image

samserif23 commented 6 months ago

@TylerHendrickson @caitlinwinner Ty, our initial decision to remove the icon was to avoid having something redundant on each line, for instance, if we had multiple email addresses in that section.

I agree with your two benefits in helping users understand this is a copy action. What do you think about the icon appearing only on hover and to the right of the email value so as not to shift the text?

TylerHendrickson commented 6 months ago

To my eyes, it looks like there are enough lines of text and blank space separating the email addresses that the copy icon doesn't feel like significant visual clutter when there are multiple email addresses. image

Regarding the right-hover icon, I think the caveat is that the copy action only becomes apparent when the a user is already interacting with the text in some way, so it doesn't really "advertise" the functionality. That said, I'm happy to defer to you on what makes the most sense here.


On a slightly different topic, I'm not able to find a Bootstrap toast behavior that fully conforms to the Figma designs – what would you think about using a tooltip instead?

TylerHendrickson commented 6 months ago

@samserif23 To offer another example, @jeffsmohan mentioned that GitHub has a pretty solid implementation of this type of behavior in Pull Request views, and provided this example:

https://github.com/usdigitalresponse/usdr-gost/assets/1851017/56310a51-f37f-45a1-830c-193786a205ce

Thoughts?

samserif23 commented 6 months ago

I believe the GitHub solution works best.

I'm still thinking the icon should be on the right because on the left, it reads more like a value_type than an action.

TylerHendrickson commented 6 months ago

@ClaireValdivia Implementation details added.

jeffsmohan commented 6 months ago

@ClaireValdivia totally happy to keep this out of scope for this issue, but I'm curious if we want to try to make the copy behavior more consistent between the emails here and the big "copy link" button at the top of the page.

  1. The copy link button confirmation shows for 1s, whereas the tooltip here is spec'd to show for 2.5s.
  2. The big button vs small copy icon present very different UIs for the ~same action. Do we want to try to unify the UIs more? (Personally, I'm not sure we want/need to, but wanted to raise it for consideration.)
samserif23 commented 6 months ago

@jeffsmohan Regarding the confirmation time, the 1s confirmation should work fine for the tooltip since we are moving away from our in-line toast.

ClaireValdivia commented 6 months ago

just confirming also that we're good with the separate UIs for now. thanks for raising, Jeff!