You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@texera.apache.org by "xuang7 (via GitHub)" <gi...@apache.org> on 2026/06/25 07:34:25 UTC
[PR] feat: add card view to the user dataset listing [texera]
xuang7 opened a new pull request, #5947:
URL: https://github.com/apache/texera/pull/5947
<!--
Thanks for sending a pull request (PR)! Here are some tips for you:
1. If this is your first time, please read our contributor guidelines:
[Contributing to Texera](https://github.com/apache/texera/blob/main/CONTRIBUTING.md)
2. Ensure you have added or run the appropriate tests for your PR
3. If the PR is work in progress, mark it a draft on GitHub.
4. Please write your PR title to summarize what this PR proposes, we
are following Conventional Commits style for PR titles as well.
5. Be sure to keep the PR description updated to reflect all changes.
-->
### What changes were proposed in this PR?
<!--
Please clarify what changes you are proposing. The purpose of this section
is to outline the changes. Here are some tips for you:
1. If you propose a new API, clarify the use case for a new API.
2. If you fix a bug, you can clarify why it is a bug.
3. If it is a refactoring, clarify what has been changed.
3. It would be helpful to include a before-and-after comparison using
screenshots or GIFs.
4. Please consider writing useful notes for better and faster reviews.
-->
This PR adds a card view to the user's private dataset listing (/user/dataset). The card view reuses the existing generic CardItemComponent (the list-item/card-item card already used by the private workflow listing) and renders the dataset cover image.
<img width="878" height="573" alt="demo" src="https://github.com/user-attachments/assets/defc9f09-9b6a-4494-96e0-4fcc4e740b01" />
### Any related issues, documentation, discussions?
<!--
Please use this section to link other resources if not mentioned already.
1. If this PR fixes an issue, please include `Fixes #1234`, `Resolves #1234`
or `Closes #1234`. If it is only related, simply mention the issue number.
2. If there is design documentation, please add the link.
3. If there is a discussion in the mailing list, please add the link.
-->
Closes #5312
### How was this PR tested?
<!--
If tests were added, say they were added here. Or simply mention that if the PR
is tested with existing test cases. Make sure to include/update test cases that
check the changes thoroughly including negative and positive cases if possible.
If it was tested in a way different from regular unit tests, please clarify how
you tested step by step, ideally copy and paste-able, so that other reviewers can
test and check, and descendants can verify in the future. If tests were not added,
please describe why they were not added and/or why it was difficult to add.
-->
Added 5 unit tests covering dataset cover preview loading, fallback to the default image, image load failure handling, workflow card regression, and dataset view type updates. Also manually tested the related UI changes.
### Was this PR authored or co-authored using generative AI tooling?
<!--
If generative AI tooling has been used in the process of authoring this PR,
please include the phrase: 'Generated-by: ' followed by the name of the tool
and its version. If no, write 'No'.
Please refer to the [ASF Generative Tooling Guidance](https://www.apache.org/legal/generative-tooling.html) for details.
-->
Generated-by: Claude Opus 4.8
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: add card view to the user dataset listing [texera]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #5947:
URL: https://github.com/apache/texera/pull/5947#issuecomment-4796970923
## [Codecov](https://app.codecov.io/gh/apache/texera/pull/5947?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:x: Patch coverage is `47.22222%` with `19 lines` in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 54.82%. Comparing base ([`abbe7a3`](https://app.codecov.io/gh/apache/texera/commit/abbe7a30244d6e50bc5ce7a89befcbc7a9d31c28?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`a23baaa`](https://app.codecov.io/gh/apache/texera/commit/a23baaab345669c89a66ea6b62fce7078a5b2d5c?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
| [Files with missing lines](https://app.codecov.io/gh/apache/texera/pull/5947?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [...nent/user/user-dataset/user-dataset.component.html](https://app.codecov.io/gh/apache/texera/pull/5947?src=pr&el=tree&filepath=frontend%2Fsrc%2Fapp%2Fdashboard%2Fcomponent%2Fuser%2Fuser-dataset%2Fuser-dataset.component.html&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZnJvbnRlbmQvc3JjL2FwcC9kYXNoYm9hcmQvY29tcG9uZW50L3VzZXIvdXNlci1kYXRhc2V0L3VzZXItZGF0YXNldC5jb21wb25lbnQuaHRtbA==) | 0.00% | [15 Missing :warning: ](https://app.codecov.io/gh/apache/texera/pull/5947?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [...nt/user/list-item/card-item/card-item.component.ts](https://app.codecov.io/gh/apache/texera/pull/5947?src=pr&el=tree&filepath=frontend%2Fsrc%2Fapp%2Fdashboard%2Fcomponent%2Fuser%2Flist-item%2Fcard-item%2Fcard-item.component.ts&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZnJvbnRlbmQvc3JjL2FwcC9kYXNoYm9hcmQvY29tcG9uZW50L3VzZXIvbGlzdC1pdGVtL2NhcmQtaXRlbS9jYXJkLWl0ZW0uY29tcG9uZW50LnRz) | 75.00% | [1 Missing and 2 partials :warning: ](https://app.codecov.io/gh/apache/texera/pull/5947?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [...ponent/user/user-dataset/user-dataset.component.ts](https://app.codecov.io/gh/apache/texera/pull/5947?src=pr&el=tree&filepath=frontend%2Fsrc%2Fapp%2Fdashboard%2Fcomponent%2Fuser%2Fuser-dataset%2Fuser-dataset.component.ts&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZnJvbnRlbmQvc3JjL2FwcC9kYXNoYm9hcmQvY29tcG9uZW50L3VzZXIvdXNlci1kYXRhc2V0L3VzZXItZGF0YXNldC5jb21wb25lbnQudHM=) | 87.50% | [0 Missing and 1 partial :warning: ](https://app.codecov.io/gh/apache/texera/pull/5947?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## main #5947 +/- ##
============================================
- Coverage 54.83% 54.82% -0.02%
Complexity 2956 2956
============================================
Files 1115 1115
Lines 43019 43053 +34
Branches 4633 4639 +6
============================================
+ Hits 23591 23603 +12
- Misses 18040 18053 +13
- Partials 1388 1397 +9
```
| [Flag](https://app.codecov.io/gh/apache/texera/pull/5947/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | | *Carryforward flag |
|---|---|---|---|
| [access-control-service](https://app.codecov.io/gh/apache/texera/pull/5947/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `70.00% <ø> (ø)` | | Carriedforward from [abbe7a3](https://app.codecov.io/gh/apache/texera/commit/abbe7a30244d6e50bc5ce7a89befcbc7a9d31c28?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [agent-service](https://app.codecov.io/gh/apache/texera/pull/5947/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `34.36% <ø> (ø)` | | Carriedforward from [abbe7a3](https://app.codecov.io/gh/apache/texera/commit/abbe7a30244d6e50bc5ce7a89befcbc7a9d31c28?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [amber](https://app.codecov.io/gh/apache/texera/pull/5947/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `57.01% <ø> (ø)` | | Carriedforward from [abbe7a3](https://app.codecov.io/gh/apache/texera/commit/abbe7a30244d6e50bc5ce7a89befcbc7a9d31c28?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [computing-unit-managing-service](https://app.codecov.io/gh/apache/texera/pull/5947/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `0.00% <ø> (ø)` | | Carriedforward from [abbe7a3](https://app.codecov.io/gh/apache/texera/commit/abbe7a30244d6e50bc5ce7a89befcbc7a9d31c28?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [config-service](https://app.codecov.io/gh/apache/texera/pull/5947/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `51.56% <ø> (ø)` | | Carriedforward from [abbe7a3](https://app.codecov.io/gh/apache/texera/commit/abbe7a30244d6e50bc5ce7a89befcbc7a9d31c28?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [file-service](https://app.codecov.io/gh/apache/texera/pull/5947/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `59.02% <ø> (ø)` | | Carriedforward from [abbe7a3](https://app.codecov.io/gh/apache/texera/commit/abbe7a30244d6e50bc5ce7a89befcbc7a9d31c28?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [frontend](https://app.codecov.io/gh/apache/texera/pull/5947/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `48.45% <47.22%> (-0.02%)` | :arrow_down: | |
| [notebook-migration-service](https://app.codecov.io/gh/apache/texera/pull/5947/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `78.57% <ø> (ø)` | | Carriedforward from [abbe7a3](https://app.codecov.io/gh/apache/texera/commit/abbe7a30244d6e50bc5ce7a89befcbc7a9d31c28?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [pyamber](https://app.codecov.io/gh/apache/texera/pull/5947/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `90.20% <ø> (ø)` | | Carriedforward from [abbe7a3](https://app.codecov.io/gh/apache/texera/commit/abbe7a30244d6e50bc5ce7a89befcbc7a9d31c28?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [python](https://app.codecov.io/gh/apache/texera/pull/5947/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `90.76% <ø> (ø)` | | Carriedforward from [abbe7a3](https://app.codecov.io/gh/apache/texera/commit/abbe7a30244d6e50bc5ce7a89befcbc7a9d31c28?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [workflow-compiling-service](https://app.codecov.io/gh/apache/texera/pull/5947/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `55.14% <ø> (ø)` | | Carriedforward from [abbe7a3](https://app.codecov.io/gh/apache/texera/commit/abbe7a30244d6e50bc5ce7a89befcbc7a9d31c28?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
*This pull request uses carry forward flags. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to find out more.
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/texera/pull/5947?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: add card view to the user dataset listing [texera]
Posted by "xuang7 (via GitHub)" <gi...@apache.org>.
xuang7 commented on code in PR #5947:
URL: https://github.com/apache/texera/pull/5947#discussion_r3483510541
##########
frontend/src/app/dashboard/component/user/list-item/card-item/card-item.component.ts:
##########
@@ -136,10 +138,11 @@ export class CardItemComponent implements OnChanges {
/** The top image src for the card preview. */
get previewImage(): string {
- return CardItemComponent.DEFAULT_PREVIEW_IMAGE;
+ return this.coverImageSrc;
}
initializeEntry() {
+ this.coverImageSrc = CardItemComponent.DEFAULT_PREVIEW_IMAGE;
Review Comment:
Removed.
##########
frontend/src/app/dashboard/component/user/user-dataset/user-dataset.component.ts:
##########
@@ -61,14 +62,18 @@ import { FormsModule } from "@angular/forms";
NzSelectComponent,
FormsModule,
SearchResultsComponent,
+ CardItemComponent,
],
})
export class UserDatasetComponent implements AfterViewInit {
+ private static readonly VIEW_MODE_STORAGE_KEY = "texera.userDataset.viewMode";
public sortMethod = SortMethod.EditTimeDesc;
lastSortMethod: SortMethod | null = null;
public isLogin = this.userService.isLogin();
public currentUid = this.userService.getCurrentUser()?.uid;
public hasMismatch = false; // Display warning when there are mismatched datasets
+ public viewType: "list" | "card" =
+ localStorage.getItem(UserDatasetComponent.VIEW_MODE_STORAGE_KEY) === "card" ? "card" : "list";
Review Comment:
Updated.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: add card view to the user dataset listing [texera]
Posted by "xuang7 (via GitHub)" <gi...@apache.org>.
xuang7 merged PR #5947:
URL: https://github.com/apache/texera/pull/5947
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: add card view to the user dataset listing [texera]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #5947:
URL: https://github.com/apache/texera/pull/5947#issuecomment-4796926774
<!-- texera-reviewer-suggestion -->
### Automated Reviewer Suggestions
Based on the `git blame` history of the changed files, we recommend the following reviewers:
- **Contributors with relevant context:** `@Ma77Ball`, `@Yicong-Huang`
You can notify them by mentioning `@Ma77Ball`, `@Yicong-Huang` in a comment.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: add card view to the user dataset listing [texera]
Posted by "xuang7 (via GitHub)" <gi...@apache.org>.
xuang7 commented on code in PR #5947:
URL: https://github.com/apache/texera/pull/5947#discussion_r3483509461
##########
frontend/src/app/dashboard/component/user/list-item/card-item/card-item.component.ts:
##########
@@ -136,10 +138,11 @@ export class CardItemComponent implements OnChanges {
/** The top image src for the card preview. */
get previewImage(): string {
Review Comment:
Removed, thanks.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: add card view to the user dataset listing [texera]
Posted by "aicam (via GitHub)" <gi...@apache.org>.
aicam commented on code in PR #5947:
URL: https://github.com/apache/texera/pull/5947#discussion_r3482728498
##########
frontend/src/app/dashboard/component/user/list-item/card-item/card-item.component.ts:
##########
@@ -136,10 +138,11 @@ export class CardItemComponent implements OnChanges {
/** The top image src for the card preview. */
get previewImage(): string {
Review Comment:
What is the point of this function? its returning a variable
##########
frontend/src/app/dashboard/component/user/list-item/card-item/card-item.component.ts:
##########
@@ -136,10 +138,11 @@ export class CardItemComponent implements OnChanges {
/** The top image src for the card preview. */
get previewImage(): string {
- return CardItemComponent.DEFAULT_PREVIEW_IMAGE;
+ return this.coverImageSrc;
}
initializeEntry() {
+ this.coverImageSrc = CardItemComponent.DEFAULT_PREVIEW_IMAGE;
Review Comment:
coverImageSrc is assigned on top, also here, is it needed?
##########
frontend/src/app/dashboard/component/user/user-dataset/user-dataset.component.ts:
##########
@@ -61,14 +62,18 @@ import { FormsModule } from "@angular/forms";
NzSelectComponent,
FormsModule,
SearchResultsComponent,
+ CardItemComponent,
],
})
export class UserDatasetComponent implements AfterViewInit {
+ private static readonly VIEW_MODE_STORAGE_KEY = "texera.userDataset.viewMode";
public sortMethod = SortMethod.EditTimeDesc;
lastSortMethod: SortMethod | null = null;
public isLogin = this.userService.isLogin();
public currentUid = this.userService.getCurrentUser()?.uid;
public hasMismatch = false; // Display warning when there are mismatched datasets
+ public viewType: "list" | "card" =
+ localStorage.getItem(UserDatasetComponent.VIEW_MODE_STORAGE_KEY) === "card" ? "card" : "list";
Review Comment:
default should be card
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org