commerce icon indicating copy to clipboard operation
commerce copied to clipboard

Improve “Download PDF…” UX

Open lukeholder opened this issue 4 years ago • 0 comments

Discussed in https://github.com/craftcms/commerce/discussions/2480

Originally posted by mattstein July 10, 2021 The order listing’s Download PDF... button should be improved to match the more optimal UX of the order detail page.

Order Detail 👍

The order detail page is ideal with its PDF download option:

  1. If no PDF template/format is configured, no button is shown. no-pdf
  2. If one PDF template/format is configured, a simple Download PDF is shown. one-pdf
  3. If multiple PDF templates/formats are configured, the button’s primary action is to download whichever is configured as the default, with a dropdown menu for otherwise selecting the preferred format. multiple-pdfs

The user is only presented options that make sense given the configuration.

Order Listing 😐

The order listing page is less optimal.

download-pdf

It does only display its Download PDF… button if there‘s at least one PDF template/format configured, but...

  1. It always requires opening the download menu and pressing Download.
  2. It always prompts you to select the PDF template/format even if there’s only one choice.
  3. It prompts for download types that only make sense when multiple orders were selected, which adds unnecessary steps:
    • If only one order was selected and only one PDF template/format is configured, we have to click to open this menu, ignore an irrelevant option, and choose a download type.
    • If only one order was selected, we might download a ZIP file containing only one document which just adds a required step to extract it.

tl;dr

I’d therefore suggest the following changes for the order listing’s Download PDF button:

  1. If only one order is selected from the list and only one PDF template/format is configured, omit the from Download PDF…, skip the menu, and download the PDF document.
  2. If multiple orders are selected from the list and only one PDF template/format is configured, omit the menu’s PDF selection.

This would create a more optimal download flow that’s consistent with the beauty of the order detail page’s PDF downloading experience.

lukeholder avatar Jul 21 '21 15:07 lukeholder