Fix review section toggle

This also makes all section toggles more robust against reordering of
CSS classes.
This commit is contained in:
Rūdolfs Ošiņš
2025-04-02 15:35:24 +02:00
parent b770fac336
commit 94c85ad06b
4 changed files with 8 additions and 16 deletions
+1 -4
View File
@@ -106,9 +106,6 @@
background-color: var(--color-background-float);
color: var(--color-foreground-contrast) !important;
}
.hide {
display: none;
}
</style>
<div
@@ -135,7 +132,7 @@
{/if}
</div>
<div class:hide={hideChanges}>
<div style:display={hideChanges ? "none" : "revert"}>
{#await cachedListCommits(rid, revision.base, revision.head) then commits}
<div style:margin-bottom="1rem">
<CommitsContainer>
+3 -4
View File
@@ -90,9 +90,6 @@
margin-left: 1.25rem;
background-color: var(--color-background-float);
}
.hide {
display: none;
}
</style>
<div style:margin={hideDiscussion ? "1.5rem 0" : "1.5rem 0 2.5rem 0"}>
@@ -130,7 +127,9 @@
</NakedButton>
</div>
</div>
<div class:hide={hideDiscussion} style:margin-top="1rem">
<div
style:display={hideDiscussion ? "none" : "revert"}
style:margin-top="1rem">
{#each commentThreads as thread}
<ThreadComponent
{thread}
+1 -4
View File
@@ -71,9 +71,6 @@
</script>
<style>
.hide {
display: none;
}
.review-list {
margin-top: 1rem;
display: flex;
@@ -125,7 +122,7 @@
</div>
{#if revision.reviews && revision.reviews.length}
<div class:hide={hideReviews} class="review-list">
<div style:display={hideReviews ? "none" : "revert"} class="review-list">
{#each revision.reviews as review, idx}
<ReviewTeaser
{rid}
+3 -4
View File
@@ -344,9 +344,6 @@
margin-bottom: 0.5rem;
color: var(--color-foreground-dim);
}
.hide {
display: none;
}
</style>
<Layout publicKey={config.publicKey}>
@@ -521,7 +518,9 @@
<div class="txt-semibold global-flex txt-regular">Timeline</div>
</NakedButton>
</div>
<div class:hide={hideTimeline} style:margin-top="1rem">
<div
style:display={hideTimeline ? "none" : "revert"}
style:margin-top="1rem">
<IssueTimeline {activity} />
</div>
</div>