[CORL-235] Allow a user to download their comment history (#2449)

* Create preliminary UI for requesting a user's comment history

CORL-235

* Create preliminary download handler

CORL-235

* Create preliminary CSV exporter for downloading user's comments

CORL-235

* Create preliminary download comments flow with email and landing page

User can download their comments after requesting via an email.
Does not include limiters preventing users from spamming the download flow.

CORL-235

* Style the download comments landing page to match the spec

CORL-235

* Update the profile download comments to respect 14 day download limit

CORL-235

* Hook up request limiter on the comment download end points.

CORL-235

* Create sorry dialogue for when the download comments link is invalid/expired

CORL-235

* Create loading spinner for comment download landing page

CORL-235

* Create an optimistic updater for requesting a comment download

CORL-235

* Add localization for download comments landing page's sorry text

CORL-235

* Adjust downloaded comment format and contents

- Format the date to match tenant local
- Format dates to be using numeric values with date and time
- Add comment URL to exported CSV record

CORL-235

* Rename `createCSV` to `createExportedContent` in the download handler

CORL-235

* Make comment download callout full width and left justified

CORL-235

* Update stream snapshots to account for the download comments changes

CORL-235

* Update snapshots to correspond to download comments changes

CORL-235

* Add date filter to the comment download

Will filter by date of the issued token to only include comments before
that time.

CORL-235

* Clean up the layout of the list items in the download comments landing page

CORL-235

* fix: localization fixes

* fix: formatting

* fix: download file enhancements

* fix: addressed download request loophole

* Update snapshots to address button changes on download comments landing page

CORL-235

* Simplify download comment landing page components

CORL-235

* Remove max-width calc's on account main layout and set them in child views

Sets the max-width settings on the download route since it's custom
set on all the othere routes (email and password).

CORL-235

* Bump npm version in package.json

CORL-235
This commit is contained in:
Nick Funk
2019-08-09 21:17:24 +00:00
committed by Wyatt Johnson
parent 11fc3697ed
commit e3f24811fc
40 changed files with 1686 additions and 200 deletions
@@ -0,0 +1,7 @@
{% extends "layouts/user-notification.html" %}
{% block content %}
Your comments from {{ context.organizationName }} as of {{ context.date }} are
now available for download.<br /><br />
<a data-l10n-name="downloadUrl" href="{{ context.downloadUrl }}">Download my comment archive</a>
{% endblock %}
@@ -62,12 +62,22 @@ export type InviteEmailTemplate = UserNotificationContext<
}
>;
export type DownloadCommentsTemplate = UserNotificationContext<
"download-comments",
{
username: string;
date: string;
downloadUrl: string;
}
>;
type Templates =
| BanTemplate
| ConfirmEmailTemplate
| ForgotPasswordTemplate
| InviteEmailTemplate
| PasswordChangeTemplate
| SuspendTemplate;
| SuspendTemplate
| DownloadCommentsTemplate;
export { Templates as Template };