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-9644-7a2d9666b15dd85f340a49a08898ad85f5cbcb1c in repository https://gitbox.apache.org/repos/asf/texera.git
commit 085d85a37c60f8046dc8537a4f8e753bd8574e05 Author: Xinyuan Lin <[email protected]> AuthorDate: Wed Nov 25 07:15:52 2026 +0000 refactor(frontend): remove unused styles, import, and params (#9644) ### What changes were proposed in this PR? Remove unused and inert SCSS rules, an empty component stylesheet, unread callback and lifecycle parameters, and a duplicate module import across the Angular frontend (**+13/-134 lines**). There is no observable UI or runtime behavior change. - **Detail-page SCSS selectors:** Remove unmatched `.file-title`, `.file-size`, `.versions-tab-content`, `nz-layout`, `html, body`, `.grayed-out`, `.disabled-click`, and `.ant-collapse-content-box` rules from `DatasetDetailComponent` SCSS, and unmatched `.versions-tab-content` and `nz-layout` rules from `ModelDetailComponent` SCSS. Both components use Angular's default `ViewEncapsulation.Emulated`, `#8942` moved the version browser markup and styles to `VersionsFilesBrowserComponent`, and zero matching elements remain in either component template. - **Unused and inert cross-component SCSS rules:** Remove unmatched `#googleButton`, `.hidden` (dashboard and hub templates use HTML `hidden` / `[hidden]` / `aria-hidden` attributes rather than a CSS class), unused Sass variable `$dashboard-navigation-height`, `.uploaded-files-list`, empty `.file-uploader-banner {}`, `.dataset-menu-bar`, `.condition-input-popup.fade-out`, and `.ai-fix-field` (zero template or TypeScript references in `frontend/src`), along with the `opacity: 1` and `transition: opacity 1s ease-in-out` declarations on `.condition-input-popup` that only existed to animate `.fade-out`. Remove emulated `.ant-table-thead > tr > th` and `.ant-table` rules in `WorkflowExecutionHistoryComponent` SCSS (default `ViewEncapsulation.Emulated` scopes them to host attributes that cannot match `nz-table` internal DOM without `::ng-deep`), remove obsolete `.ant-collapse-content-box` overrides in global `styles.scss` (`ng-zorro-antd` 21 emits `.ant-collapse-body` with zero `.ant-collapse-content-box` occurrences), and delete the empty license-only `hub.component.scss` along with its `styleUrls` entry in `HubComponent`. - **Unread subscriber callback parameters:** Drop six unread `(res: Response)` and `(err: unknown)` parameters in `DatasetDetailComponent` (`onPublicStatusChange`, `onDownloadableStatusChange`, and `onPreviouslyUploadedFileDeleted`) that were never read in their callback bodies. - **Unread lifecycle parameter and import:** Drop the unread `changes: SimpleChanges` parameter and orphaned `SimpleChanges` import in `BrowseSectionComponent.ngOnChanges`, along with two placeholder `{} as any` arguments in `browse-section.component.spec.ts`. - **Duplicate module import:** Merge the duplicate `import` from `ui-udf-parameters-parser.service` in `UiUdfParametersComponent` into the existing import block from the same module. | Event | PR / Commit | | --- | --- | | Introduced by | Detail SCSS: #2413 (2024-02-26), #2927 (2024-10-14), #4928 (2026-05-04), #7043 (2026-07-30), #6953 (2026-08-03), #8072 (2026-08-28); other SCSS and empty `hub.component.scss`: #1634 (2022-10-04), #2413 (2024-02-26), #2435 (2024-03-17), #2502 (2024-03-27), #2571 (2024-04-05), #2737 (2024-07-15), #2776 (2024-08-19), #2878 (2024-09-27), #2953 (2024-10-25), #3415 (2025-05-03), #4484 (2026-05-01), #8637 (2026-10-28); unread parameters and duplicate import: #2515 (2024-03-27), #3296 (2025-03-10), #3363 (2025-04-10), #3663 (2025-08-16), #6897 (2026-09-21, duplicating #7551 from 2026-08-13) | | Usage removed by | Detail version styles: #8942 (2026-10-10, `refactor(frontend): extract shared VersionsFilesBrowser component`); `.ant-collapse-content-box`: #5895 (2026-06-22, `chore: upgrade ng-zorro-antd to 21.3.1`); remaining selectors, empty `hub.component.scss`, unread parameters, and duplicate import: unused or inert since introduction or prior UI refactors | As of 2026-11-23, the `.ai-fix-field` rule has been unused for about 4 weeks, the orphaned detail-page version styles for 6 weeks, the duplicate import for 2 months, the obsolete `.ant-collapse-content-box` rules for 5 months, and the remaining rules and unread parameters for 15 to 49 months. ### Any related issues, documentation, discussions? Closes #9643. ### How was this PR tested? Ran in `frontend/` on `ff6361f2ea` (Node 24, `node .yarn/releases/yarn-4.14.1.cjs install --immutable --inline-builds`): ```bash node .yarn/releases/yarn-4.14.1.cjs format:ci node .yarn/releases/yarn-4.14.1.cjs exec tsc -p src/tsconfig.app.json --noEmit node .yarn/releases/yarn-4.14.1.cjs exec tsc -p src/tsconfig.spec.json --noEmit node .yarn/releases/yarn-4.14.1.cjs build node .yarn/releases/yarn-4.14.1.cjs test ``` - `format:ci` (`prettier-eslint --list-different` and `eslint ./src`): passed. - `tsc --noEmit` (`src/tsconfig.app.json` and `src/tsconfig.spec.json`): passed. - `build` (production Angular AOT build): passed. - `test` (Vitest, JUnit XML): `255` suites passed (`7,385` passed, `0` failed, `0` errors, `1` pre-existing skipped in untouched `operator-property-edit-frame.component.spec.ts`). Review follow-up `aacada02e9` only removes the two inert declarations on `.condition-input-popup`; it was checked locally with `prettier --check` (3.2.5) and a `sass` (1.71.1) compile of the changed stylesheet, and CI runs the full build and tests on the new head. ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Antigravity (Gemini 4 Neon) Generated-by: Claude Code (Opus 5.5), review follow-up `aacada02e9` --------- Co-authored-by: Claude Opus 5.5 <[email protected]> --- .../dashboard/component/dashboard.component.scss | 9 ----- .../src/app/dashboard/component/section-style.scss | 1 - .../files-uploader/files-uploader.component.scss | 14 -------- .../dataset-detail.component.scss | 40 ---------------------- .../dataset-detail.component.ts | 12 +++---- .../user/user-dataset/user-dataset.component.scss | 5 --- .../model-detail.component.scss | 7 +--- .../workflow-execution-history.component.scss | 9 ----- .../browse-section.component.spec.ts | 4 +-- .../browse-section/browse-section.component.ts | 4 +-- frontend/src/app/hub/component/hub.component.scss | 18 ---------- frontend/src/app/hub/component/hub.component.ts | 1 - .../breakpoint-condition-input.component.scss | 7 ---- .../ai-fix/ai-fix-frame.component.scss | 5 --- .../ui-udf-parameters.component.ts | 3 +- frontend/src/styles.scss | 8 ----- 16 files changed, 13 insertions(+), 134 deletions(-) diff --git a/frontend/src/app/dashboard/component/dashboard.component.scss b/frontend/src/app/dashboard/component/dashboard.component.scss index b227c16610..bbb1efe785 100644 --- a/frontend/src/app/dashboard/component/dashboard.component.scss +++ b/frontend/src/app/dashboard/component/dashboard.component.scss @@ -103,11 +103,6 @@ nz-content { width: 100%; } -#googleButton { - float: right; - padding: 5px 0; -} - #build-number { position: absolute; left: 5px; @@ -139,10 +134,6 @@ nz-content { } } -.hidden { - display: none; -} - #nav { max-width: 100%; max-height: 100%; diff --git a/frontend/src/app/dashboard/component/section-style.scss b/frontend/src/app/dashboard/component/section-style.scss index 5dc9167136..eaa221b2e2 100644 --- a/frontend/src/app/dashboard/component/section-style.scss +++ b/frontend/src/app/dashboard/component/section-style.scss @@ -54,7 +54,6 @@ **/ $section-header-height: 124px; $section-search-bar-height: 60px; -$dashboard-navigation-height: 76px; .section-container { display: grid; diff --git a/frontend/src/app/dashboard/component/user/files-uploader/files-uploader.component.scss b/frontend/src/app/dashboard/component/user/files-uploader/files-uploader.component.scss index ec22d7bf2c..303cbc7968 100644 --- a/frontend/src/app/dashboard/component/user/files-uploader/files-uploader.component.scss +++ b/frontend/src/app/dashboard/component/user/files-uploader/files-uploader.component.scss @@ -47,17 +47,6 @@ margin: 10px 0; } -.uploaded-files-list { - font-size: 15px; - margin-top: 5px; - height: 25%; - width: 90%; - margin-left: 5%; - margin-right: 5%; - overflow-y: auto; - overflow-x: auto; -} - .upload-buttons { display: flex; gap: 8px; @@ -77,6 +66,3 @@ justify-content: center; margin-bottom: 15px; } - -.file-uploader-banner { -} 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 f6b29cad5b..eb6ef351f3 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 @@ -19,50 +19,14 @@ @use "../../resource-detail-shared" as detail; -nz-layout { - height: 100%; -} - -html, -body { - height: 100%; - margin: 0; - padding: 0; -} - -.grayed-out { - filter: grayscale(1) opacity(0.7); - background-color: #f0f0f0; /* Adjust the color as needed */ -} - -.disabled-click { - pointer-events: none; -} - -.file-title { - display: flex; - align-items: center; - gap: 10px; -} - @include detail.status-tags; @include detail.like-states; -.file-size { - display: inline-flex; - align-items: center; - gap: 4px; -} - @include detail.header("dataset"); @include detail.tab-bar; -.versions-tab-content { - @include detail.scrollable-tab; -} - .data-card-tab-content { @include detail.scrollable-tab; } @@ -106,10 +70,6 @@ body { font-size: 14px; font-weight: 600; } - - .ant-collapse-content-box { - padding: 0 !important; - } } .contributor-list { 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 7ffdbe0f6a..2b61641e97 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 @@ -234,7 +234,7 @@ export class DatasetDetailComponent implements OnInit { .updateDatasetPublicity(this.did) .pipe(untilDestroyed(this)) .subscribe({ - next: (res: Response) => { + next: () => { this.datasetIsPublic = checked; let state = "public"; if (!this.datasetIsPublic) { @@ -242,7 +242,7 @@ export class DatasetDetailComponent implements OnInit { } this.notificationService.success(`Dataset ${this.datasetName} is now ${state}`); }, - error: (err: unknown) => { + error: () => { this.notificationService.error("Fail to change the dataset publicity"); }, }); @@ -256,7 +256,7 @@ export class DatasetDetailComponent implements OnInit { .updateDatasetDownloadable(this.did) .pipe(untilDestroyed(this)) .subscribe({ - next: (res: Response) => { + next: () => { this.datasetIsDownloadable = checked; let state = "allowed"; if (!this.datasetIsDownloadable) { @@ -264,7 +264,7 @@ export class DatasetDetailComponent implements OnInit { } this.notificationService.success(`Dataset downloads are now ${state}`); }, - error: (err: unknown) => { + error: () => { this.notificationService.error("Failed to change the dataset download permission"); }, }); @@ -440,13 +440,13 @@ export class DatasetDetailComponent implements OnInit { .deleteDatasetFile(this.did, relativePath) .pipe(untilDestroyed(this)) .subscribe({ - next: (res: Response) => { + next: () => { this.notificationService.success( `File ${node.name} is successfully deleted. You may finalize it or revert it at the "Create Version" panel` ); this.versionsFilesBrowser?.notePathStaged(relativePath); }, - error: (err: unknown) => { + error: () => { this.notificationService.error("Failed to delete the file"); }, }); diff --git a/frontend/src/app/dashboard/component/user/user-dataset/user-dataset.component.scss b/frontend/src/app/dashboard/component/user/user-dataset/user-dataset.component.scss index bf3fd5d1fe..4b699f0919 100644 --- a/frontend/src/app/dashboard/component/user/user-dataset/user-dataset.component.scss +++ b/frontend/src/app/dashboard/component/user/user-dataset/user-dataset.component.scss @@ -20,8 +20,3 @@ @use "../../dashboard.component" as *; @use "../../section-style" as *; @use "../../button-style" as *; - -.dataset-menu-bar { - height: 55px; - overflow-y: hidden; -} diff --git a/frontend/src/app/dashboard/component/user/user-model/user-model-explorer/model-detail.component.scss b/frontend/src/app/dashboard/component/user/user-model/user-model-explorer/model-detail.component.scss index 26cd9c88f4..3e7cba15fd 100644 --- a/frontend/src/app/dashboard/component/user/user-model/user-model-explorer/model-detail.component.scss +++ b/frontend/src/app/dashboard/component/user/user-model/user-model-explorer/model-detail.component.scss @@ -21,10 +21,6 @@ // Mirrors dataset-detail.component.scss; the two detail pages are the same layout. -nz-layout { - height: 100%; -} - nz-select { flex-grow: 1; } @@ -47,8 +43,7 @@ nz-select { @include detail.tab-bar; -.data-card-tab-content, -.versions-tab-content { +.data-card-tab-content { @include detail.scrollable-tab; } diff --git a/frontend/src/app/dashboard/component/user/user-workflow/ngbd-modal-workflow-executions/workflow-execution-history.component.scss b/frontend/src/app/dashboard/component/user/user-workflow/ngbd-modal-workflow-executions/workflow-execution-history.component.scss index 67b4d1eb4e..e83e488db7 100644 --- a/frontend/src/app/dashboard/component/user/user-workflow/ngbd-modal-workflow-executions/workflow-execution-history.component.scss +++ b/frontend/src/app/dashboard/component/user/user-workflow/ngbd-modal-workflow-executions/workflow-execution-history.component.scss @@ -24,10 +24,6 @@ margin: 0; } -.ant-table-thead > tr > th { - padding: 0px; -} - nz-table th { text-align: center; } @@ -64,8 +60,3 @@ nz-table th { text-overflow: ellipsis; max-width: 0; } - -.ant-table { - width: 100%; - table-layout: fixed; -} diff --git a/frontend/src/app/hub/component/browse-section/browse-section.component.spec.ts b/frontend/src/app/hub/component/browse-section/browse-section.component.spec.ts index 7756582937..4c952d3f51 100644 --- a/frontend/src/app/hub/component/browse-section/browse-section.component.spec.ts +++ b/frontend/src/app/hub/component/browse-section/browse-section.component.spec.ts @@ -113,7 +113,7 @@ describe("BrowseSectionComponent", () => { expect(component.routeFor(workflow)).toEqual([HUB_WORKFLOW_RESULT_DETAIL, "501"]); component.currentUid = 1; - component.ngOnChanges({} as any); + component.ngOnChanges(); expect(component.routeFor(workflow)).toEqual([USER_WORKSPACE, "501"]); }); @@ -142,7 +142,7 @@ describe("BrowseSectionComponent", () => { } as unknown as DashboardEntry; component.entities = [entity]; component.ngOnInit(); - component.ngOnChanges({} as any); + component.ngOnChanges(); expect(component.getCoverImage(entity)).toBe(PRESIGNED_COVER); expect(cover).toHaveBeenCalledTimes(1); diff --git a/frontend/src/app/hub/component/browse-section/browse-section.component.ts b/frontend/src/app/hub/component/browse-section/browse-section.component.ts index 376a1c4aef..df20783885 100644 --- a/frontend/src/app/hub/component/browse-section/browse-section.component.ts +++ b/frontend/src/app/hub/component/browse-section/browse-section.component.ts @@ -17,7 +17,7 @@ * under the License. */ -import { ChangeDetectorRef, Component, Input, OnChanges, OnInit, SimpleChanges } from "@angular/core"; +import { ChangeDetectorRef, Component, Input, OnChanges, OnInit } from "@angular/core"; import { DashboardEntry } from "../../../dashboard/type/dashboard-entry"; import { EntityType } from "../../service/hub.service"; import { ResourceRegistryService } from "../../../dashboard/service/user/resource-registry/resource-registry.service"; @@ -66,7 +66,7 @@ export class BrowseSectionComponent implements OnInit, OnChanges { this.loadCoverImages(); } - ngOnChanges(changes: SimpleChanges): void { + ngOnChanges(): void { // The routes depend on the viewer as well as on the entities, and both arrive as inputs. this.entityRoutes.clear(); this.loadCoverImages(); diff --git a/frontend/src/app/hub/component/hub.component.scss b/frontend/src/app/hub/component/hub.component.scss deleted file mode 100644 index 51da6c0f2b..0000000000 --- a/frontend/src/app/hub/component/hub.component.scss +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ diff --git a/frontend/src/app/hub/component/hub.component.ts b/frontend/src/app/hub/component/hub.component.ts index 50f2b044cb..2e31883847 100644 --- a/frontend/src/app/hub/component/hub.component.ts +++ b/frontend/src/app/hub/component/hub.component.ts @@ -32,7 +32,6 @@ import { MODEL_ICON } from "../../common/icon/model-icon"; @Component({ selector: "texera-hub", templateUrl: "hub.component.html", - styleUrls: ["hub.component.scss"], imports: [NgIf, NzMenuItemComponent, ɵNzTransitionPatchDirective, NzTooltipDirective, RouterLink, NzIconDirective], }) export class HubComponent { diff --git a/frontend/src/app/workspace/component/code-editor-dialog/breakpoint-condition-input/breakpoint-condition-input.component.scss b/frontend/src/app/workspace/component/code-editor-dialog/breakpoint-condition-input/breakpoint-condition-input.component.scss index a7b8990cb9..7021e9a0f6 100644 --- a/frontend/src/app/workspace/component/code-editor-dialog/breakpoint-condition-input/breakpoint-condition-input.component.scss +++ b/frontend/src/app/workspace/component/code-editor-dialog/breakpoint-condition-input/breakpoint-condition-input.component.scss @@ -30,8 +30,6 @@ flex-direction: column; align-items: flex-start; width: 240px; - opacity: 1; - transition: opacity 1s ease-in-out; } .condition-input-popup .tooltip-header { @@ -51,11 +49,6 @@ padding: 5px; } -.condition-input-popup.fade-out { - opacity: 0; - pointer-events: none; -} - ::ng-deep .cgmr.codicon.monaco-conditional-breakpoint { width: 10px !important; height: 10px !important; diff --git a/frontend/src/app/workspace/component/result-panel/ai-fix/ai-fix-frame.component.scss b/frontend/src/app/workspace/component/result-panel/ai-fix/ai-fix-frame.component.scss index caa0cd376e..fc2d775331 100644 --- a/frontend/src/app/workspace/component/result-panel/ai-fix/ai-fix-frame.component.scss +++ b/frontend/src/app/workspace/component/result-panel/ai-fix/ai-fix-frame.component.scss @@ -40,11 +40,6 @@ user-select: text; } -.ai-fix-field { - margin-bottom: 4px; - user-select: text; -} - /* * Same monospace treatment the other result-panel frames use for code, except for the * fallback: they name `serif`, which a diff cannot use -- the +/- columns stop lining up diff --git a/frontend/src/app/workspace/component/ui-udf-parameters/ui-udf-parameters.component.ts b/frontend/src/app/workspace/component/ui-udf-parameters/ui-udf-parameters.component.ts index e59d5c72d7..d55af4b685 100644 --- a/frontend/src/app/workspace/component/ui-udf-parameters/ui-udf-parameters.component.ts +++ b/frontend/src/app/workspace/component/ui-udf-parameters/ui-udf-parameters.component.ts @@ -27,12 +27,13 @@ import { NzIconDirective } from "ng-zorro-antd/icon"; import { NotificationService } from "../../../common/service/notification/notification.service"; import { WorkflowActionService } from "../../service/workflow-graph/model/workflow-action.service"; import { + DATASET_INPUT_TYPE, + MODEL_INPUT_TYPE, UiUdfParametersEditError, UiUdfParametersParseError, } from "../../service/code-editor/ui-udf-parameters-parser.service"; import { UiUdfParametersSyncService } from "../../service/code-editor/ui-udf-parameters-sync.service"; import { ExecuteWorkflowService } from "../../service/execute-workflow/execute-workflow.service"; -import { DATASET_INPUT_TYPE, MODEL_INPUT_TYPE } from "../../service/code-editor/ui-udf-parameters-parser.service"; import { UI_PARAMETER_TYPES } from "../../service/code-editor/ui-udf-parameter"; import type { AttributeType } from "../../types/workflow-compiling.interface"; import { fieldOperatorID, renderedInFormView, renderedReadOnly } from "../../util/custom-formly-type"; diff --git a/frontend/src/styles.scss b/frontend/src/styles.scss index 731ae2dcef..6cb2084a93 100644 --- a/frontend/src/styles.scss +++ b/frontend/src/styles.scss @@ -77,10 +77,6 @@ hr { padding: 5px 8px !important; } -.ant-collapse-content-box { - padding: 0 !important; -} - .ant-tabs-tabpane { padding-right: 24px; } @@ -264,10 +260,6 @@ hr { align-items: center !important; } - .ant-collapse-content-box { - padding: 14px !important; - } - .operator-select { height: 24px; }
