diff --git a/__snapshots__/repo-details--loading.png b/__snapshots__/repo-details--loading.png index 4ab3691..10ff513 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 2d65850..9f13b13 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 d13e065..f839e6c 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 9e667be..7613035 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 98a9383..8f9c04b 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 4eb8cbd..de2db61 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 82ca802..d6439c1 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 5334440..86e60c7 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 9f83068..702d1cc 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 885833e..82cacc0 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 index 112242f..a65c189 100644 Binary files a/__snapshots__/repo-details--no-web.png 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 ad642f6..efea889 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 567ee28..292b016 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 00e2bfe..18885b9 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 2a5d6ea..f737b39 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 77b5dd2..f378318 100644 --- a/__snapshots__/repo-details.test.js.snap +++ b/__snapshots__/repo-details.test.js.snap @@ -2,12 +2,24 @@ exports[`Repo/Details Long Details smoke-test 1`] = `
+

+ name +

+

+ Long Name that goes on and on and on and on and on and on and on and on and on +

+

+ identifier +

+

+ 9ee507fc4357d7ee16a5d8901bedcd103f23c17d +

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. - Lorem ipsum dolor sit amet, con... + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis quis nisl eget turpis congue molestie.

@@ -120,6 +132,18 @@ exports[`Repo/Details Long Details smoke-test 1`] = ` exports[`Repo/Details Long and No Spaces smoke-test 1`] = `
+

+ name +

+

+ LongNameLongNameLongNameLongNameLongNameLongNameLongNameLongName +

+

+ identifier +

+

+ 9ee507fc4357d7ee16a5d8901bedcd103f23c17d +

description

@@ -237,6 +261,18 @@ exports[`Repo/Details Long and No Spaces smoke-test 1`] = ` exports[`Repo/Details No Clone smoke-test 1`] = `
+

+ name +

+

+ Short Name +

+

+ identifier +

+

+ 9ee507fc4357d7ee16a5d8901bedcd103f23c17d +

description

@@ -347,7 +383,23 @@ exports[`Repo/Details No Clone smoke-test 1`] = ` exports[`Repo/Details No Description smoke-test 1`] = `
+

+ name +

+

+ Short Name +

+

+ identifier +

+

+ 9ee507fc4357d7ee16a5d8901bedcd103f23c17d +

+

+ description +

+ none
@@ -460,6 +512,18 @@ exports[`Repo/Details No Description smoke-test 1`] = ` exports[`Repo/Details No Maintainers or Relays smoke-test 1`] = `
+

+ name +

+

+ Short Name +

+

+ identifier +

+

+ 9ee507fc4357d7ee16a5d8901bedcd103f23c17d +

description

@@ -525,6 +589,18 @@ exports[`Repo/Details No Maintainers or Relays smoke-test 1`] = ` exports[`Repo/Details No Maintainers smoke-test 1`] = `
+

+ name +

+

+ Short Name +

+

+ identifier +

+

+ 9ee507fc4357d7ee16a5d8901bedcd103f23c17d +

description

@@ -596,7 +672,23 @@ exports[`Repo/Details No Maintainers smoke-test 1`] = ` exports[`Repo/Details No Name or Description smoke-test 1`] = `
+

+ name +

+
+ none +
+

+ identifier +

+

+ 9ee507fc4357d7ee16a5d8901bedcd103f23c17d +

+

+ description +

+ none
@@ -709,6 +801,18 @@ exports[`Repo/Details No Name or Description smoke-test 1`] = ` exports[`Repo/Details No Relays smoke-test 1`] = `
+

+ name +

+

+ Short Name +

+

+ identifier +

+

+ 9ee507fc4357d7ee16a5d8901bedcd103f23c17d +

description

@@ -820,6 +924,18 @@ exports[`Repo/Details No Relays smoke-test 1`] = ` exports[`Repo/Details No Tags smoke-test 1`] = `
+

+ name +

+

+ Short Name +

+

+ identifier +

+

+ 9ee507fc4357d7ee16a5d8901bedcd103f23c17d +

description

@@ -925,6 +1041,18 @@ exports[`Repo/Details No Tags smoke-test 1`] = ` exports[`Repo/Details No Web smoke-test 1`] = `
+

+ name +

+

+ Short Name +

+

+ identifier +

+

+ 9ee507fc4357d7ee16a5d8901bedcd103f23c17d +

description

@@ -1033,6 +1161,18 @@ exports[`Repo/Details No Web smoke-test 1`] = ` exports[`Repo/Details One Maintainer's Profile Has No displayName or Name smoke-test 1`] = `
+

+ name +

+

+ Short Name +

+

+ identifier +

+

+ 9ee507fc4357d7ee16a5d8901bedcd103f23c17d +

description

@@ -1146,6 +1286,18 @@ exports[`Repo/Details One Maintainer's Profile Has No displayName or Name smoke- exports[`Repo/Details One Maintainer's Profile Not Loaded smoke-test 1`] = `
+

+ name +

+

+ Short Name +

+

+ identifier +

+

+ 9ee507fc4357d7ee16a5d8901bedcd103f23c17d +

description

@@ -1260,6 +1412,18 @@ exports[`Repo/Details One Maintainer's Profile Not Loaded smoke-test 1`] = ` exports[`Repo/Details One Maintainer's Profile Only Has displayName But No Name smoke-test 1`] = `
+

+ name +

+

+ Short Name +

+

+ identifier +

+

+ 9ee507fc4357d7ee16a5d8901bedcd103f23c17d +

description

@@ -1377,6 +1541,18 @@ exports[`Repo/Details One Maintainer's Profile Only Has displayName But No Name exports[`Repo/Details Short Details smoke-test 1`] = `
+

+ name +

+

+ Short Name +

+

+ identifier +

+

+ 9ee507fc4357d7ee16a5d8901bedcd103f23c17d +

description

@@ -1448,6 +1624,18 @@ exports[`Repo/Details Short Details smoke-test 1`] = ` exports[`Repo/Details loading smoke-test 1`] = `
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/lib/components/repo/RepoDetails.svelte b/src/lib/components/repo/RepoDetails.svelte index 70b7473..d3bc44b 100644 --- a/src/lib/components/repo/RepoDetails.svelte +++ b/src/lib/components/repo/RepoDetails.svelte @@ -18,7 +18,9 @@ loading, } = event_defaults $: short_descrption = - description.length > 500 ? description.slice(0, 450) + '...' : description + !description && description.length > 500 + ? description.slice(0, 450) + '...' + : description
@@ -26,8 +28,31 @@
- {:else if description.length == 0} -
+ {:else if !name || name.length == 0} +

name

+
none
+ {:else} +

name

+

{name}

+ {/if} + {#if loading} +
+
+
+ {:else if !identifier || identifier.length == 0} +

identifier

+
none
+ {:else} +

identifier

+

{identifier}

+ {/if} + {#if loading} +
+
+
+ {:else if !short_descrption || description.length == 0} +

description

+
none
{:else}

description

{short_descrption}