From 6863d10ad18c593a1cedd30230982f89cbe485e2 Mon Sep 17 00:00:00 2001 From: oppiliappan Date: Tue, 22 Sep 2026 11:51:42 +0100 Subject: [PATCH] web/organizations: render the overview from the profile record --- .../profile/ProfileChrome.stories.svelte | 1 + .../profile/ProfileSocialLinks.svelte | 8 +++- .../organization/OrganizationChrome.svelte | 35 +++----------- .../OrganizationOnboardingBanner.svelte | 48 ------------------- .../OrganizationOverviewTab.svelte | 48 +------------------ .../components/profile/organization/mock.ts | 20 -------- web/src/routes/[handle]/+page.ts | 1 + 7 files changed, 18 insertions(+), 143 deletions(-) delete mode 100644 web/src/lib/components/profile/organization/OrganizationOnboardingBanner.svelte diff --git a/web/src/lib/components/profile/ProfileChrome.stories.svelte b/web/src/lib/components/profile/ProfileChrome.stories.svelte index 46e3fc18d..3eb10e773 100644 --- a/web/src/lib/components/profile/ProfileChrome.stories.svelte +++ b/web/src/lib/components/profile/ProfileChrome.stories.svelte @@ -101,6 +101,7 @@ await expect( context.canvas.queryByRole("link", { name: "Settings" }) ).not.toBeInTheDocument(); + await expect(context.canvas.queryByText("Managed by")).not.toBeInTheDocument(); }; const organizationAsController = async (context: PlayContext) => { await organizationOverview(context); diff --git a/web/src/lib/components/profile/ProfileSocialLinks.svelte b/web/src/lib/components/profile/ProfileSocialLinks.svelte index 1a0898483..06b9fd6d3 100644 --- a/web/src/lib/components/profile/ProfileSocialLinks.svelte +++ b/web/src/lib/components/profile/ProfileSocialLinks.svelte @@ -1,4 +1,5 @@ -
+
-
- - - -
+
diff --git a/web/src/lib/components/profile/organization/OrganizationOnboardingBanner.svelte b/web/src/lib/components/profile/organization/OrganizationOnboardingBanner.svelte deleted file mode 100644 index 794a460f1..000000000 --- a/web/src/lib/components/profile/organization/OrganizationOnboardingBanner.svelte +++ /dev/null @@ -1,48 +0,0 @@ - - -{#if !dismissed} -
-
-{/if} diff --git a/web/src/lib/components/profile/organization/OrganizationOverviewTab.svelte b/web/src/lib/components/profile/organization/OrganizationOverviewTab.svelte index 6a3b92c38..8a52b96e4 100644 --- a/web/src/lib/components/profile/organization/OrganizationOverviewTab.svelte +++ b/web/src/lib/components/profile/organization/OrganizationOverviewTab.svelte @@ -1,18 +1,8 @@
- {#if !organizationOnboardingComplete} - - {/if} - -
-

Languages

-
- {#each organizationLanguages as language (language)} - - - {language} - - {/each} -
-
- -
-

Topics

-
- {#each organizationTopics as topic (topic)} - {topic} - {/each} -
-
+
- +
diff --git a/web/src/lib/components/profile/organization/mock.ts b/web/src/lib/components/profile/organization/mock.ts index d24584709..55fb745e2 100644 --- a/web/src/lib/components/profile/organization/mock.ts +++ b/web/src/lib/components/profile/organization/mock.ts @@ -1,14 +1,5 @@ import type { PersonData, RepoCardData } from "$lib/components/profile/types"; -export const organizationLanguages = ["Go", "Rust", "JavaScript"]; - -export const organizationTopics = ["climate-change", "biology", "astronomy", "design"]; - -export const organizationManager = { - did: "did:plc:organization-manager", - handle: "user.tld" -}; - export const organizationMembers: PersonData[] = Array.from({ length: 9 }, (_, index) => ({ did: `did:plc:organization-member-${index + 1}`, handle: index === 0 ? "user.tld" : `member-${index + 1}.tld`, @@ -19,17 +10,6 @@ export const organizationMembers: PersonData[] = Array.from({ length: 9 }, (_, i isSelf: false })); -export const organizationMemberCount = 86; - -export const organizationRepoStats = { - issues: 94, - pulls: 76 -}; - -export const viewerIsOrganizationOwner = true; - -export const organizationOnboardingComplete = false; - export interface MemberCandidate { did: string; handle: string; diff --git a/web/src/routes/[handle]/+page.ts b/web/src/routes/[handle]/+page.ts index e61df9af2..59288b7d5 100644 --- a/web/src/routes/[handle]/+page.ts +++ b/web/src/routes/[handle]/+page.ts @@ -106,6 +106,7 @@ export const load: PageLoad = async (event) => { fetchProfileActivity(ctx, { did, handle }) ) ); + // TODO: language logic return settle({ tab: "overview" as const, overview: await settle({ pinned: stream(pinned), activity: stream(activity) }) -- 2.51.2