diff --git a/__snapshots__/repo-details--loading.png b/__snapshots__/repo-details--loading.png index 6e5d905..4ab3691 100644 Binary files a/__snapshots__/repo-details--loading.png and b/__snapshots__/repo-details--loading.png differ diff --git a/__snapshots__/repo-details--long-and-no-spaces.png b/__snapshots__/repo-details--long-and-no-spaces.png index ac79911..2d65850 100644 Binary files a/__snapshots__/repo-details--long-and-no-spaces.png and b/__snapshots__/repo-details--long-and-no-spaces.png differ diff --git a/__snapshots__/repo-details--long-details.png b/__snapshots__/repo-details--long-details.png index 55ac4f9..d13e065 100644 Binary files a/__snapshots__/repo-details--long-details.png and b/__snapshots__/repo-details--long-details.png differ diff --git a/__snapshots__/repo-details--no-clone.png b/__snapshots__/repo-details--no-clone.png index bb6eefe..9e667be 100644 Binary files a/__snapshots__/repo-details--no-clone.png and b/__snapshots__/repo-details--no-clone.png differ diff --git a/__snapshots__/repo-details--no-description.png b/__snapshots__/repo-details--no-description.png index d8397d9..98a9383 100644 Binary files a/__snapshots__/repo-details--no-description.png and b/__snapshots__/repo-details--no-description.png differ diff --git a/__snapshots__/repo-details--no-maintainers-or-relays.png b/__snapshots__/repo-details--no-maintainers-or-relays.png index bb41c16..4eb8cbd 100644 Binary files a/__snapshots__/repo-details--no-maintainers-or-relays.png and b/__snapshots__/repo-details--no-maintainers-or-relays.png differ diff --git a/__snapshots__/repo-details--no-maintainers.png b/__snapshots__/repo-details--no-maintainers.png index 494eb2a..82ca802 100644 Binary files a/__snapshots__/repo-details--no-maintainers.png and b/__snapshots__/repo-details--no-maintainers.png differ diff --git a/__snapshots__/repo-details--no-name-or-description.png b/__snapshots__/repo-details--no-name-or-description.png index cf26994..5334440 100644 Binary files a/__snapshots__/repo-details--no-name-or-description.png and b/__snapshots__/repo-details--no-name-or-description.png differ diff --git a/__snapshots__/repo-details--no-relays.png b/__snapshots__/repo-details--no-relays.png index 9c82cfd..9f83068 100644 Binary files a/__snapshots__/repo-details--no-relays.png and b/__snapshots__/repo-details--no-relays.png differ diff --git a/__snapshots__/repo-details--no-tags.png b/__snapshots__/repo-details--no-tags.png index 6676bf3..885833e 100644 Binary files a/__snapshots__/repo-details--no-tags.png and b/__snapshots__/repo-details--no-tags.png differ diff --git a/__snapshots__/repo-details--no-web.png b/__snapshots__/repo-details--no-web.png new file mode 100644 index 0000000..112242f Binary files /dev/null and b/__snapshots__/repo-details--no-web.png differ diff --git a/__snapshots__/repo-details--one-maintainer-s-profile-has-no-display-name-or-name.png b/__snapshots__/repo-details--one-maintainer-s-profile-has-no-display-name-or-name.png index 573a940..ad642f6 100644 Binary files a/__snapshots__/repo-details--one-maintainer-s-profile-has-no-display-name-or-name.png and b/__snapshots__/repo-details--one-maintainer-s-profile-has-no-display-name-or-name.png differ diff --git a/__snapshots__/repo-details--one-maintainer-s-profile-not-loaded.png b/__snapshots__/repo-details--one-maintainer-s-profile-not-loaded.png index f3b6bac..567ee28 100644 Binary files a/__snapshots__/repo-details--one-maintainer-s-profile-not-loaded.png and b/__snapshots__/repo-details--one-maintainer-s-profile-not-loaded.png differ diff --git a/__snapshots__/repo-details--one-maintainer-s-profile-only-has-display-name-but-no-name.png b/__snapshots__/repo-details--one-maintainer-s-profile-only-has-display-name-but-no-name.png index 891d8b7..00e2bfe 100644 Binary files a/__snapshots__/repo-details--one-maintainer-s-profile-only-has-display-name-but-no-name.png and b/__snapshots__/repo-details--one-maintainer-s-profile-only-has-display-name-but-no-name.png differ diff --git a/__snapshots__/repo-details--short-details.png b/__snapshots__/repo-details--short-details.png index 6e73754..2a5d6ea 100644 Binary files a/__snapshots__/repo-details--short-details.png and b/__snapshots__/repo-details--short-details.png differ diff --git a/__snapshots__/repo-details.test.js.snap b/__snapshots__/repo-details.test.js.snap index 73bdcd0..77b5dd2 100644 --- a/__snapshots__/repo-details.test.js.snap +++ b/__snapshots__/repo-details.test.js.snap @@ -29,11 +29,28 @@ exports[`Repo/Details Long Details smoke-test 1`] = ` github.com/example/example +
+

+ websites +

+ + https://gitworkshop.dev/repo/example + + + https://example.com + +

maintainers @@ -88,13 +105,13 @@ exports[`Repo/Details Long Details smoke-test 1`] = `

