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

refactor(frontend): extract Data Card and Versions & Files tabs#7043
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) <noreply@anthropic.com>
@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
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