Skip to content

Commit

Permalink
Merge pull request #2090 from intersective/prerelease
Browse files Browse the repository at this point in the history
Release 2.3.1
  • Loading branch information
shawnm0705 authored Feb 26, 2024
2 parents a5b94c0 + 4d7e17e commit 3e772bb
Show file tree
Hide file tree
Showing 17 changed files with 174 additions and 21 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"ng": "ng",
"start": "ng serve",
"v3": "ng serve --project=v3 -c development",
"prev3": "npm run prebuildv3",
"poststart": "npm run generate-version",
"local": "ng serve -c local",
"postlocal": "npm run generate-version",
Expand Down
9 changes: 4 additions & 5 deletions projects/v3/src/app/components/file/file.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<ion-icon class="ion-padding-horizontal" name="eye" size="small"></ion-icon>
<ion-label i18n>Feedback</ion-label>
</ion-item>
<ion-textarea class="ion-no-margin textarea white-space-pre"
<ion-textarea class="ion-no-margin preview textarea white-space-pre"
[autoGrow]="true"
[value]="review.comment"
[disabled]="true"
Expand Down Expand Up @@ -60,7 +60,7 @@
</div>
</ng-container>

<ng-container *ngIf="doReview && question.canAnswer">
<ng-container *ngIf="doReview">
<ng-container *ngIf="question.canAnswer">
<app-file-stack *ngIf="!uploadedFile && !review.answer"
[accept]="fileTypes"
Expand All @@ -79,16 +79,15 @@
></app-file-display>
</ng-container>

<div class="feedback-field ion-padding-horizontal ion-padding-bottom" *ngIf="question.canComment && submission.answer">
<div class="feedback-field ion-padding-horizontal ion-padding-bottom" *ngIf="question?.canComment && submission?.answer">
<ion-item class="feedback-title ion-no-padding" lines="none">
<ion-icon class="ion-padding-horizontal" name="eye" size="small"></ion-icon>
<ion-label i18n>Feedback</ion-label>
</ion-item>
<ion-textarea class="ion-no-margin textarea"
[autoGrow]="true"
[attr.aria-label]="'expert\'s review feedback'"
#commentEle
[(ngModel)]="comment"
#commentEle [(ngModel)]="comment"
(ngModelChange)="onChange(comment, 'comment')"
placeholder="Please put your feedback here"
[disabled]="control.disabled"></ion-textarea>
Expand Down
4 changes: 4 additions & 0 deletions projects/v3/src/app/components/file/file.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,7 @@ ion-item {
}
}
}

