Radish alpha
r
rad:z4D5UCArafTzTQpDZNQRuqswh3ury
Radicle desktop app
Radicle
Git
Fix review section toggle
Open rudolfs opened 1 year ago

This also makes all section toggles more robust against reordering of CSS classes.

Fixes 👉 issue.

check check-e2e

👉 Workflow runs 👉 Branch on GitHub

4 files changed +8 -16 b770fac3 94c85ad0
modified src/components/Changes.svelte
@@ -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>
modified src/components/Discussion.svelte
@@ -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}
modified src/components/Reviews.svelte
@@ -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}
modified src/views/repo/Issue.svelte
@@ -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>