Skip to content

feat(dataset): add dataset contributor display and editing - #6953

Merged
xuang7 merged 7 commits into
apache:mainfrom
xuang7:feat/dataset-contributor-frontend
Aug 3, 2026
Merged

xuang7 merged 7 commits into
apache:mainfrom
xuang7:feat/dataset-contributor-frontend

Conversation

@xuang7

@xuang7 xuang7 commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

This PR adds the frontend for dataset contributor metadata so that dataset authors and other contributors can be properly acknowledged, on top of the backend added in #6952.

Changes:

  • Dataset detail page: a new "Metadata" card in the Data Card tab with a collapsible "Contributors" section. Each contributor is shown as a card with name, email, affiliation, and comments; the dataset creator is marked with a star. Long field values are truncated to two lines with the full content shown in tooltips.
  • Users with WRITE access can add, edit, and delete contributors through a dropdown menu on each card, with optimistic updates and rollback if saving fails.
  • A new user-dataset-contributor-editor modal component for adding and editing a contributor, backed by a shared Formly field group (contributor-form-fields.ts) with client-side validation (required name, email format, length limits).
  • Dataset creation: the create-dataset form accepts an optional initial list of contributors, sent with the create request.
  • DatasetService: createDataset gains a contributors argument, and a new updateDatasetContributors method posts the full list to POST /dataset/update/contributors.
  • Types: Contributor interface, DashboardDataset.contributors, and an optional isPlaceholder flag on User with a "placeholder" tag in the admin user list. The tag stays hidden until the follow-up backend that auto-creates placeholder accounts for contributor emails lands; it is included here so the admin UI is ready for it.

Demo

Create a dataset with contributor metadata Add a contributor from the dataset detail page
Create a dataset with contributor metadata Add a contributor from the dataset detail page

Contributor list:
contributor_list

Any related issues, documentation, discussions?

Depends on #6952
Closes #6926

How was this PR tested?

New vitest cases across four spec files: contributor card rendering and add/edit/delete flows with rollback on failure (dataset-detail), editor form validation and modal results (contributor-editor), request shapes for create/update (dataset.service), and the extended create-dataset form fields (version-creator). The flow was also manually tested in the UI.

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

Generated-by: Claude Code (Claude Fable 5)

@github-actions github-actions Bot added feature frontend Changes related to the frontend GUI labels Jul 27, 2026
@github-actions

github-actions Bot commented Jul 27, 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: @rbelavadi, @aglinxinyuan, @jaeyun0503
    You can notify them by mentioning @rbelavadi, @aglinxinyuan, @jaeyun0503 in a comment.

@xuang7
xuang7 force-pushed the feat/dataset-contributor-frontend branch from 6f57f87 to 295c8a5 Compare July 28, 2026 21:25
@codecov-commenter

codecov-commenter commented Jul 28, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.36364% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.86%. Comparing base (e7cd5b1) to head (1eb1f4e).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...ser-dataset-explorer/dataset-detail.component.html 92.59% 4 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #6953      +/-   ##
============================================
+ Coverage     82.73%   82.86%   +0.12%     
  Complexity     4089     4089              
============================================
  Files          1162     1165       +3     
  Lines         46302    46412     +110     
  Branches       5162     5173      +11     
============================================
+ Hits          38308    38458     +150     
+ Misses         6302     6257      -45     
- Partials       1692     1697       +5     
Flag Coverage Δ *Carryforward flag
access-control-service 70.00% <ø> (ø) Carriedforward from e7cd5b1
agent-service 83.65% <ø> (ø) Carriedforward from e7cd5b1
amber 79.53% <ø> (ø) Carriedforward from e7cd5b1
computing-unit-managing-service 43.60% <ø> (ø) Carriedforward from e7cd5b1
config-service 65.97% <ø> (ø) Carriedforward from e7cd5b1
file-service 67.74% <ø> (ø) Carriedforward from e7cd5b1
frontend 83.84% <96.36%> (+0.28%) ⬆️
notebook-migration-service 78.89% <ø> (ø) Carriedforward from e7cd5b1
pyamber 97.36% <ø> (ø) Carriedforward from e7cd5b1
workflow-compiling-service 26.31% <ø> (ø) Carriedforward from e7cd5b1

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

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

