This is an automated email from the ASF dual-hosted git repository.

github-merge-queue[bot] pushed a commit to branch 
gh-readonly-queue/main/pr-8746-0fc6e789aa1298e19f3428101c5fd069c5309fa4
in repository https://gitbox.apache.org/repos/asf/texera.git

commit 57763e763bef80a5a162bc7b594a4747852ca11e
Author: Xinyuan Lin <[email protected]>
AuthorDate: Mon Oct 5 21:30:14 2026 +0000

    refactor(frontend): remove dead DatasetDetailComponent code (#8746)
    
    ### What changes were proposed in this PR?
    
    Removes dead code from `DatasetDetailComponent` that its template
    stopped using during the dataset page's redesigns. **+2/−46 lines.**
    There is no behaviour change.
    
    - **Members:** `versionCreatorBaseVersion`, `displayPreciseViewCount` +
    `changeViewDisplayStyle()`, and the `formatTime` / `formatSpeed`
    aliases. The `format.util` import narrows to `formatCount`.
    - **Styles:** `.tag-settings-btn`, `.tag-settings-title`,
    `.tag-settings-row` (with its `span` and `::ng-deep .ant-switch` rules),
    and `.description-section`.
    - **Spec:** the "view flags" case keeps its maximize / right-bar
    assertions and drops the three for the removed toggle. It is renamed to
    match.
    
    ### History
    
    | | |
    | --- | --- |
    | **Introduced by** | #2413 (2024-02-26), "Introduce Dataset GUI":
    `versionCreatorBaseVersion`. #3269 (2025-02-19): the precise-view-count
    toggle. #3662 (2025-08-19): the speed/time aliases. #4337 (2026-03-29),
    "improve dataset detail page layout": the `.tag-settings-*` and
    `.description-section` styles |
    | **Usage removed by** | #3296 (2025-03-10):
    `versionCreatorBaseVersion`. #4337 (2026-03-29): the view-count toggle.
    #6493 (2026-07-27): tag settings moved to a Settings tab. #7043
    (2026-07-30): the description moved to the Data Card tab. #8078
    (2026-08-31): the speed/time aliases |
    
    Each piece was left behind by a redesign that moved its markup
    elsewhere. The oldest has been dead for eighteen months.
    
    ### Any related issues, documentation, discussions?
    
    Closes #8745
    
    ### How was this PR tested?
    
    No new tests. The kept spec cases cover the remaining members.
    
    From `frontend/`:
    
    - `npx ng test --watch=false
    --include='**/dataset-detail.component.spec.ts'`: 150 tests, all pass.
    - `yarn format:ci`: clean.
    - `npx ng build`: success.
    
    To re-check:
    
    ```
    git grep -n -E "versionCreatorBaseVersion|tag-settings|description-section" 
-- frontend   # no hits
    ```
    
    ### Was this PR authored or co-authored using generative AI tooling?
    
    Generated-by: Claude Code (Claude Opus 5.5)
    
    🤖 Generated with [Claude Code](https://claude.com/claude-code)
---
 .../dataset-detail.component.scss                  | 32 ----------------------
 .../dataset-detail.component.spec.ts               |  6 +---
 .../dataset-detail.component.ts                    | 10 +------
 3 files changed, 2 insertions(+), 46 deletions(-)

diff --git 
a/frontend/src/app/dashboard/component/user/user-dataset/user-dataset-explorer/dataset-detail.component.scss
 
b/frontend/src/app/dashboard/component/user/user-dataset/user-dataset-explorer/dataset-detail.component.scss
index 0bd67b6067..093ee1801e 100644
--- 
a/frontend/src/app/dashboard/component/user/user-dataset/user-dataset-explorer/dataset-detail.component.scss
+++ 
b/frontend/src/app/dashboard/component/user/user-dataset/user-dataset-explorer/dataset-detail.component.scss
@@ -180,38 +180,6 @@ nz-select {
   opacity: 0.55;
 }
 
-.tag-settings-btn {
-  width: 32px;
-  height: 32px;
-  border-radius: 50%;
-  border: 1px solid #d9d9d9;
-}
-
-.tag-settings-title {
-  font-weight: 600;
-}
-
-.tag-settings-row {
-  display: flex;
-  align-items: center;
-  gap: 10px;
-  padding: 5px 0;
-}
-
-.tag-settings-row span {
-  min-width: 110px;
-}
-
-.tag-settings-row ::ng-deep .ant-switch {
-  min-width: 80px;
-}
-
-.description-section {
-  margin-top: 20px;
-  padding-top: 10px;
-  border-top: 1px solid #eee;
-}
-
 .file-title {
   display: flex;
   align-items: center;
diff --git 
a/frontend/src/app/dashboard/component/user/user-dataset/user-dataset-explorer/dataset-detail.component.spec.ts
 
b/frontend/src/app/dashboard/component/user/user-dataset/user-dataset-explorer/dataset-detail.component.spec.ts
index 023ed327d4..0aa5c93707 100644
--- 
a/frontend/src/app/dashboard/component/user/user-dataset/user-dataset-explorer/dataset-detail.component.spec.ts
+++ 
b/frontend/src/app/dashboard/component/user/user-dataset/user-dataset-explorer/dataset-detail.component.spec.ts
@@ -1110,7 +1110,7 @@ describe("DatasetDetailComponent behavior", () => {
   describe("view flags", () => {
     beforeEach(() => createComponent());
 
-    it("toggles the maximize, right-bar and precise-view-count flags", () => {
+    it("toggles the maximize and right-bar flags", () => {
       expect(component.isMaximized).toBe(false);
       component.onClickScaleTheView();
       expect(component.isMaximized).toBe(true);
@@ -1118,10 +1118,6 @@ describe("DatasetDetailComponent behavior", () => {
       expect(component.isRightBarCollapsed).toBe(false);
       component.onClickHideRightBar();
       expect(component.isRightBarCollapsed).toBe(true);
-
-      expect(component.displayPreciseViewCount).toBe(false);
-      component.changeViewDisplayStyle();
-      expect(component.displayPreciseViewCount).toBe(true);
     });
   });
 
diff --git 
a/frontend/src/app/dashboard/component/user/user-dataset/user-dataset-explorer/dataset-detail.component.ts
 
b/frontend/src/app/dashboard/component/user/user-dataset/user-dataset-explorer/dataset-detail.component.ts
index 9d38dab9ad..bb9521aa67 100644
--- 
a/frontend/src/app/dashboard/component/user/user-dataset/user-dataset-explorer/dataset-detail.component.ts
+++ 
b/frontend/src/app/dashboard/component/user/user-dataset/user-dataset-explorer/dataset-detail.component.ts
@@ -40,7 +40,7 @@ import { ActionType, EntityType, HubService, LikedStatus } 
from "../../../../../
 import { NzModalService } from "ng-zorro-antd/modal";
 import { HttpErrorResponse } from "@angular/common/http";
 import { EMPTY, Observable, Subscription } from "rxjs";
-import { formatCount, formatSpeed, formatTime } from 
"src/app/common/util/format.util";
+import { formatCount } from "src/app/common/util/format.util";
 import { replaceOneImmutable } from "src/app/common/util/array-utils";
 import { format } from "date-fns";
 import { NgIf, NgClass, NgFor } from "@angular/common";
@@ -153,14 +153,12 @@ export class DatasetDetailComponent implements OnInit {
   // Holds the in-flight latest-version fetch so a later call can supersede it.
   private latestVersionFileSubscription: Subscription | undefined;
 
-  public versionCreatorBaseVersion: DatasetVersion | undefined;
   public isLogin: boolean = this.userService.isLogin();
 
   public isLiked: boolean = false;
   public likeCount: number = 0;
   public currentUid: number | undefined;
   public viewCount: number = 0;
-  public displayPreciseViewCount = false;
 
   readonly datasetEndpoint = DATASET_FILE_RESOURCE_ENDPOINT;
 
@@ -498,8 +496,6 @@ export class DatasetDetailComponent implements OnInit {
   formatSize = formatSize;
 
   formatCount = formatCount;
-  formatTime = formatTime;
-  formatSpeed = formatSpeed;
 
   toggleLike(): void {
     const userId = this.currentUid;
@@ -540,10 +536,6 @@ export class DatasetDetailComponent implements OnInit {
     }
   }
 
-  changeViewDisplayStyle() {
-    this.displayPreciseViewCount = !this.displayPreciseViewCount;
-  }
-
   onSetCoverImage(filePath: string): void {
     if (!this.did || !this.selectedVersion) {
       return;

Reply via email to