Skip to content

Commit

Permalink
Use same node version on CI as locally
Browse files Browse the repository at this point in the history
  • Loading branch information
rudolfs committed Feb 3, 2025
1 parent 59eff61 commit 708e3ed
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check-unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20.9.0"
node-version: "22.11.0"
- name: Checkout
uses: actions/checkout@v4
- run: npm ci
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20.9.0"
node-version: "22.11.0"
- uses: actions/checkout@v4
- run: npm ci
- run: npm run check-js
Expand Down
69 changes: 69 additions & 0 deletions src/components/CommitsContainer.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<script lang="ts">
import type { Snippet } from "svelte";
import Border from "./Border.svelte";
import Icon from "./Icon.svelte";
import NakedButton from "./NakedButton.svelte";
interface Props {
leftHeader: Snippet;
children: Snippet;
expanded: boolean;
}
/* eslint-disable prefer-const */
let { leftHeader, children, expanded }: Props = $props();
/* eslint-enable prefer-const */
</script>

<style>
.header {
display: flex;
align-items: center;
height: 2rem;
padding-left: 0.25rem;
font-size: var(--font-size-small);
background-color: var(--color-background-default);
}
.left {
display: flex;
gap: 0.5rem;
align-items: center;
}
.divider {
width: calc(100% + 4px);
position: relative;
top: -6px;
left: -2px;
z-index: 1;
height: 2px;
background-color: var(--color-fill-ghost);
}
</style>

<Border
variant="ghost"
styleFlexDirection="column"
styleAlignItems="flex-start">
<div class="header" class:collapsed={!expanded}>
<div class="left">
<NakedButton
stylePadding="0 4px"
variant="ghost"
onclick={async () => {
expanded = !expanded;
}}>
<Icon name={expanded ? "chevron-down" : "chevron-right"} />
</NakedButton>
{@render leftHeader()}
</div>
</div>

{#if expanded}
<div class="divider"></div>
<div style:width="100%">
{@render children()}
</div>
{/if}
</Border>
14 changes: 7 additions & 7 deletions src/components/Revision.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import CobCommitTeaser from "./CobCommitTeaser.svelte";
import CommentComponent from "@app/components/Comment.svelte";
import CommentToggleInput from "@app/components/CommentToggleInput.svelte";
import File from "@app/components/File.svelte";
import CommitsContainer from "@app/components/CommitsContainer.svelte";
import Icon from "@app/components/Icon.svelte";
import Id from "./Id.svelte";
import NakedButton from "./NakedButton.svelte";
Expand Down Expand Up @@ -274,16 +274,16 @@
font-size: 0.875rem;
margin-left: 0.5rem;
gap: 0.5rem;
padding: 1rem 0.5rem 1rem 1rem;
padding: 1rem 0.5rem 0.5rem 1rem;
border-left: 1px solid var(--color-fill-separator);
}
.commit:last-of-type::after {
content: "";
position: absolute;
left: -18.5px;
top: 14px;
bottom: -1rem;
border-left: 4px solid var(--color-background-float);
bottom: -0.5rem;
border-left: 4px solid var(--color-background-default);
}
.commit-dot {
width: 4px;
Expand Down Expand Up @@ -416,12 +416,12 @@
<span class="txt-small">Loading…</span>
{:then commits}
<div style:margin-bottom="1rem">
<File expanded={filesExpanded}>
<CommitsContainer expanded={filesExpanded}>
{#snippet leftHeader()}
<div class="txt-semibold">Commits</div>
{/snippet}
{#snippet children()}
<div style:padding="1rem 1rem 0 1rem">
<div style:padding="0 1rem">
<div
class="global-flex txt-small"
style:color="var(--color-foreground-dim)">
Expand All @@ -438,7 +438,7 @@
</div>
</div>
{/snippet}
</File>
</CommitsContainer>
</div>
{/await}

Expand Down

0 comments on commit 708e3ed

Please sign in to comment.