-
Notifications
You must be signed in to change notification settings - Fork 263
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* remove useless locale * remove useless id values, update tests * code cleanup * fix formatting * css cleanup * code cleanup * style cleanup * fix css scope * cleanup styles * remove sanitise and don't bind to innerHTML * reduce ng-container * move model specific logic to Comment Model * update tests, remove sanitise tests * drop carma coverage to 72 as code removed * drop selection animation as selection operations are not supported by the component itself * cleanup css * fix tests and lint * update stories and tests * fix line breaks * move e2e to unit test * disable search tests * disable search tests * disable search tests
- Loading branch information
1 parent
3125628
commit 3f3e830
Showing
21 changed files
with
235 additions
and
399 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 9 additions & 22 deletions
31
lib/core/src/lib/comments/comment-list/comment-list.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,17 @@ | ||
<mat-list class="adf-comment-list"> | ||
<mat-list-item *ngFor="let comment of comments" | ||
(click)="selectComment(comment)" | ||
class="adf-comment-list-item" | ||
[class.adf-is-selected]="comment.isSelected" | ||
id="adf-comment-{{comment?.id}}"> | ||
<div [attr.id]="'comment-user-icon-' + comment.id" class="adf-comment-img-container"> | ||
<div | ||
*ngIf="!isPictureDefined(comment.createdBy)" | ||
class="adf-comment-user-icon"> | ||
{{getUserShortName(comment.createdBy)}} | ||
</div> | ||
<div> | ||
<img [alt]="comment.createdBy" *ngIf="isPictureDefined(comment.createdBy)" | ||
class="adf-people-img" | ||
[src]="getUserImage(comment.createdBy)" /> | ||
</div> | ||
class="adf-comment-list-item"> | ||
<div class="adf-comment-img-container"> | ||
<div *ngIf="!comment.hasAvatarPicture" class="adf-comment-user-icon">{{ comment.userInitials }}</div> | ||
<img *ngIf="comment.hasAvatarPicture" class="adf-people-img" | ||
[alt]="'COMMENTS.PROFILE_IMAGE' | translate" | ||
[src]="getUserImage(comment.createdBy)" /> | ||
</div> | ||
<div class="adf-comment-contents"> | ||
<div matLine [attr.id]="'comment-user-' + comment.id" class="adf-comment-user-name"> | ||
{{comment.createdBy?.firstName}} {{comment.createdBy?.lastName}} | ||
</div> | ||
<div matLine [attr.id]="'comment-message-' + comment.id" class="adf-comment-message" [innerHTML]="comment.message"> | ||
</div> | ||
<div matLine [attr.id]="'comment-time-' + comment.id" class="adf-comment-message-time"> | ||
{{ comment.created | adfTimeAgo: currentLocale }} | ||
</div> | ||
<div matLine class="adf-comment-user-name">{{ comment.userDisplayName }}</div> | ||
<div matLine class="adf-comment-message">{{ comment.message }}</div> | ||
<div matLine class="adf-comment-message-time">{{ comment.created | adfTimeAgo }}</div> | ||
</div> | ||
</mat-list-item> | ||
</mat-list> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.