diff --git a/__snapshots__/repo-summary-card--loading.png b/__snapshots__/repo-summary-card--loading.png new file mode 100644 index 0000000..ff264d3 Binary files /dev/null and b/__snapshots__/repo-summary-card--loading.png differ diff --git a/__snapshots__/repo-summary-card--long-and-no-spaces.png b/__snapshots__/repo-summary-card--long-and-no-spaces.png new file mode 100644 index 0000000..8740d35 Binary files /dev/null and b/__snapshots__/repo-summary-card--long-and-no-spaces.png differ diff --git a/__snapshots__/repo-summary-card--long-details.png b/__snapshots__/repo-summary-card--long-details.png new file mode 100644 index 0000000..11537d0 Binary files /dev/null and b/__snapshots__/repo-summary-card--long-details.png differ diff --git a/__snapshots__/repo-summary-card--no-details.png b/__snapshots__/repo-summary-card--no-details.png new file mode 100644 index 0000000..bfc78ff Binary files /dev/null and b/__snapshots__/repo-summary-card--no-details.png differ diff --git a/__snapshots__/repo-summary-card--short-details.png b/__snapshots__/repo-summary-card--short-details.png new file mode 100644 index 0000000..f7d92c1 Binary files /dev/null and b/__snapshots__/repo-summary-card--short-details.png differ diff --git a/__snapshots__/repo-summary-card.test.js.snap b/__snapshots__/repo-summary-card.test.js.snap new file mode 100644 index 0000000..8146410 --- /dev/null +++ b/__snapshots__/repo-summary-card.test.js.snap @@ -0,0 +1,63 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Repo/Summary/Card Long Details test 1`] = ` +
+
+

+ Long Name that goes on and on and on and on a... +

+

+ Lorem ipsum dolor sit amet, consectetur adipi... +

+
+
+`; + +exports[`Repo/Summary/Card Long and No Spaces test 1`] = ` +
+
+

+ LongNameLongNameLongNameLongNameLongNameLongN... +

+

+ LoremipsumLoremipsumLoremipsumLoremipsumLorem... +

+
+
+`; + +exports[`Repo/Summary/Card No Details test 1`] = ` +
+
+

+ Untitled +

+

+

+
+
+`; + +exports[`Repo/Summary/Card Short Details test 1`] = ` +
+
+

+ Short Name +

+

+ short description +