This PR adds Angular frontend support for dataset contributor metadata (introduced in the backend/API in #6952), enabling contributors to be displayed on the dataset detail page and edited via a modal, and allowing contributors to be provided during dataset creation.

Changes:

  • Adds contributor typing and wires contributors through dataset create + dataset detail retrieval flows.
  • Introduces a contributor editor modal (Formly-based) and integrates contributor add/edit/delete into the dataset detail UI with optimistic updates.
  • Adds/updates frontend unit tests covering service calls and contributor edit flows.

Reviewed changes

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

Show a summary per file
File Description
frontend/src/app/dashboard/type/dashboard-dataset.interface.ts Extends dashboard dataset typing to include contributors.
frontend/src/app/dashboard/service/user/dataset/dataset.service.ts Sends contributors on dataset creation; adds contributors update API call.
frontend/src/app/dashboard/service/user/dataset/dataset.service.spec.ts Adds tests for contributors in create request + update contributors endpoint.
frontend/src/app/dashboard/component/user/user-dataset/user-dataset-explorer/user-dataset-version-creator/user-dataset-version-creator.component.ts Adds optional contributors form array to dataset creation flow.
frontend/src/app/dashboard/component/user/user-dataset/user-dataset-explorer/user-dataset-version-creator/user-dataset-version-creator.component.spec.ts Updates Formly stubs/expectations to include contributors field.
frontend/src/app/dashboard/component/user/user-dataset/user-dataset-explorer/user-dataset-contributor-editor/user-dataset-contributor-editor.component.ts New modal component + reusable Formly contributor field group (incl. email validation).
frontend/src/app/dashboard/component/user/user-dataset/user-dataset-explorer/user-dataset-contributor-editor/user-dataset-contributor-editor.component.spec.ts Unit tests for contributor editor modal behavior and validation.
frontend/src/app/dashboard/component/user/user-dataset/user-dataset-explorer/user-dataset-contributor-editor/user-dataset-contributor-editor.component.scss Styles for contributor editor modal layout and buttons.
frontend/src/app/dashboard/component/user/user-dataset/user-dataset-explorer/user-dataset-contributor-editor/user-dataset-contributor-editor.component.html Template for contributor editor modal form + actions.
frontend/src/app/dashboard/component/user/user-dataset/user-dataset-explorer/dataset-detail.component.ts Stores contributors from dataset response; adds optimistic add/edit/delete + persistence.
frontend/src/app/dashboard/component/user/user-dataset/user-dataset-explorer/dataset-detail.component.spec.ts Adds tests for contributor mapping and optimistic update/rollback behavior.
frontend/src/app/dashboard/component/user/user-dataset/user-dataset-explorer/dataset-detail.component.scss Adds contributor section/card styling with truncation and tooltips.
frontend/src/app/dashboard/component/user/user-dataset/user-dataset-explorer/dataset-detail.component.html Adds Contributors UI section, action dropdown, and add-card control.
frontend/src/app/common/type/dataset.ts Adds Contributor type and contributors on Dataset.

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

@xuang7
xuang7 force-pushed the feat/dataset-contributor-frontend branch from 2c2a3b3 to 7273780 Compare July 31, 2026 23:22
xuang7 and others added 4 commits July 31, 2026 16:22
Blank optional contributor fields (email, affiliation, comments) are now
omitted from requests so they are stored as NULL instead of empty strings,
and the add-contributor tile activates on Space in addition to Enter.

Co-Authored-By: Claude Fable 5 <[email protected]>

@aicam aicam 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

@aicam
aicam added this pull request to the merge queue Aug 3, 2026
@xuang7
xuang7 removed this pull request from the merge queue due to a manual request Aug 3, 2026
@xuang7
xuang7 added this pull request to the merge queue Aug 3, 2026
Merged via the queue into apache:main with commit 7f3bba5 Aug 3, 2026
26 checks passed
@xuang7
xuang7 deleted the feat/dataset-contributor-frontend branch August 3, 2026 20:53
renovate-bot pushed a commit to renovate-bot/apache-_-texera that referenced this pull request Aug 3, 2026
…ounts (apache#7280)

### What changes were proposed in this PR?

This PR links dataset contributors to user accounts by email, so a
contributor can later own their contributions with a real account.
Follow-up to apache#6952 (backend) and apache#6953 (frontend).

Changes:
- When a contributor has an email, it is matched to a user account,
ignoring case. If no account exists yet, a placeholder account is
created for that email; saving the list again reuses it.
- When someone later registers with that email (locally or via Google),
they take over the placeholder. The account keeps its `uid`, so existing
contributor links keep working. It still needs admin approval before it
can log in and do anything, and an account that already has a password
or Google login can never be taken over.
- Placeholder accounts cannot be granted access to workflows, datasets,
projects, or computing units.
- The admin user list shows which accounts are placeholders.
- A contributor email must be well-formed, and two contributors of the
same dataset cannot use the same email.
- The migration adds the new column, foreign key, and indexes, removes
duplicate emails already in the data, and links existing contributors to
registered users.

Design notes:
- Emails are optional for contributors, so updates keep replacing the
whole list.
- Emails are stored as typed but always compared case-insensitively.
Lower-casing them in storage, and reusing the new `EmailUtil` in the two
older email checks, are left as follow-ups.

#### Demo
First, the dataset owner adds a contributor whose email is not
associated with an existing user account.

<img width="1471" height="728" alt="add-contributor"
src="https://github.com/user-attachments/assets/aba20a2f-d463-4c6e-ac31-a9451875af94"
/>

A placeholder user account is then created and displayed on the admin
user page.

<img width="1457" height="89" alt="place-holder"
src="https://github.com/user-attachments/assets/d86d059c-41a7-4da6-9eb8-c9b4b91bc035"
/>

The contributor can claim the placeholder account by registering with
the same email address through local or Google sign-in.

<img width="418" height="396" alt="claim-account"
src="https://github.com/user-attachments/assets/57a4030a-7b45-422a-85c1-84c65898de4b"
/>

After the account is claimed, the updated account information is shown
on the admin user page.
<img width="1452" height="82" alt="account"
src="https://github.com/user-attachments/assets/161b7515-60eb-4bad-9d91-e2d2d5e2c750"
/>

<img width="1453" height="160" alt="after-claim"
src="https://github.com/user-attachments/assets/37ffad0d-ea15-40a9-b9fb-f044f5025b5a"
/>



### Any related issues, documentation, discussions?

Closes apache#6976
Related to apache#6926

### How was this PR tested?

17 new ScalaTest cases covering linking (existing user, placeholder
creation and reuse, no-email, invalid/duplicate email), claiming (uid
preserved, INACTIVE kept, login after claim, credentialed accounts not
claimable, taken username rejected, case-variant duplicate registration
rejected), the placeholder grant guard in each of the four access
resources, and the shared EmailUtil. The pre-existing AuthResource and
access-resource tests still pass. Fresh-DDL and migrated schemas
verified identical via pg_dump diff.

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

Generated-by: Claude Code (Claude Fable 5)

---------

Co-authored-by: Claude Fable 5 <[email protected]>
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

feature frontend Changes related to the frontend GUI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support contributor metadata for datasets

4 participants