Skip to content

Fix PR file tree folders no longer collapsing (#22864) #22872

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions web_src/js/components/DiffFileTreeItem.vue
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
/>
<a
v-if="item.isFile"
class="file ellipsis"
class="file ellipsis muted"
:href="item.isFile ? '#diff-' + item.file.NameHash : ''"
>{{ item.name }}</a>
<SvgIcon
@@ -68,7 +68,7 @@ export default {
if (itemIsFile) {
return;
}
this.$set(this, 'collapsed', !this.collapsed);
this.collapsed = !this.collapsed;
},
getIconForDiffType(pType) {
const diffTypes = {
@@ -88,6 +88,7 @@ export default {
span.svg-icon.status {
float: right;
}

span.svg-icon.file {
color: var(--color-secondary-dark-7);
}
@@ -127,6 +128,8 @@ span.svg-icon.octicon-diff-renamed {
div.directory {
display: grid;
grid-template-columns: 18px 20px auto;
user-select: none;
cursor: pointer;
}

div.directory:hover {
14 changes: 14 additions & 0 deletions web_src/less/_repository.less
Original file line number Diff line number Diff line change
@@ -1608,6 +1608,20 @@
margin-right: .25rem;
}

// Because the translations contain the <strong> we need to style with nth-of-type

.diff-detail-stats strong:nth-of-type(1) {
color: var(--color-yellow);
}

.diff-detail-stats strong:nth-of-type(2) {
color: var(--color-green);
}

.diff-detail-stats strong:nth-of-type(3) {
color: var(--color-red);
}

.diff-detail-stats {
@media (max-width: 480px) {
font-size: 0;