aicam commented on code in PR #5947:
URL: https://github.com/apache/texera/pull/5947#discussion_r3482728498
##########
frontend/src/app/dashboard/component/user/list-item/card-item/card-item.component.ts:
##########
@@ -136,10 +138,11 @@ export class CardItemComponent implements OnChanges {
/** The top image src for the card preview. */
get previewImage(): string {
Review Comment:
What is the point of this function? its returning a variable
##########
frontend/src/app/dashboard/component/user/list-item/card-item/card-item.component.ts:
##########
@@ -136,10 +138,11 @@ export class CardItemComponent implements OnChanges {
/** The top image src for the card preview. */
get previewImage(): string {
- return CardItemComponent.DEFAULT_PREVIEW_IMAGE;
+ return this.coverImageSrc;
}
initializeEntry() {
+ this.coverImageSrc = CardItemComponent.DEFAULT_PREVIEW_IMAGE;
Review Comment:
coverImageSrc is assigned on top, also here, is it needed?
##########
frontend/src/app/dashboard/component/user/user-dataset/user-dataset.component.ts:
##########
@@ -61,14 +62,18 @@ import { FormsModule } from "@angular/forms";
NzSelectComponent,
FormsModule,
SearchResultsComponent,
+ CardItemComponent,
],
})
export class UserDatasetComponent implements AfterViewInit {
+ private static readonly VIEW_MODE_STORAGE_KEY =
"texera.userDataset.viewMode";
public sortMethod = SortMethod.EditTimeDesc;
lastSortMethod: SortMethod | null = null;
public isLogin = this.userService.isLogin();
public currentUid = this.userService.getCurrentUser()?.uid;
public hasMismatch = false; // Display warning when there are mismatched
datasets
+ public viewType: "list" | "card" =
+ localStorage.getItem(UserDatasetComponent.VIEW_MODE_STORAGE_KEY) ===
"card" ? "card" : "list";
Review Comment:
default should be card
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]