relays

-
+
relay.damus.io
-
+
relay.snort.social
-
+
relayable.org
@@ -129,11 +146,28 @@ exports[`Repo/Details Long and No Spaces smoke-test 1`] = ` github.com/example/example
+
+

+ websites +

+ + https://gitworkshop.dev/repo/example + + + https://example.com + +

maintainers @@ -188,13 +222,13 @@ exports[`Repo/Details Long and No Spaces smoke-test 1`] = `

relays

-
+
relay.damus.io
-
+
relay.snort.social
-
+
relayable.org
@@ -227,6 +261,23 @@ exports[`Repo/Details No Clone smoke-test 1`] = `
+
+

+ websites +

+ + https://gitworkshop.dev/repo/example + + + https://example.com + +

maintainers @@ -281,13 +332,13 @@ exports[`Repo/Details No Clone smoke-test 1`] = `

relays

-
+
relay.damus.io
-
+
relay.snort.social
-
+
relayable.org
@@ -318,11 +369,28 @@ exports[`Repo/Details No Description smoke-test 1`] = ` github.com/example/example
+

maintainers @@ -377,13 +445,13 @@ exports[`Repo/Details No Description smoke-test 1`] = `

relays

-
+
relay.damus.io
-
+
relay.snort.social
-
+
relayable.org
@@ -418,17 +486,38 @@ exports[`Repo/Details No Maintainers or Relays smoke-test 1`] = ` github.com/example/example
+
+

+ relays +

+ none
@@ -462,11 +551,28 @@ exports[`Repo/Details No Maintainers smoke-test 1`] = ` github.com/example/example
+
@@ -475,13 +581,13 @@ exports[`Repo/Details No Maintainers smoke-test 1`] = `

relays

-
+
relay.damus.io
-
+
relay.snort.social
-
+
relayable.org
@@ -512,11 +618,28 @@ exports[`Repo/Details No Name or Description smoke-test 1`] = ` github.com/example/example
+

maintainers @@ -571,13 +694,13 @@ exports[`Repo/Details No Name or Description smoke-test 1`] = `

relays

-
+
relay.damus.io
-
+
relay.snort.social
-
+
relayable.org
@@ -612,11 +735,28 @@ exports[`Repo/Details No Relays smoke-test 1`] = ` github.com/example/example
+

maintainers @@ -668,7 +808,11 @@ exports[`Repo/Details No Relays smoke-test 1`] = `

+

+ relays +

+ none
@@ -690,11 +834,28 @@ exports[`Repo/Details No Tags smoke-test 1`] = ` github.com/example/example
+

