Skip to content

Commit 4a54bbb

Browse files
Merge pull request #587 from DigitalExcellence/Release/v1.7.0
Release/v1.7.0
2 parents 1e73bf0 + d5fe769 commit 4a54bbb

File tree

47 files changed

+1260
-950
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1260
-950
lines changed

CHANGELOG.md

+22
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,28 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres
66
to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## Release v.1.7.0-beta - 8-10-2021
9+
10+
### Added
11+
- Added pagination to own projects page. [#526](https://github.com/DigitalExcellence/dex-frontend/issues/526)
12+
- Back button to add project wizard - [#563](https://github.com/DigitalExcellence/dex-frontend/issues/563)
13+
- Fixed the wizard long description text area to wrap words. - [#562](https://github.com/DigitalExcellence/dex-frontend/issues/562)
14+
15+
### Changed
16+
- Projects overview not sorting on Likes High > Low [#557](https://github.com/DigitalExcellence/dex-frontend/issues/557)
17+
- Changed project-edit page. Was a separate page, is now a part of te detail-modal [#536](https://github.com/DigitalExcellence/dex-frontend/issues/536)
18+
19+
### Deprecated
20+
21+
### Removed
22+
23+
### Fixed
24+
- Highlight project modal, not dissapearing when clicking out of it.[#569](https://github.com/DigitalExcellence/dex-frontend/issues/569)
25+
- Project filter is not cleared anymore after editing project. [#561](https://github.com/DigitalExcellence/dex-frontend/issues/561)
26+
- Added option to remove a previously uploaded icon to edit page and wizard[#482](https://github.com/DigitalExcellence/dex-frontend/issues/482)
27+
28+
### Security
29+
830
## Release v.1.6.0-beta - 15-9-2021
931

1032
### Added

angular.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@
9090
},
9191
{
9292
"type": "anyComponentStyle",
93-
"maximumWarning": "6kb",
94-
"maximumError": "10kb"
93+
"maximumWarning": "8kb",
94+
"maximumError": "15kb"
9595
}
9696
]
9797
},
@@ -193,4 +193,4 @@
193193
"cli": {
194194
"analytics": false
195195
}
196-
}
196+
}

package-lock.json

+13-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/app/modules/project/add/main/wizard/wizard.component.html

+7-7
Original file line numberDiff line numberDiff line change
@@ -24,25 +24,25 @@
2424
<ng-container [ngSwitch]="(currentStep | async)?.wizardPageName">
2525
<!-- From this point the steps are always displayed -->
2626
<ng-container *ngSwitchCase="'project-categories'">
27-
<app-project-categories (clickNext)="onNextStep()" [step]="(currentStep | async)"></app-project-categories>
27+
<app-project-categories (clickNext)="onNextStep()" (clickPrevious)="onPreviousStep()" [step]="(currentStep | async)"></app-project-categories>
2828
</ng-container>
2929
<ng-container *ngSwitchCase="'project-name'">
30-
<app-project-name (clickNext)="onNextStep()" [step]="(currentStep | async)"></app-project-name>
30+
<app-project-name (clickNext)="onNextStep()" (clickPrevious)="onPreviousStep()" [step]="(currentStep | async)"></app-project-name>
3131
</ng-container>
3232
<ng-container *ngSwitchCase="'project-description'">
33-
<app-project-description (clickNext)="onNextStep()" [step]="(currentStep | async)"></app-project-description>
33+
<app-project-description (clickNext)="onNextStep()" (clickPrevious)="onPreviousStep()" [step]="(currentStep | async)"></app-project-description>
3434
</ng-container>
3535
<ng-container *ngSwitchCase="'project-images'">
36-
<app-project-images (clickNext)="onNextStep()" [step]="(currentStep | async)"></app-project-images>
36+
<app-project-images (clickNext)="onNextStep()" (clickPrevious)="onPreviousStep()" [step]="(currentStep | async)"></app-project-images>
3737
</ng-container>
3838
<ng-container *ngSwitchCase="'project-icon'">
39-
<app-project-icon (clickNext)="onNextStep()" [isOptional]="true" [step]="(currentStep | async)"></app-project-icon>
39+
<app-project-icon (clickNext)="onNextStep()" (clickPrevious)="onPreviousStep()" [isOptional]="true" [step]="(currentStep | async)"></app-project-icon>
4040
</ng-container>
4141
<ng-container *ngSwitchCase="'project-collaborators'">
42-
<app-project-collaborators (clickNext)="onNextStep()" [isOptional]="true" [step]="(currentStep | async)"></app-project-collaborators>
42+
<app-project-collaborators (clickNext)="onNextStep()" (clickPrevious)="onPreviousStep()" [isOptional]="true" [step]="(currentStep | async)"></app-project-collaborators>
4343
</ng-container>
4444
<ng-container *ngSwitchCase="'project-call-to-action'">
45-
<app-project-call-to-action (clickNext)="onNextStep()" [isOptional]="true" [step]="(currentStep | async)"></app-project-call-to-action>
45+
<app-project-call-to-action (clickNext)="onNextStep()" (clickPrevious)="onPreviousStep()" [isOptional]="true" [step]="(currentStep | async)"></app-project-call-to-action>
4646
</ng-container>
4747
<ng-container *ngSwitchCase="'project-link'">
4848
<app-project-link (clickNext)="onNextStep()" [formSubmitted]="formSubmitted" [step]="(currentStep | async)"></app-project-link>

src/app/modules/project/add/main/wizard/wizard.component.ts

+9
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,15 @@ export class WizardComponent implements OnInit {
9494
}
9595
}
9696

97+
/**
98+
* Method which triggers when the button to the previous page is pressed
99+
*/
100+
public onPreviousStep() {
101+
if (!this.wizardService.isFirstStep()) {
102+
this.wizardService.moveToPreviousStep();
103+
}
104+
}
105+
97106
/**
98107
* Method that will take the built project in the wizard and send it to the backend
99108
* @param newProject - the built project

src/app/modules/project/add/main/wizard/wizardPages/default/project-call-to-action/project-call-to-action.component.html

+1
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,6 @@ <h2 class="step-header">Want to add a call to action?</h2>
2020
<p>Get people in action!</p>
2121
<app-call-to-actions-edit [projectCallToActions]="project.callToActions"></app-call-to-actions-edit>
2222
<div class="bottom-button-wrapper">
23+
<button (click)="onClickPrevious()" class="form-previous-btn">Previous</button>
2324
<button (click)="onClickNext()" class="form-continue-btn">Next</button>
2425
</div>

src/app/modules/project/add/main/wizard/wizardPages/default/project-call-to-action/project-call-to-action.component.scss

+6-1
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,10 @@
1818

1919
.bottom-button-wrapper {
2020
display: flex;
21-
justify-content: flex-end;
21+
justify-content: center;
22+
23+
button {
24+
margin-left: 5px;
25+
margin-right: 5px;
26+
}
2227
}

src/app/modules/project/add/main/wizard/wizardPages/default/project-categories/project-categories.component.html

+7-1
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,10 @@ <h3>Categories</h3>
4949
<!-- #{{tag}}-->
5050
<!-- </span>-->
5151
<!-- </div>-->
52-
<button (click)="onClickNext()" class="form-continue-btn">{{isOptional ? "Skip" : "Next"}}</button>
52+
<div class="buttons">
53+
<div class="inline-input">
54+
<button (click)="onClickPrevious()" class="form-previous-btn">Previous</button>
55+
<button (click)="onClickNext()" class="form-continue-btn">{{isOptional ? "Skip" : "Next"}}</button>
56+
</div>
57+
</div>
58+

src/app/modules/project/add/main/wizard/wizardPages/default/project-categories/project-categories.component.scss

+7
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@
3838
}
3939
}
4040

41+
.buttons {
42+
display: flex;
43+
flex-direction: column;
44+
justify-content: center;
45+
align-items: center;
46+
}
47+
4148
#tag {
4249
box-shadow: $box-shadow;
4350
}

src/app/modules/project/add/main/wizard/wizardPages/default/project-collaborators/project-collaborators.component.html

+4-1
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ <h2 class="step-header">{{step.name}}</h2>
6666
</div>
6767
<div class="image-col">
6868
<img alt="" src="/assets/images/wizard/collaborators.svg" />
69-
<button (click)="onClickNext()" class="form-continue-btn">{{isOptional && !(collaboratorList.length > 0) ? "Skip" : "Next"}}</button>
69+
<div class="inline-input">
70+
<button (click)="onClickPrevious()" class="form-previous-btn">Previous</button>
71+
<button (click)="onClickNext()" class="form-continue-btn">{{isOptional && !(collaboratorList.length > 0) ? "Skip" : "Next"}}</button>
72+
</div>
7073
</div>
7174
</div>

src/app/modules/project/add/main/wizard/wizardPages/default/project-description/project-description.component.html

+4-1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ <h2 class="step-header">{{step.name}}</h2>
3939
</div>
4040
<div class="right">
4141
<img alt="describe svg" src="/assets/images/wizard/describe.svg"/>
42-
<button (click)="onClickNext()" [disabled]="!shortDescription.valid || !longDescription.valid" class="form-continue-btn">Next</button>
42+
<div class="inline-input">
43+
<button (click)="onClickPrevious()" class="form-previous-btn">Previous</button>
44+
<button (click)="onClickNext()" [disabled]="!shortDescription.valid || !longDescription.valid" class="form-continue-btn">Next</button>
45+
</div>
4346
</div>
4447
</div>

src/app/modules/project/add/main/wizard/wizardPages/default/project-description/project-description.component.scss

+1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
.project-long-description {
6666
.ql-container {
6767
width: 100%;
68+
word-break: break-all;
6869
height: 350px;
6970
}
7071
}

src/app/modules/project/add/main/wizard/wizardPages/default/project-icon/project-icon.component.html

+12-3
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,23 @@ <h2 class="step-header">{{step.name}}</h2>
2020
<p class="step-description">{{step.description}}</p>
2121
<div class="wrapper">
2222
<div class="project-icon-picker">
23-
<app-file-uploader [acceptMultiple]="acceptMultiple" [acceptedTypes]="acceptedTypes" [showPreview]="false"></app-file-uploader>
23+
<app-file-uploader #projectIconFileUploader [acceptMultiple]="acceptMultiple" [acceptedTypes]="acceptedTypes" [showPreview]="false"></app-file-uploader>
2424
</div>
25-
<button (click)="mobileUploadButtonClick()" class="form-continue-btn grey">Upload image</button>
25+
<div class='button-wrapper'>
26+
<button (click)="mobileUploadButtonClick()" class="form-continue-btn grey">Upload image</button>
27+
<button (click)="deleteIconClicked()" *ngIf="projectIconFileUploader.files[0]" class="form-continue-btn grey">Remove image</button>
28+
</div>
29+
2630
<div class="right">
2731
<div class="file-preview">
2832
<div [style.background-image]="'url('+getProjectIcon()+')'" class="circle"></div>
33+
<div (click)="deleteIconClicked()" *ngIf="projectIconFileUploader.files[0]" class="overlay"><em
34+
class="fas fa-trash"></em></div>
2935
<img alt="Workers svg" class="workers" src="/assets/images/wizard/icon.svg"/>
3036
</div>
31-
<button (click)="onClickNext()" class="form-continue-btn">{{isOptional && !(fileUploader?.files.length > 0) ? "Skip" : "Next"}}</button>
37+
<div class="inline-input">
38+
<button (click)="onClickPrevious()" class="form-previous-btn">Previous</button>
39+
<button (click)="onClickNext()" class="form-continue-btn">{{isOptional && !(fileUploader?.files.length > 0) ? "Skip" : "Next"}}</button>
40+
</div>
3241
</div>
3342
</div>

src/app/modules/project/add/main/wizard/wizardPages/default/project-icon/project-icon.component.scss

+39-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@
2020
display: grid;
2121
grid-template-columns: 2fr 1fr;
2222
gap: 30px;
23+
24+
.button-wrapper{
25+
display: flex;
26+
justify-content: space-around;
27+
}
2328
button {
2429
&.grey {
2530
display: none;
@@ -78,6 +83,39 @@
7883
}
7984
}
8085

86+
.overlay {
87+
z-index: 2;
88+
height: 100%;
89+
width: 75%;
90+
border-radius: 100%;
91+
position: absolute;
92+
background-color: rgba(0, 0, 0, 0.2);
93+
left: 0;
94+
top: 0;
95+
opacity: 0;
96+
transition: $transition-short;
97+
display: flex;
98+
justify-content: center;
99+
align-items: center;
100+
101+
em {
102+
cursor: pointer;
103+
color: white;
104+
font-size: 48px;
105+
}
106+
}
107+
@media only screen and (max-width: 600px) {
108+
.overlay {
109+
display: none;
110+
}
111+
}
112+
113+
&:hover {
114+
.overlay {
115+
opacity: 1;
116+
}
117+
}
118+
81119
img {
82120
display: inline-block;
83121
z-index: 2;
@@ -93,7 +131,7 @@
93131
}
94132
}
95133
}
96-
134+
97135
button {
98136
margin-top: 30px;
99137
}

src/app/modules/project/add/main/wizard/wizardPages/default/project-icon/project-icon.component.ts

+7
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,13 @@ export class ProjectIconComponent extends WizardStepBaseComponent implements OnI
7575
document.querySelector('input').click();
7676
}
7777

78+
/**
79+
* Method that triggers when the delete-overlay is clicked
80+
*/
81+
public deleteIconClicked() {
82+
this.fileUploader.deleteFile(0);
83+
}
84+
7885
/**
7986
* Method that determines which preview to use for the project icon
8087
*/

src/app/modules/project/add/main/wizard/wizardPages/default/project-images/project-images.component.html

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ <h2 class="step-header">{{ step.name }}</h2>
1111
</div>
1212
</div>
1313
<div class="buttons">
14+
<button (click)="onClickPrevious()" class="form-previous-btn">Previous</button>
1415
<button (click)="mobileUploadButtonClick()" class="form-continue-btn grey">Upload image</button>
1516
<button (click)="onClickNext()" class="form-continue-btn">
1617
{{ isOptional && !(fileUploader?.files.length > 0) ? "Skip" : "Next" }}

src/app/modules/project/add/main/wizard/wizardPages/default/project-name/project-name.component.html

+3
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ <h2 class="step-header">{{step.name}}</h2>
2626
required
2727
type="text"/>
2828
<button (click)="onClickNext()" [disabled]="!projectName.valid" class="form-continue-btn">Next</button>
29+
<div *ngIf="!isFirstStep">
30+
<button (click)="onClickPrevious()" class="form-previous-btn">Previous</button>
31+
</div>
2932
</div>
3033
<div class="image-wrapper">
3134
<img alt="name svg" src="/assets/images/wizard/name.svg"/>

src/app/modules/project/add/main/wizard/wizardPages/default/project-name/project-name.component.ts

+5
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ export class ProjectNameComponent extends WizardStepBaseComponent implements OnI
3131
* Form fields
3232
*/
3333
public projectName = new FormControl('');
34+
/**
35+
* Remembers if project-name is the first step in the current wizard
36+
*/
37+
public isFirstStep: boolean;
3438
/**
3539
* Hold a copy of the project temporarily to prevent the service from listening to every change
3640
*/
@@ -41,6 +45,7 @@ export class ProjectNameComponent extends WizardStepBaseComponent implements OnI
4145
}
4246

4347
public ngOnInit(): void {
48+
this.isFirstStep = this.wizardService.isFirstStep();
4449
this.project = this.wizardService.builtProject;
4550
if (this.project.name) {
4651
this.projectName.setValue(this.project.name);

0 commit comments

Comments
 (0)