ion-textarea.preview {
padding-left: var(--padding-start);
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,17 @@ <h3 class="for-accessibility" [id]="'multi-team-member-selector-question-' + que
</ion-item>
</ng-container>
</ion-list>

<ng-container *ngIf="review?.comment">
<p class="paragraph body-2 gray-3 white-space-pre">{{ review.comment }}</p>
<ion-item class="feedback-title ion-no-padding" lines="none">
<ion-icon class="ion-padding-horizontal" name="eye" size="small"></ion-icon>
<ion-label i18n>Feedback</ion-label>
</ion-item>
<ion-textarea class="ion-no-margin preview textarea white-space-pre"
[autoGrow]="true"
[value]="review.comment"
[disabled]="true"
></ion-textarea>
</ng-container>
</ng-container>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ ion-textarea {
border: 1px solid var(--practera-grey-50);
border-radius: var(--border-radius);
font-size: 14px !important;
&.preview {
border: none;
padding-left: var(--padding-start);
}
}

ion-item {
Expand Down
11 changes: 10 additions & 1 deletion projects/v3/src/app/components/multiple/multiple.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,17 @@ <h3 class="for-accessibility" [id]="'multiple-choice-question-' + question.id">{
</ng-container>
</ng-container>
</ion-list>

<ng-container *ngIf="review?.comment">
<p class="paragraph body-2 gray-3 white-space-pre">{{ review.comment }}</p>
<ion-item class="feedback-title ion-no-padding" lines="none">
<ion-icon class="ion-padding-horizontal" name="eye" size="small"></ion-icon>
<ion-label i18n>Feedback</ion-label>
</ion-item>
<ion-textarea class="ion-no-margin preview textarea white-space-pre"
[autoGrow]="true"
[value]="review.comment"
[disabled]="true"
></ion-textarea>
</ng-container>
</ng-container>

Expand Down
31 changes: 31 additions & 0 deletions projects/v3/src/app/components/multiple/multiple.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ ion-textarea {
border: 1px solid var(--practera-grey-50);
border-radius: var(--border-radius);
font-size: 14px !important;

&.preview {
border: none;
padding-left: var(--padding-start);
}
}

.answer-text {
Expand Down Expand Up @@ -58,3 +63,29 @@ ion-item {
--background: var(--practera-light-grey-50);
}
}

.feedback-field {
--ion-item-background: #FFF7E3;
--ion-background-color: #FFF7E3;
background-color: #FFF7E3;

.feedback-title {
--min-height: 1em;
font-size: smaller;

ion-icon,
ion-label {
background-color: #FFF7E3;
}
}

ion-textarea {
background: white;
font-size: 14px !important;

&.textarea {
border: 1px solid var(--practera-review-border-color);
border-radius: 8px;
}
}
}
13 changes: 11 additions & 2 deletions projects/v3/src/app/components/oneof/oneof.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,17 @@ <h3 class="for-accessibility" [id]="'oneof-question-' + question.id">{{question.
</ng-container>
</ion-radio-group>
</ion-list>
<ng-container *ngIf="review.comment">
<p class="paragraph body-2 gray-3 white-space-pre">{{ review.comment }}</p>

<ng-container *ngIf="review?.comment">
<ion-item class="feedback-title ion-no-padding" lines="none">
<ion-icon class="ion-padding-horizontal" name="eye" size="small"></ion-icon>
<ion-label i18n>Feedback</ion-label>
</ion-item>
<ion-textarea class="ion-no-margin preview textarea white-space-pre"
[autoGrow]="true"
[value]="review.comment"
[disabled]="true"
></ion-textarea>
</ng-container>
</ng-container>

Expand Down
31 changes: 31 additions & 0 deletions projects/v3/src/app/components/oneof/oneof.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ ion-textarea {
border: 1px solid var(--practera-grey-50);
border-radius: var(--border-radius);
font-size: 14px !important;

&.preview {
border: none;
padding-left: var(--padding-start);
}
}


Expand Down Expand Up @@ -61,3 +66,29 @@ ion-item {
--background: var(--practera-light-grey-50);
}
}

.feedback-field {
--ion-item-background: #FFF7E3;
--ion-background-color: #FFF7E3;
background-color: #FFF7E3;

.feedback-title {
--min-height: 1em;
font-size: smaller;

ion-icon,
ion-label {
background-color: #FFF7E3;
}
}

ion-textarea {
background: white;
font-size: 14px !important;

&.textarea {
border: 1px solid var(--practera-review-border-color);
border-radius: 8px;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,17 @@ <h3 class="for-accessibility" [id]="'team-member-selector-question-' + question.
</ng-container>
</ion-radio-group>
</ion-list>

<ng-container *ngIf="review?.comment">
<p class="paragraph body-2 gray-3 white-space-pre">{{ review.comment }}</p>
<ion-item class="feedback-title ion-no-padding" lines="none">
<ion-icon class="ion-padding-horizontal" name="eye" size="small"></ion-icon>
<ion-label i18n>Feedback</ion-label>
</ion-item>
<ion-textarea class="ion-no-margin preview textarea white-space-pre"
[autoGrow]="true"
[value]="review.comment"
[disabled]="true"
></ion-textarea>
</ng-container>
</ng-container>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ ion-textarea {
border: 1px solid var(--practera-grey-50);
border-radius: var(--border-radius);
font-size: 14px !important;
&.preview {
border: none;
padding-left: var(--padding-start);
}
}

ion-item {
Expand Down
22 changes: 15 additions & 7 deletions projects/v3/src/app/components/text/text.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,22 @@ <h3 class="for-accessibility" [id]="'text-question-' + question.id">{{question.n
<p class="body-2 gray-3 white-space-pre">{{ submission?.answer }}</p>
</div>

<div class="ion-padding" *ngIf="(review?.answer || review?.comment)">
<div class="ion-padding" *ngIf="review?.answer">
<ion-chip class="label yellow black" i18n>Expert's answer</ion-chip>
<ng-container *ngIf="review?.answer">
<p class="body-2 gray-3 white-space-pre">{{ review.answer }}</p>
</ng-container>
<ng-container *ngIf="review?.comment">
<p class="body-2 gray-3 white-space-pre">{{ review.comment }}</p>
</ng-container>
<p class="body-2 gray-3 white-space-pre">{{ review.answer }}</p>
</div>

<ng-container *ngIf="review?.comment">
<ion-item class="feedback-title ion-no-padding" lines="none">
<ion-icon class="ion-padding-horizontal" name="eye" size="small"></ion-icon>
<ion-label i18n>Feedback</ion-label>
</ion-item>
<ion-textarea class="ion-no-margin preview textarea white-space-pre"
[autoGrow]="true"
[value]="review.comment"
[disabled]="true"
></ion-textarea>
</ng-container>
</ng-container>

<ng-container *ngIf="doAssessment">
Expand Down Expand Up @@ -73,6 +80,7 @@ <h3 class="for-accessibility" aria-labelledby="learner-indicator" aria-described
<ion-list-header class="ion-no-padding" lines="none">
<ion-label class="subtitle-2 black" i18n>Feedback</ion-label>
</ion-list-header>

<ion-textarea
[autoGrow]="true"
[attr.aria-label]="'expert\'s review feedback'"
Expand Down
31 changes: 31 additions & 0 deletions projects/v3/src/app/components/text/text.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ ion-textarea {
border: 1px solid var(--practera-grey-50);
border-radius: var(--border-radius);
font-size: 14px !important;

&.preview {
border: none;
padding-left: var(--padding-start);
}
}

ion-item {
Expand All @@ -26,6 +31,32 @@ ion-item {
font-style: italic;
}

.feedback-field {
--ion-item-background: #FFF7E3;
--ion-background-color: #FFF7E3;
background-color: #FFF7E3;

.feedback-title {
--min-height: 1em;
font-size: smaller;

ion-icon,
ion-label {
background-color: #FFF7E3;
}
}

ion-textarea {
background: white;
font-size: 14px !important;

&.textarea {
border: 1px solid var(--practera-review-border-color);
border-radius: 8px;
}
}
}

// .audience-mentor {
// border: 2px solid var(--practera-review-border-color);
// border-bottom-left-radius : 12px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ export class BackgroundImageDirective implements OnInit, OnDestroy {
};

this.img.onerror = () => {
const activityCardImage = this.storageService.getUser().activityCardImage;
const programImage = this.storageService.getUser().programImage;
this.renderer.setStyle(this.el.nativeElement, 'backgroundImage', `url(${programImage})`);
this.renderer.setStyle(this.el.nativeElement, 'backgroundImage', `url(${activityCardImage || programImage})`);
};
}

Expand Down
5 changes: 4 additions & 1 deletion projects/v3/src/app/services/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,10 @@ interface AuthEndpoint {
data: {
auth: {
apikey: string;
experience: object;
experience: {
cardUrl?: string;
[key: string]: any; // default card activity image
};
email?: string;
unregistered?: boolean;
activationCode?: string;
Expand Down
2 changes: 1 addition & 1 deletion projects/v3/src/app/services/experience.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ export class ExperienceService {
institutionName: exp?.name || null,
projectId: exp?.projectId,
timelineId: exp?.timelineId,
activityCardImage: cardBackgroundImage,
activityCardImage: cardBackgroundImage, // default activity image
activityCompleteMessage: exp?.activityCompleteMessage || null,
chatEnabled: exp?.chatEnable || true,
teamId: null,
Expand Down
2 changes: 1 addition & 1 deletion projects/v3/src/app/services/storage.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export interface User {
teamName?: string;
userHash?: string;
colors?: Colors;
activityCardImage?: string;
activityCardImage?: string; // default activity card image
hasReviewRating?: boolean;
truncateDescription?: boolean;
enrolment?: any;
Expand Down

0 comments on commit 3e772bb

Please sign in to comment.