Skip to content

Commit

Permalink
More visual improvements to how rendering.
Browse files Browse the repository at this point in the history
  • Loading branch information
amyjko committed Aug 23, 2024
1 parent a27b5ba commit f9ae4c1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
17 changes: 11 additions & 6 deletions src/lib/HowView.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
$: parent = $org.getHowParent(how.id);
$: index = parent?.how.indexOf(how.id) ?? -1;
$: length = parent?.how.length ?? -1;
$: subhows = how.how.map((h) => $org.getHow(h)).filter((h) => h !== undefined);
const org = getOrg();
const db = getDB();
Expand Down Expand Up @@ -264,11 +265,13 @@
{/if}
<ARCI {how} verbose={false} {editable} />
</div>
<div class="steps">
{#each how.how.map((h) => $org.getHow(h)).filter((h) => h !== undefined) as subhow (subhow.id)}
<svelte:self how={subhow} {process} {editable} />
{/each}
</div>
{#if subhows.length > 0}
<div class="steps">
{#each subhows as subhow (subhow.id)}
<svelte:self how={subhow} {process} {editable} />
{/each}
</div>
{/if}
</div>

<style>
Expand Down Expand Up @@ -317,6 +320,8 @@
margin-inline-start: 1em;
display: flex;
flex-direction: column;
gap: calc(2 * var(--padding));
gap: 1em;
padding-left: 1em;
border-left: 1px solid var(--border);
}
</style>
2 changes: 1 addition & 1 deletion src/routes/org/[orgid]/process/[processid]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,6 @@
margin-block-start: calc(2 * var(--padding));
display: flex;
flex-direction: column;
gap: var(--padding);
gap: 1em;
}
</style>

0 comments on commit f9ae4c1

Please sign in to comment.