maintainers @@ -749,13 +910,121 @@ exports[`Repo/Details No Tags smoke-test 1`] = `

relays

-
+
relay.damus.io
-
+
relay.snort.social
-
+
+ relayable.org +
+
+
+`; + +exports[`Repo/Details No Web smoke-test 1`] = ` +
+

+ description +

+

+ short description +

+
+
+ svelte +
+
+ nostr +
+
+ code-collaboration +
+
+ git +
+
+ +
+

+ websites +

+
+ none +
+
+
+

+ maintainers +

+
+
+
+
+ carole +
+
+
+ carole +
+
+
+
+
+
+
+ bob +
+
+
+ bob +
+
+
+
+
+
+
+ steve +
+
+
+ steve +
+
+
+
+
+

+ relays +

+
+ relay.damus.io +
+
+ relay.snort.social +
+
relayable.org
@@ -790,11 +1059,28 @@ exports[`Repo/Details One Maintainer's Profile Has No displayName or Name smoke- github.com/example/example
+

maintainers @@ -845,13 +1131,13 @@ exports[`Repo/Details One Maintainer's Profile Has No displayName or Name smoke-

relays

-
+
relay.damus.io
-
+
relay.snort.social
-
+
relayable.org
@@ -886,11 +1172,28 @@ exports[`Repo/Details One Maintainer's Profile Not Loaded smoke-test 1`] = ` github.com/example/example
+

maintainers @@ -942,13 +1245,13 @@ exports[`Repo/Details One Maintainer's Profile Not Loaded smoke-test 1`] = `

relays

-
+
relay.damus.io
-
+
relay.snort.social
-
+
relayable.org
@@ -983,11 +1286,28 @@ exports[`Repo/Details One Maintainer's Profile Only Has displayName But No Name github.com/example/example
+

maintainers @@ -1042,13 +1362,13 @@ exports[`Repo/Details One Maintainer's Profile Only Has displayName But No Name

relays

-
+
relay.damus.io
-
+
relay.snort.social
-
+
relayable.org
@@ -1083,11 +1403,28 @@ exports[`Repo/Details Short Details smoke-test 1`] = ` github.com/example/example
+
@@ -1096,13 +1433,13 @@ exports[`Repo/Details Short Details smoke-test 1`] = `

relays

-
+
relay.damus.io
-
+
relay.snort.social
-
+
relayable.org
@@ -1145,5 +1482,13 @@ exports[`Repo/Details loading smoke-test 1`] = `
+
+
+
+
+
+
+
+
`; diff --git a/src/lib/components/repo/RepoDetails.stories.svelte b/src/lib/components/repo/RepoDetails.stories.svelte index 35a5c2b..abcd8bd 100644 --- a/src/lib/components/repo/RepoDetails.stories.svelte +++ b/src/lib/components/repo/RepoDetails.stories.svelte @@ -29,6 +29,8 @@ + + {clone} {/if}
+
+ {#if loading} +
+
+
+ {:else if web.length == 0} +

websites

+
none
+ {:else} +

websites

+ {#each web as site} + + {site} + + {/each} + {/if} +
+
{#if loading}
@@ -79,11 +101,12 @@
{:else if relays.length == 0} -
+

relays

+
none
{:else}

relays

{#each relays as relay} -
{relay}
+
{relay}
{/each} {/if}
diff --git a/src/lib/components/repo/vectors.ts b/src/lib/components/repo/vectors.ts index 1e77a54..a738a8f 100644 --- a/src/lib/components/repo/vectors.ts +++ b/src/lib/components/repo/vectors.ts @@ -47,6 +47,10 @@ const base: RepoEvent = { withName(UserVectors.default, 'steve'), ], loading: false, + event_id: '', + web: ['https://gitworkshop.dev/repo/example', 'https://example.com'], + referenced_by: [], + created_at: 0, } export const RepoDetailsArgsVectors = { @@ -67,6 +71,7 @@ export const RepoDetailsArgsVectors = { NoDescription: { ...base, description: '' } as RepoEvent, NoTags: { ...base, tags: [] } as RepoEvent, NoGitServer: { ...base, clone: '' } as RepoEvent, + NoWeb: { ...base, web: [] } as RepoEvent, MaintainersOneProfileNotLoaded: { ...base, maintainers: [