Skip to content

refactor(frontend): remove unused styles, import, and params - #9644

Open
aglinxinyuan wants to merge 2 commits into
apache:mainfrom
aglinxinyuan:refactor/frontend-unused-styles-and-params
Open

aglinxinyuan wants to merge 2 commits into
apache:mainfrom
aglinxinyuan:refactor/frontend-unused-styles-and-params

Conversation

@aglinxinyuan

@aglinxinyuan aglinxinyuan commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

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/-132 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). 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):

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).

Was this PR authored or co-authored using generative AI tooling?

Generated-by: Antigravity (Gemini 4 Neon)

Remove orphaned detail-page SCSS selectors moved to
VersionsFilesBrowserComponent in apache#8942, drop unread RxJS callback and
ngOnChanges parameters along with the unused SimpleChanges import, and
merge the duplicate ui-udf-parameters-parser.service import.

Closes apache#9643
@aglinxinyuan aglinxinyuan added the refactor Refactor the code label Nov 23, 2026
Copilot AI balanced review requested due to automatic review settings November 23, 2026 11:30
@aglinxinyuan aglinxinyuan added the frontend Changes related to the frontend GUI label Nov 23, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@github-actions

github-actions Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Automated Reviewer Suggestions

Based on the git blame history of the changed files, we recommend the following reviewers:

  • Contributors with relevant context: @tanishqgandhi1908, @Neilk1021, @Yicong-Huang
    You can notify them by mentioning @tanishqgandhi1908, @Neilk1021, @Yicong-Huang in a comment.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.67%. Comparing base (95e2748) to head (49e00f8).

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #9644      +/-   ##
============================================
- Coverage     91.67%   91.67%   -0.01%     
  Complexity     5135     5135              
============================================
  Files          1304     1304              
  Lines         58088    58087       -1     
  Branches       7582     7582              
============================================
- Hits          53254    53253       -1     
  Misses         2922     2922              
  Partials       1912     1912              
Flag Coverage Δ *Carryforward flag
access-control-service 77.44% <ø> (ø) Carriedforward from 95e2748
agent-service 99.56% <ø> (ø) Carriedforward from 95e2748
amber 85.76% <ø> (ø) Carriedforward from 95e2748
computing-unit-managing-service 63.83% <ø> (ø) Carriedforward from 95e2748
config-service 87.50% <ø> (ø) Carriedforward from 95e2748
file-service 82.16% <ø> (ø) Carriedforward from 95e2748
frontend 96.45% <ø> (-0.01%) ⬇️
notebook-migration-service 83.77% <ø> (ø) Carriedforward from 95e2748
pyamber 98.38% <ø> (ø) Carriedforward from 95e2748
result-service 85.71% <ø> (ø) Carriedforward from 95e2748
workflow-compiling-service 78.30% <ø> (ø) Carriedforward from 95e2748

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Remove residual unmatched selectors in dataset-detail and model-detail
stylesheets, remove unused and inert SCSS rules across dashboard,
uploader, workflow execution history, breakpoint popup, AI-fix frame,
and global styles, and delete the empty hub.component.scss stylesheet.

Closes apache#9643
@aglinxinyuan
aglinxinyuan requested a review from kunwp1 November 23, 2026 22:18

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend Changes related to the frontend GUI refactor Refactor the code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove unused frontend styles, duplicate import, and unread parameters

3 participants