Skip to content

refactor(frontend): extract Data Card and Versions & Files tabs - #7043

Merged
xuang7 merged 9 commits into
apache:mainfrom
rbelavadi:refactor/6942-extract-data-card-versions-files-tabs
Jul 30, 2026
Merged

xuang7 merged 9 commits into
apache:mainfrom
rbelavadi:refactor/6942-extract-data-card-versions-files-tabs

Conversation

@rbelavadi

@rbelavadi rbelavadi commented Jul 29, 2026 •

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

Extracts the remaining content on the dataset detail page into two new tabs: Data Card and Versions & Files. Part of #6394; second of two sub-issues (#6395, Settings, already merged).

  • Versions & Files: pure relocation. The existing file browser, version selector, file preview, and upload widget move here unchanged.
  • Data Card: new read-only overview, two cards:
    • Description (moved out of the page header, which previously duplicated it, the header now shows name/badges/counts only), using the existing texera-markdown-description component's built-in "View more" collapse for long descriptions.
    • Key facts panel: Created date, Last updated (latest version's creation date, independent of whatever's selected in Versions & Files), Latest version file name, Latest version size, and Versions count.

Before: two tabs- Data Card (holding everything: file browser, version history, uploads, plus a duplicated description in the header) and Settings.

settings_tab_recording

After: three tabs- Data Card (read-only overview only), Versions & Files (file/version management, split out of the old Data
Card tab), and Settings (unchanged).

dataset_detail_tab_layout

Any related issues, documentation, discussions?

Closes #6942

How was this PR tested?

Added 7 unit tests to dataset-detail.component.spec.ts covering the new Data Card logic:

  • "Last updated" derives from the latest version, independent of whichever version is selected in Versions & Files.
  • retrieveLatestVersionFile() correctly resolves the latest version's file name, including nested paths and the no-files case.
  • Selecting a version with an empty file tree no longer throws.

Manually tested on UI:

  • Versions & Files retains all existing functionality (file browsing, version switching, file preview, upload) unchanged.
  • Description renders correctly in Data Card, including markdown formatting and the "View more" collapse on long descriptions.
  • Settings tab (merged separately in Refactor dataset detail page: extract Settings tab #6395) is unaffected.

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

Generated-by: Claude Code (Claude Opus 4.8)

rbelavadi and others added 2 commits July 28, 2026 14:25
…& Files tabs

Adds a Data Card overview tab alongside the existing file browser (now under
Versions & Files): a read-only description, an at-a-glance stats list
(Created, Last updated, Versions, Latest version file, Selected version
size), laid out as two side-by-side cards matching the app's card
conventions.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@github-actions github-actions Bot added refactor Refactor the code frontend Changes related to the frontend GUI labels Jul 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Automated Reviewer Suggestions

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

  • No candidates found from git blame history.

@rbelavadi

Copy link
Copy Markdown
Contributor Author

/request-review @xuang7

@github-actions
github-actions Bot requested a review from xuang7 July 29, 2026 17:47
@codecov-commenter

codecov-commenter commented Jul 29, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 68.39623% with 67 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.60%. Comparing base (421e660) to head (2f28ccd).

Files with missing lines Patch % Lines
...ser-dataset-explorer/dataset-detail.component.html 64.36% 66 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #7043      +/-   ##
============================================
+ Coverage     79.57%   79.60%   +0.03%     
- Complexity     3832     3836       +4     
============================================
  Files          1159     1159              
  Lines         46122    46162      +40     
  Branches       5127     5133       +6     
============================================
+ Hits          36700    36747      +47     
+ Misses         7790     7787       -3     
+ Partials       1632     1628       -4     
Flag Coverage Δ *Carryforward flag
access-control-service 70.00% <ø> (ø) Carriedforward from d0c6441
agent-service 77.42% <ø> (ø) Carriedforward from d0c6441
amber 73.11% <ø> (+0.04%) ⬆️ Carriedforward from d0c6441
computing-unit-managing-service 20.49% <ø> (ø) Carriedforward from d0c6441
config-service 66.66% <ø> (ø) Carriedforward from d0c6441
file-service 67.21% <ø> (ø) Carriedforward from d0c6441
frontend 83.08% <68.39%> (+0.02%) ⬆️
notebook-migration-service 78.94% <ø> (ø) Carriedforward from d0c6441
pyamber 97.36% <ø> (ø) Carriedforward from d0c6441
workflow-compiling-service 26.31% <ø> (ø) Carriedforward from d0c6441

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

@xuang7 xuang7 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.

Thanks for the PR! It generally looks good to me. I left a few minor comments. Please also try to improve the test coverage.

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.

Pull request overview

Refactors the Angular dataset detail page in the frontend dashboard by splitting responsibilities across tabs, aiming to reduce clutter and separate read-only dataset metadata from file/version management workflows.

Changes:

  • Introduces a read-only Data Card tab that surfaces dataset description and key facts.
  • Moves the existing file browser/version selector/upload UI into a new Versions & Files tab.
  • Adds component logic + unit tests to derive “latest version” facts independently from the currently selected version.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
frontend/src/app/dashboard/component/user/user-dataset/user-dataset-explorer/dataset-detail.component.ts Adds latest-version state and retrieval logic; hardens file-tree selection against empty trees.
frontend/src/app/dashboard/component/user/user-dataset/user-dataset-explorer/dataset-detail.component.html Splits UI into Data Card vs Versions & Files tab content; adjusts Settings hint text.
frontend/src/app/dashboard/component/user/user-dataset/user-dataset-explorer/dataset-detail.component.scss Adds layout and scrolling styles for the new tab contents and Data Card cards.
frontend/src/app/dashboard/component/user/user-dataset/user-dataset-explorer/dataset-detail.component.spec.ts Adds/updates unit tests for Data Card latest-version behavior and tab-rendering implications.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@xuang7 xuang7 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.

LGTM!

@xuang7
xuang7 added this pull request to the merge queue Jul 30, 2026
Merged via the queue into apache:main with commit ac68ea4 Jul 30, 2026
22 checks passed
renovate-bot pushed a commit to renovate-bot/apache-_-texera that referenced this pull request Oct 5, 2026
)

