Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make order customer email links consistent #3767

Merged
merged 1 commit into from
Sep 30, 2020

Conversation

brchristian
Copy link
Contributor

@brchristian brchristian commented Sep 21, 2020

Description
Currently when looking at the table of orders on the backend, the customer email will always be displayed as a link. However, the behavior of this link is completely different based on whether the customer has a user account or not. If they do, it will link to that user's User page on the backend. If they don't, it is a simple mailto link.

(Can you tell that clicking one of these will do one thing and clicking the other will do something totally different?)

Screen Shot 2020-09-21 at 11 42 53 AM

This behavior is inconsistent, and in my opinion, confusing. There are two ways to make the behavior consistent:

(1) We could make all links function as mailto.
(2) We could make emails with User accounts link to those user pages, and emails with no user accounts display as plain text.

In my opinion, (2) is the slightly less pretty, but much more intuitive and helpful of these two options:

Screen Shot 2020-09-21 at 11 43 52 AM

Checklist:

  • I have followed Pull Request guidelines
  • I have added a detailed description into each commit message
  • I have updated Guides and README accordingly to this change (if needed)
  • I have added tests to cover this change (if needed)
  • I have attached screenshots to this PR for visual changes (if needed)

@jarednorman
Copy link
Member

I'm fine with this change, but I'm wondering if anyone actually cares about that mailto functionality. I doubt any of the stores I work with would mind this change, but I do want to be mindful of existing stores.

@brchristian
Copy link
Contributor Author

@jarednorman Sounds good to let folks weigh in if there are strong feelings here.

Note that you can’t easily send mail to logged-in users who have placed orders, however! The links just go to their profiles instead! Which makes me suspect that few people rely on it for their workflow, but I’m totally open to dissenting perspectives if they are out there in the community.

@aldesantis
Copy link
Member

How about having the best of both worlds and using the current solution, but also adding a mailto link next to the email (maybe in the form of an envelope icon)? I don't know if that would pollute the UI too much, but it certainly helps us keep the experience consistent without disrupting any existing workflows.

If it doesn't look good, I'm also okay with the current solution — as @brchristian noted, no one is probably relying on the functionality because of its inconsistence.

@brchristian
Copy link
Contributor Author

There's another issue here that just occurred to me, which is that there may be cases where order.email != order.user.email. Probably in most cases they will be the same, but I can think of at least two scenarios where they would diverge:

(1) It's an old order, and the user has since changed their email from what it was at the time they placed the order.

(2) It's an order purchased as a gift for someone else, and perhaps a store uses the order.email field to hold the recipient's email, rather than the sender's email.

In cases where order.email != order.user.email, I'm not sure what the behavior should be here!

@aldesantis
Copy link
Member

I think we should always display order.email, since that's the email the user entered on the order (or the user had on their profile at the time they made the order).

Even if a user changes their email after placing the order, I think it would make sense to try the email on the order and then try contacting the user on the email on their profile if they're not replying or if the email doesn't exist anymore.

Previously the order table would show user account links for
users who had accounts, and mailto links for those who did not.
This inconsistent link behavior is replaced with plaintext for
users who do not have accounts.
@brchristian
Copy link
Contributor Author

Okay, following the suggestions from @aldesantis, I have updated and force pushed. Here is the new behavior; it will always show order.email, will link the text to the user account if there is an order.user, and mailto links will appear to the right in both cases like so:

Screen Shot 2020-09-27 at 9 47 11 AM

I also gave the link a hover text like so:

Screen Shot 2020-09-27 at 9 47 18 AM

Let me know how this looks to you!

Copy link
Member

@spaghetticode spaghetticode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@brchristian thank you 👍

Copy link
Member

@kennyadsl kennyadsl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks for taking care of this and for keep improving the Solidus Admin. ❤️

@kennyadsl kennyadsl merged commit 664a3c4 into solidusio:master Sep 30, 2020
@kennyadsl kennyadsl added changelog:solidus_backend Changes to the solidus_backend gem UI and removed Needs Core Team Review labels Sep 30, 2020
@brchristian brchristian deleted the patch-4 branch September 30, 2020 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:solidus_backend Changes to the solidus_backend gem
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants