Skip to content

Add success feedback to csv export dialog #265

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

Merged
merged 1 commit into from
Oct 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions frontend/src/views/ProgressOverview.js
Original file line number Diff line number Diff line change
Expand Up @@ -314,8 +314,14 @@ class ProgressOverview extends Component {
</HeaderAreaLayout>
{this.state.csvExportProgress ? (
<div className={cx({ 'container': true, 'csv-export-content': true})}>
<h2>Exporting your CSV data...</h2>
<p>Please don't close this browser tab.</p>
{(this.state.csvExportProgress < 1) ? [
<h2>Exporting your CSV data...</h2>,
<p>Please don't close this browser tab.</p>
] : [
<h2>Export successful!</h2>,
<p>Depending on your browser settings, you will either be prompted with a prompt to save the generated file, or the file will be automatically downloaded into your default Downloads folder.</p>,
<p>It is now safe to close the exporter.</p>,
]}
<div className={styles['progress-bar']}>
<span className={styles['progress-bar-inner']} style={{ width: this.state.csvExportProgress * 100 + '%'}}></span>
</div>
Expand Down
8 changes: 8 additions & 0 deletions frontend/src/views/_progress-overview-content.scss
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,13 @@ button.export-the-csv-button {
margin: 0 0 calcRem(20);
}

p {
font-size: calcRem(14);
max-width: calcRem(800);
margin-left: auto;
margin-right: auto;
}

.progress-bar {
width: 100%;
max-width: calcRem(500);
Expand Down Expand Up @@ -264,6 +271,7 @@ button.close-csv-button {
outline: none;
border-radius: 50px;
transition: all 0.3s ease-in-out;
font-size: calcRem(16);

&:hover {
cursor: pointer;
Expand Down