+
+
+`; + +exports[`Repo/Summary/Card loading test 1`] = ` +
+
+
+ + +
+
+
+`; diff --git a/__snapshots__/repo-summary-list--default.png b/__snapshots__/repo-summary-list--default.png new file mode 100644 index 0000000..6f67520 Binary files /dev/null and b/__snapshots__/repo-summary-list--default.png differ diff --git a/__snapshots__/repo-summary-list--empty.png b/__snapshots__/repo-summary-list--empty.png new file mode 100644 index 0000000..f315632 Binary files /dev/null and b/__snapshots__/repo-summary-list--empty.png differ diff --git a/__snapshots__/repo-summary-list--loading.png b/__snapshots__/repo-summary-list--loading.png new file mode 100644 index 0000000..c776f42 Binary files /dev/null and b/__snapshots__/repo-summary-list--loading.png differ diff --git a/__snapshots__/repo-summary-list--no-title.png b/__snapshots__/repo-summary-list--no-title.png new file mode 100644 index 0000000..fd10298 Binary files /dev/null and b/__snapshots__/repo-summary-list--no-title.png differ diff --git a/__snapshots__/repo-summary-list--partially-loaded.png b/__snapshots__/repo-summary-list--partially-loaded.png new file mode 100644 index 0000000..342e9bf Binary files /dev/null and b/__snapshots__/repo-summary-list--partially-loaded.png differ diff --git a/__snapshots__/repo-summary-list.test.js.snap b/__snapshots__/repo-summary-list.test.js.snap new file mode 100644 index 0000000..7bce699 --- /dev/null +++ b/__snapshots__/repo-summary-list.test.js.snap @@ -0,0 +1,151 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Repo/Summary/List Default test 1`] = ` +
+
+

+ Featured Repositories +

+
+
+
+

+ Short Name +

+

+ short description +

+
+
+
+
+

+ Long Name that goes on and on and on and on a... +

+

+ Lorem ipsum dolor sit amet, consectetur adipi... +

+
+
+
+
+

+ LongNameLongNameLongNameLongNameLongNameLongN... +

+

+ LoremipsumLoremipsumLoremipsumLoremipsumLorem... +

+
+
+
+`; + +exports[`Repo/Summary/List Empty test 1`] = ` +
+
+

+ Latest +

+
+

+ None +

+
+`; + +exports[`Repo/Summary/List Loading test 1`] = ` +
+
+

+ Latest +

+
+
+
+
+ + +
+
+
+
+
+
+ + +
+
+
+
+
+
+ + +
+
+
+
+`; + +exports[`Repo/Summary/List No Title test 1`] = ` +
+
+
+

+ Short Name +

+

+ short description +

+
+
+
+
+

+ Long Name that goes on and on and on and on a... +

+

+ Lorem ipsum dolor sit amet, consectetur adipi... +

+
+
+
+`; + +exports[`Repo/Summary/List Partially Loaded test 1`] = ` +
+
+

+ Latest +

+
+
+
+

+ Short Name +

+

+ short description +

+
+
+
+
+

+ Long Name that goes on and on and on and on a... +

+

+ Lorem ipsum dolor sit amet, consectetur adipi... +

+
+
+
+
+
+ + +
+
+
+
+`; diff --git a/src/lib/components/Repo.vectors.ts b/src/lib/components/Repo.vectors.ts new file mode 100644 index 0000000..4d15806 --- /dev/null +++ b/src/lib/components/Repo.vectors.ts @@ -0,0 +1,18 @@ +import type { Args as SummaryCardArgs } from "./RepoSummaryCard.svelte"; + +export let RepoSummaryCardArgsVectors = { + Short: { + name: "Short Name", + description: "short description", + } as SummaryCardArgs, + Long: { + name: "Long Name that goes on and on and on and on and on and on and on and on and on", + description: + "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis quis nisl eget turpis congue molestie. Nulla vitae purus nec augue accumsan facilisis sed sed ligula. Vestibulum sed risus lacinia risus lacinia molestie. Ut lorem quam, consequat eget tempus in, rhoncus vel nunc. Duis efficitur a leo vel sodales. Nam id fermentum lacus. Etiam nec placerat velit. Praesent ac consectetur est. Aenean iaculis commodo enim.", + } as SummaryCardArgs, + LongNoSpaces: { + name: "LongNameLongNameLongNameLongNameLongNameLongNameLongNameLongName", + description: + "LoremipsumLoremipsumLoremipsumLoremipsumLoremipsumLoremipsumLoremipsumLoremipsumLoremipsumLoremipsumLoremipsumLoremipsumLoremipsumLoremipsumLoremipsumLoremipsumLoremipsumLoremipsumLoremipsumLoremipsumLoremipsumLoremipsumLoremipsumLoremipsumLoremipsum>", + } as SummaryCardArgs, +}; \ No newline at end of file diff --git a/src/lib/components/RepoSummaryCard.stories.svelte b/src/lib/components/RepoSummaryCard.stories.svelte new file mode 100644 index 0000000..ca99748 --- /dev/null +++ b/src/lib/components/RepoSummaryCard.stories.svelte @@ -0,0 +1,26 @@ + + + + + + + + + + + + + diff --git a/src/lib/components/RepoSummaryCard.svelte b/src/lib/components/RepoSummaryCard.svelte new file mode 100644 index 0000000..b9d02df --- /dev/null +++ b/src/lib/components/RepoSummaryCard.svelte @@ -0,0 +1,59 @@ + + + + +{#if loading} +
+
+
+ +
+
+
+{:else} +
+
+

{short_name}

+

{short_descrption}

+
+
+{/if} + + diff --git a/src/lib/components/ReposFeatured.svelte b/src/lib/components/ReposFeatured.svelte deleted file mode 100644 index 0f6bf67..0000000 --- a/src/lib/components/ReposFeatured.svelte +++ /dev/null @@ -1,16 +0,0 @@ -
-
-

Featured Repositories

-
- {#each ["1", "2", "3"] as suffix} -
-
-

Placeholder Repo {suffix}

-

Description of repository

-
- -
-
-
- {/each} -
diff --git a/src/lib/components/ReposSummaryList.stories.svelte b/src/lib/components/ReposSummaryList.stories.svelte new file mode 100644 index 0000000..83daabf --- /dev/null +++ b/src/lib/components/ReposSummaryList.stories.svelte @@ -0,0 +1,56 @@ + + + + + + + + + + + + diff --git a/src/lib/components/ReposSummaryList.svelte b/src/lib/components/ReposSummaryList.svelte new file mode 100644 index 0000000..d6f4d43 --- /dev/null +++ b/src/lib/components/ReposSummaryList.svelte @@ -0,0 +1,33 @@ + + +
+ {#if title.length > 0} +
+

{title}

+
+ {/if} + {#if repos.length == 0 && !loading} +

None

+ {/if} + {#each repos as { name, description }} + + {/each} + {#if loading} + + {#if repos.length == 0} + + + {/if} + {/if} +
diff --git a/src/lib/wrappers/ReposRecent.svelte b/src/lib/wrappers/ReposRecent.svelte new file mode 100644 index 0000000..fbe8a36 --- /dev/null +++ b/src/lib/wrappers/ReposRecent.svelte @@ -0,0 +1,32 @@ + + + diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 4c777cf..5f5b1ab 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -1,5 +1,5 @@
@@ -13,6 +13,6 @@
- +