aicam commented on code in PR #4117:
URL: https://github.com/apache/texera/pull/4117#discussion_r2658243286
##########
frontend/src/app/dashboard/component/user/user-dataset/user-dataset-explorer/user-dataset-version-filetree/user-dataset-version-filetree.component.scss:
##########
@@ -22,7 +22,7 @@
}
/* Styles for the delete button */
-.delete-button {
+.icon-button {
Review Comment:
Why we need to change this?
##########
sql/updates/16.sql:
##########
@@ -0,0 +1,34 @@
+-- Licensed to the Apache Software Foundation (ASF) under one
Review Comment:
New PRs have added this number, please update it based on the latest number
not taken before merge
##########
frontend/src/app/dashboard/component/user/user-dataset/user-dataset-explorer/user-dataset-version-filetree/user-dataset-version-filetree.component.ts:
##########
@@ -74,4 +80,14 @@ export class UserDatasetVersionFiletreeComponent implements
AfterViewInit {
this.tree.treeModel.expandAll();
}
}
+
+ isImageFile(fileName: string): boolean {
+ const imageExts = [".jpg", ".jpeg", ".png", ".gif", ".webp"];
Review Comment:
Add constant on top of file
##########
frontend/src/app/dashboard/component/user/user-dataset/user-dataset-explorer/user-dataset-version-filetree/user-dataset-version-filetree.component.ts:
##########
@@ -74,4 +80,14 @@ export class UserDatasetVersionFiletreeComponent implements
AfterViewInit {
this.tree.treeModel.expandAll();
}
}
+
+ isImageFile(fileName: string): boolean {
+ const imageExts = [".jpg", ".jpeg", ".png", ".gif", ".webp"];
+ return imageExts.some(ext => fileName.toLowerCase().endsWith(ext));
+ }
+
+ onSetCover(nodeData: DatasetFileNode): void {
+ const path = getRelativePathFromDatasetFileNode(nodeData);
Review Comment:
This can be written in one line
--
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]