### 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** | apache#2413 (2024-02-26), "Introduce Dataset GUI":
`versionCreatorBaseVersion`. apache#3269 (2025-02-19): the precise-view-count
toggle. apache#3662 (2025-08-19): the speed/time aliases. apache#4337 (2026-03-29),
"improve dataset detail page layout": the `.tag-settings-*` and
`.description-section` styles |
| **Usage removed by** | apache#3296 (2025-03-10):
`versionCreatorBaseVersion`. apache#4337 (2026-03-29): the view-count toggle.
apache#6493 (2026-07-27): tag settings moved to a Settings tab. apache#7043
(2026-07-30): the description moved to the Data Card tab. apache#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 apache#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)
renovate-bot pushed a commit to renovate-bot/apache-_-texera that referenced this pull request Nov 25, 2026
…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`, `apache#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: apache#2413 (2024-02-26), apache#2927 (2024-10-14),
apache#4928 (2026-05-04), apache#7043 (2026-07-30), apache#6953 (2026-08-03), apache#8072
(2026-08-28); other SCSS and empty `hub.component.scss`: apache#1634
(2022-10-04), apache#2413 (2024-02-26), apache#2435 (2024-03-17), apache#2502
(2024-03-27), apache#2571 (2024-04-05), apache#2737 (2024-07-15), apache#2776
(2024-08-19), apache#2878 (2024-09-27), apache#2953 (2024-10-25), apache#3415
(2025-05-03), apache#4484 (2026-05-01), apache#8637 (2026-10-28); unread parameters
and duplicate import: apache#2515 (2024-03-27), apache#3296 (2025-03-10), apache#3363
(2025-04-10), apache#3663 (2025-08-16), apache#6897 (2026-09-21, duplicating apache#7551
from 2026-08-13) |
| Usage removed by | Detail version styles: apache#8942 (2026-10-10,
`refactor(frontend): extract shared VersionsFilesBrowser component`);
`.ant-collapse-content-box`: apache#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 apache#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]>
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.

Refactor dataset detail page: extract Data Card and Versions & Files tabs

4 participants