Print View Filename

Description

The print view should use a friendly filename.
YYYY-MM-DD_Full_Name.

Business/Product Success Criteria

None

Done Criteria

Print file name is in this format: YYYY-MM-DD_Full_Name

Design Specifications:

None

Accessibility Specifications

None

Test Strategy

None

Environment

None

New Fields for Analytics/Export Configuration (if needed)

None

Activity

Show:
Tapani Otala
September 11, 2019, 5:37 PM

It looks like it is possible the override the filename in HTML5-capable browsers: https://blog.logrocket.com/programmatic-file-downloads-in-the-browser-9a5186298d5c/

Creating the download link

First, let’s say we have a blob object by some means. We want to create a helper function that allows us to create a download link (<a></a> element) that can be clicked in order to download the content of the blob, just like a regular file download.

The logic of our helper function can be broken down as follows:

  • Create an object URL for the blob object

  • Create an anchor element (<a></a>)

  • Set the href attribute of the anchor element to the created object URL

  • Set the download attribute to the filename of the file to be downloaded. This forces the anchor element to trigger a file download when it is clicked

  • If the link is for a one-off download, release the object URL after the anchor element has been clicked

Tapani Otala
September 11, 2019, 5:39 PM

Note: this method could work for as well.

Tapani Otala
September 11, 2019, 5:54 PM

FYI ^^^

Christopher Snider
September 18, 2019, 5:57 PM

Marking Support Comms as yes for the time being as a reminder to check how we’re referencing print view in support articles and on tidepool.org. I don’t think anything specifically needs to change, but this will be a good opportunity to review everything.

Thacher Hussain
December 13, 2019, 12:38 AM

Moving to the next sprint because the Marketo email work (WEB-610) turns out to not have been enough to fix the issue, so I will be addressing it by creating a new template (WEB-704)

Priority

Low

Assignee

Unassigned

QA Assignee

None

Reporter

Amanda Jo Fisher

Requested By (External)

None

Fix versions

None

T-Shirt Size

S: 2-3 days

Risk Level

None

User Experience Assessment Level

None

UEA: Issue Volume

None

UEA: Category

None

Components

Design Review Required?

None

Design Approved By:

None

QA done during validation of another ticket?

None

Accessibility Review Required?

None

Accessibility Review Approved By

None

Approved for Production By:

None

Marketing Comms

No

Support Follow Up

None

KB Update

Yes

Resolved Build #

None

Change completion date

None

Pull Request Needed

None

Story Points

3

Sprint

None
Configure