Copilot commented on code in PR #6953:
URL: https://github.com/apache/texera/pull/6953#discussion_r3678507258
##########
frontend/src/app/dashboard/component/user/user-dataset/user-dataset-explorer/dataset-detail.component.html:
##########
@@ -90,6 +90,107 @@ <h2>Dataset: {{datasetName}}</h2>
[enableViewMore]="true">
</texera-markdown-description>
</div>
+
+ <nz-divider></nz-divider>
+
+ <!-- Contributor's section -->
+ <nz-collapse
+ nzGhost
+ nzExpandIconPosition="end"
+ class="contributors-collapse">
+ <nz-collapse-panel
+ nzHeader="Contributors"
+ [nzActive]="false">
+ <div class="contributor-list">
+ <div
+ *ngFor="let contributor of datasetContributors"
+ class="contributor-card">
+ <button
+ *ngIf="userHasWriteAccess() || isOwner"
+ nz-button
+ nzType="text"
+ nzSize="small"
+ class="contributor-actions"
+ nz-dropdown
+ nzTrigger="click"
+ nzPlacement="bottomRight"
+ [nzDropdownMenu]="contributorActionsMenu"
+ (click)="selectedContributor = contributor">
+ <i
+ nz-icon
+ nzType="more"></i>
+ </button>
+ <div
+ class="contributor-field"
+ nz-tooltip
+ [nzTooltipTitle]="contributor.name">
+ <strong>Name:</strong> {{ contributor.name }}
+ </div>
+ <div class="contributor-field"><strong>Creator:</strong> {{
contributor.creator ? 'Yes' : 'No' }}</div>
+ <div
+ class="contributor-field"
+ nz-tooltip
+ [nzTooltipTitle]="contributor.email">
+ <strong>Email:</strong> {{ contributor.email }}
+ </div>
+ <div
+ class="contributor-field"
+ nz-tooltip
+ [nzTooltipTitle]="contributor.affiliation">
+ <strong>Affiliation:</strong> {{ contributor.affiliation }}
+ </div>
+ <div
+ *ngIf="contributor.comments"
+ class="contributor-field"
+ nz-tooltip
+ [nzTooltipTitle]="contributor.comments">
+ <strong>Comments:</strong> {{ contributor.comments }}
+ </div>
+ </div>
+ <div
+ *ngIf="userHasWriteAccess()"
+ class="contributor-card-add"
+ role="button"
+ tabindex="0"
+ (click)="onAddContributor()"
+ (keydown.enter)="onAddContributor()">
+ <i
+ nz-icon
+ nzType="plus"
+ class="add-icon"></i>
+ </div>
+ </div>
+ <nz-dropdown-menu #contributorActionsMenu="nzDropdownMenu">
+ <ul
+ nz-menu
+ class="contributor-actions-menu">
+ <li
+ *ngIf="userHasWriteAccess()"
+ nz-menu-item
+ (click)="onEditContributor(selectedContributor)">
+ <i
+ nz-icon
+ nzType="edit"></i>
+ Edit
+ </li>
+ <li
+ *ngIf="isOwner"
+ nz-menu-item
Review Comment:
Delete is currently gated by `isOwner`, which prevents non-owner users who
still have WRITE access from deleting contributors. The PR description (and
issue) indicate contributor updates should be allowed for WRITE access; delete
should follow the same rule as add/edit.
##########
frontend/src/app/dashboard/component/user/user-dataset/user-dataset-explorer/dataset-detail.component.html:
##########
@@ -90,6 +90,107 @@ <h2>Dataset: {{datasetName}}</h2>
[enableViewMore]="true">
</texera-markdown-description>
</div>
+
+ <nz-divider></nz-divider>
+
+ <!-- Contributor's section -->
+ <nz-collapse
+ nzGhost
+ nzExpandIconPosition="end"
+ class="contributors-collapse">
+ <nz-collapse-panel
+ nzHeader="Contributors"
+ [nzActive]="false">
+ <div class="contributor-list">
+ <div
+ *ngFor="let contributor of datasetContributors"
+ class="contributor-card">
+ <button
+ *ngIf="userHasWriteAccess() || isOwner"
+ nz-button
+ nzType="text"
+ nzSize="small"
+ class="contributor-actions"
+ nz-dropdown
+ nzTrigger="click"
+ nzPlacement="bottomRight"
+ [nzDropdownMenu]="contributorActionsMenu"
+ (click)="selectedContributor = contributor">
+ <i
+ nz-icon
+ nzType="more"></i>
+ </button>
+ <div
+ class="contributor-field"
+ nz-tooltip
+ [nzTooltipTitle]="contributor.name">
+ <strong>Name:</strong> {{ contributor.name }}
+ </div>
+ <div class="contributor-field"><strong>Creator:</strong> {{
contributor.creator ? 'Yes' : 'No' }}</div>
+ <div
+ class="contributor-field"
+ nz-tooltip
+ [nzTooltipTitle]="contributor.email">
+ <strong>Email:</strong> {{ contributor.email }}
+ </div>
+ <div
+ class="contributor-field"
+ nz-tooltip
+ [nzTooltipTitle]="contributor.affiliation">
+ <strong>Affiliation:</strong> {{ contributor.affiliation }}
+ </div>
+ <div
+ *ngIf="contributor.comments"
+ class="contributor-field"
+ nz-tooltip
+ [nzTooltipTitle]="contributor.comments">
+ <strong>Comments:</strong> {{ contributor.comments }}
+ </div>
+ </div>
+ <div
+ *ngIf="userHasWriteAccess()"
+ class="contributor-card-add"
+ role="button"
+ tabindex="0"
+ (click)="onAddContributor()"
+ (keydown.enter)="onAddContributor()">
+ <i
Review Comment:
The "Add" control uses `role="button"` and `tabindex="0"` but only handles
Enter. For keyboard accessibility it should also activate on Space (and ideally
prevent default scrolling).
##########
frontend/src/app/dashboard/component/user/user-dataset/user-dataset-explorer/dataset-detail.component.html:
##########
@@ -90,6 +90,107 @@ <h2>Dataset: {{datasetName}}</h2>
[enableViewMore]="true">
</texera-markdown-description>
</div>
+
+ <nz-divider></nz-divider>
+
+ <!-- Contributor's section -->
+ <nz-collapse
+ nzGhost
+ nzExpandIconPosition="end"
+ class="contributors-collapse">
+ <nz-collapse-panel
+ nzHeader="Contributors"
+ [nzActive]="false">
+ <div class="contributor-list">
+ <div
+ *ngFor="let contributor of datasetContributors"
+ class="contributor-card">
+ <button
+ *ngIf="userHasWriteAccess() || isOwner"
+ nz-button
+ nzType="text"
+ nzSize="small"
+ class="contributor-actions"
+ nz-dropdown
+ nzTrigger="click"
+ nzPlacement="bottomRight"
+ [nzDropdownMenu]="contributorActionsMenu"
+ (click)="selectedContributor = contributor">
+ <i
+ nz-icon
+ nzType="more"></i>
+ </button>
+ <div
+ class="contributor-field"
+ nz-tooltip
+ [nzTooltipTitle]="contributor.name">
+ <strong>Name:</strong> {{ contributor.name }}
+ </div>
+ <div class="contributor-field"><strong>Creator:</strong> {{
contributor.creator ? 'Yes' : 'No' }}</div>
+ <div
+ class="contributor-field"
+ nz-tooltip
+ [nzTooltipTitle]="contributor.email">
+ <strong>Email:</strong> {{ contributor.email }}
+ </div>
+ <div
+ class="contributor-field"
+ nz-tooltip
+ [nzTooltipTitle]="contributor.affiliation">
+ <strong>Affiliation:</strong> {{ contributor.affiliation }}
+ </div>
+ <div
+ *ngIf="contributor.comments"
+ class="contributor-field"
+ nz-tooltip
+ [nzTooltipTitle]="contributor.comments">
+ <strong>Comments:</strong> {{ contributor.comments }}
+ </div>
+ </div>
+ <div
+ *ngIf="userHasWriteAccess()"
+ class="contributor-card-add"
+ role="button"
+ tabindex="0"
+ (click)="onAddContributor()"
+ (keydown.enter)="onAddContributor()">
+ <i
+ nz-icon
+ nzType="plus"
+ class="add-icon"></i>
+ </div>
+ </div>
+ <nz-dropdown-menu #contributorActionsMenu="nzDropdownMenu">
+ <ul
+ nz-menu
+ class="contributor-actions-menu">
+ <li
+ *ngIf="userHasWriteAccess()"
+ nz-menu-item
+ (click)="onEditContributor(selectedContributor)">
+ <i
+ nz-icon
+ nzType="edit"></i>
+ Edit
+ </li>
+ <li
+ *ngIf="isOwner"
+ nz-menu-item
+ nzDanger
+ nz-popconfirm
+ [nzPopconfirmTitle]="'Delete contributor "' +
selectedContributor?.name + '"?'"
+ nzOkText="Delete"
Review Comment:
`nzPopconfirmTitle` is building a plain string, so the `"` HTML
entities will likely render literally in the confirmation dialog. Use normal
characters when constructing the title (or omit the extra quotes around the
name).
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]