-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add a build tree view and id components
- Loading branch information
Showing
12 changed files
with
240 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<script> | ||
export let id; | ||
// TODO where to get this path info? | ||
$: displayed = id.startsWith('/home/desk/dev/gro/') | ||
? id.slice('/home/desk/dev/gro/'.length - 1) | ||
: id; | ||
</script> | ||
|
||
<div class="build-id">{displayed}</div> | ||
|
||
<style> | ||
.build-id { | ||
color: var(--color_1_text); | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<script> | ||
export let buildName; | ||
</script> | ||
|
||
<span class="build-name">{buildName}</span> | ||
|
||
<style> | ||
.build-name { | ||
color: var(--color_2_text); | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<script> | ||
export let id; | ||
// TODO where to get this path info? | ||
$: displayed = id.startsWith('/home/desk/dev/gro/src/') | ||
? id.slice('/home/desk/dev/gro/src/'.length - 1) | ||
: id; | ||
</script> | ||
|
||
<span class="source-id">{displayed}</span> | ||
|
||
<style> | ||
.source-id { | ||
color: var(--color_0_text); | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<script> | ||
import {filterSelectedMetaItems} from './sourceTree.js'; | ||
import BuildId from './BuildId.svelte'; | ||
import SourceId from './SourceId.svelte'; | ||
export let sourceTree; | ||
export let selectedBuildNames; | ||
export const selectedSourceMeta = undefined; | ||
export const hoveredSourceMeta = undefined; | ||
$: filteredSourceMetaItems = filterSelectedMetaItems(sourceTree, selectedBuildNames); | ||
</script> | ||
|
||
<div> | ||
{#each filteredSourceMetaItems as sourceMeta (sourceMeta.cacheId)} | ||
{#each sourceMeta.buildNames as buildName (buildName)} | ||
{#if selectedBuildNames.includes(buildName)} | ||
<div class="root item bg"> | ||
<div class="content"> | ||
<SourceId id={sourceMeta.data.sourceId} /> | ||
</div> | ||
<div> | ||
{#each sourceMeta.buildsByBuildName.get(buildName) as build (build.id)} | ||
<div class="item bg"> | ||
<div class="content"> | ||
<BuildId id={build.id} /> | ||
</div> | ||
{#if build.dependencies} | ||
<div class="content bg"> | ||
<div> | ||
{#each build.dependencies as dependency (dependency.buildId)} | ||
<BuildId id={dependency.buildId} /> | ||
{/each} | ||
</div> | ||
</div> | ||
{/if} | ||
</div> | ||
{/each} | ||
</div> | ||
</div> | ||
{/if} | ||
{/each} | ||
{:else}<small><em>no builds selected</em></small>{/each} | ||
</div> | ||
|
||
<style> | ||
/* TODO name?? */ | ||
.content { | ||
display: flex; | ||
align-items: center; | ||
padding: var(--spacing_sm); | ||
} | ||
.root { | ||
margin-bottom: var(--spacing_md); | ||
} | ||
.item { | ||
display: flex; | ||
align-items: stretch; | ||
} | ||
.bg { | ||
background-color: var(--color_bg_layer); | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.