Files
Alexander Brandon Coles e419c22c95 [DREAM-707] Stabilize Angular track keys
Use stable scalar keys for Angular `@for` loops with rebuilt object
values across breadcrumbs and related list templates to avoid DOM
recreation warnings.

https://community.openproject.org/wp/DREAM-707
2026-06-08 08:17:19 +01:00

73 lines
2.2 KiB
HTML

<a
class='op-pull-request--link'
[href]="pullRequest.htmlUrl"
target="blank"
[textContent]="pullRequest.repository + '#' + pullRequest.number"
></a>
<div
class='op-pull-request--title'
[textContent]="pullRequest.title"
></div>
<div class="op-pull-request--info">
{{ text.label_created_by }}
@if (pullRequest._embedded.githubUser) {
<div class="op-principal"
>
<img
alt='PR author avatar'
class='op-pull-request--avatar op-avatar op-avatar_mini op-principal--avatar'
[src]="pullRequest._embedded.githubUser.avatarUrl"
/>
<a
[href]="pullRequest._embedded.githubUser.htmlUrl"
[textContent]="pullRequest._embedded.githubUser.login"
class="op-principal--name"
></a>
</div>
}
.
<span class='op-pull-request--date'>
{{ text.label_last_updated_on }}
<op-date-time [dateTimeValue]="pullRequest.githubUpdatedAt" />
</span>.
</div>
<op-github-pull-request-state class='op-pull-request--state'
[state]="state" />
@if (pullRequest._embedded.checkRuns?.length) {
<span class="op-pull-request--checks-label"
[textContent]="text.label_actions"
></span>
}
@if (pullRequest._embedded.checkRuns?.length) {
<ul
[attr.aria-label]="text.label_actions"
class='op-pull-request--checks'
>
@for (checkRun of pullRequest._embedded.checkRuns; track checkRun.htmlUrl || checkRun.detailsUrl || checkRun.name) {
<li class='op-pr-check'>
<span class='op-pr-check--state-icon' [ngClass]="'op-pr-check--state-icon_' + checkRunState(checkRun)">
<op-icon icon-classes="icon-{{ checkRunStateIcon(checkRun) }}"
[icon-title]="checkRunStateText(checkRun)" />
</span>
<span class='op-pr-check--avatar'><img alt='app owner avatar' [src]="checkRun.appOwnerAvatarUrl"/></span>
<span class='op-pr-check--info'>
<span class='op-pr-check--name' [textContent]="checkRun.name"></span>
<span class='op-pr-check--state' [textContent]="checkRunStateText(checkRun)"></span>
</span>
<span class='op-pr-check--details'>
<a [href]="checkRun.detailsUrl">
{{ text.label_details }}
</a>
</span>
</li>
}
</ul>
}