Skip to content

Commit

Permalink
Merge pull request #265 from appsembler/matej-work/csv-export-ui-feed…
Browse files Browse the repository at this point in the history
…back

Add success feedback to csv export dialog. John force merged because codecov is stuck
  • Loading branch information
johnbaldwin authored Oct 8, 2020
2 parents 27c20fb + b7dc0c9 commit 629ec87
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
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

0 comments on commit 629ec87

Please sign in to comment.