Skip to content

Commit e48b1b4

Browse files
authored
chore: enable organization page (IN-1174) (#2006)
Signed-off-by: Joana Maia <jmaia@contractor.linuxfoundation.org>
1 parent 0b87b84 commit e48b1b4

9 files changed

Lines changed: 70 additions & 28 deletions

File tree

frontend/app/components/modules/explore/components/top-organizations.vue

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,14 @@ SPDX-License-Identifier: MIT
1717
v-for="(row, index) in tableData"
1818
:key="row.id"
1919
class="lfx-table-row text-inherit"
20+
:class="row.slug ? 'cursor-pointer' : ''"
2021
>
21-
<div class="name-col grow !gap-3">
22+
<component
23+
:is="row.slug ? nuxtLink : 'div'"
24+
:to="row.slug ? { name: LfxRoutes.ORGANIZATION, params: { orgSlug: row.slug } } : undefined"
25+
class="name-col grow !gap-3 text-inherit no-underline"
26+
:class="row.slug ? 'hover:text-brand-500 transition-colors cursor-pointer' : ''"
27+
>
2228
<div class="mr-1 text-neutral-400 text-xs">#{{ index + 1 }}</div>
2329
<lfx-avatar
2430
:src="row.logo"
@@ -31,18 +37,19 @@ SPDX-License-Identifier: MIT
3137
>
3238
{{ row.displayName }}
3339
</div>
34-
</div>
40+
</component>
3541
</div>
3642
</div>
3743
</lfx-project-load-state>
3844
</template>
3945

4046
<script setup lang="ts">
41-
import { computed, onServerPrefetch } from 'vue';
47+
import { computed, resolveComponent, onServerPrefetch } from 'vue';
4248
import { EXPLORE_API_SERVICE } from '~/components/modules/explore/services/explore.api.service';
4349
import LfxAvatar from '~/components/uikit/avatar/avatar.vue';
4450
import { isEmptyData } from '~/components/shared/utils/helper';
4551
import LfxProjectLoadState from '~/components/modules/project/components/shared/load-state.vue';
52+
import { LfxRoutes } from '~/components/shared/types/routes';
4653
4754
const props = defineProps<{
4855
isFullList?: boolean;
@@ -52,6 +59,7 @@ const { data, isPending, status, error, suspense } = EXPLORE_API_SERVICE.fetchTo
5259
props.isFullList ? 100 : 10,
5360
);
5461
62+
const nuxtLink = resolveComponent('NuxtLink');
5563
const tableData = computed(() => data.value);
5664
5765
const isEmpty = computed(() => isEmptyData(tableData.value as unknown as Record<string, unknown>[]));

frontend/app/components/modules/leaderboards/components/minimize-row-displays/organization-row.vue

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,16 @@ SPDX-License-Identifier: MIT
44
-->
55

66
<template>
7-
<div class="flex items-center w-full">
7+
<div
8+
class="flex items-center w-full"
9+
:class="item.slug ? 'cursor-pointer' : ''"
10+
>
811
<!-- Organization info -->
912
<component
10-
:is="isTeamMember && item.slug ? nuxtLink : 'div'"
11-
:to="isTeamMember && item.slug ? { name: LfxRoutes.ORGANIZATION, params: { orgSlug: item.slug } } : undefined"
13+
:is="item.slug ? nuxtLink : 'div'"
14+
:to="item.slug ? { name: LfxRoutes.ORGANIZATION, params: { orgSlug: item.slug } } : undefined"
1215
class="flex-1 min-w-0 flex gap-3 items-center text-inherit no-underline"
13-
:class="isTeamMember && item.slug ? 'hover:text-brand-500 transition-colors cursor-pointer' : ''"
16+
:class="item.slug ? 'hover:text-brand-500 transition-colors cursor-pointer' : ''"
1417
>
1518
<lfx-avatar
1619
:src="item.logoUrl"
@@ -35,22 +38,19 @@ SPDX-License-Identifier: MIT
3538
</template>
3639

3740
<script setup lang="ts">
38-
import { computed, resolveComponent } from 'vue';
41+
import { resolveComponent } from 'vue';
3942
import type { LeaderboardConfig } from '../../config/types/leaderboard.types';
4043
import NumericDataDisplay from '../data-displays/numeric.vue';
4144
import type { Leaderboard } from '~~/types/leaderboard/leaderboard';
4245
import LfxAvatar from '~/components/uikit/avatar/avatar.vue';
4346
import { LfxRoutes } from '~/components/shared/types/routes';
44-
import { useAuth } from '~~/composables/useAuth';
4547
4648
defineProps<{
4749
item: Leaderboard;
4850
leaderboardConfig: LeaderboardConfig;
4951
}>();
5052
5153
const nuxtLink = resolveComponent('NuxtLink');
52-
const { user } = useAuth();
53-
const isTeamMember = computed(() => !!user.value?.isLfInsightsTeamMember);
5454
</script>
5555

5656
<script lang="ts">

frontend/app/components/modules/leaderboards/components/row-displays/organization-row.vue

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,21 @@ SPDX-License-Identifier: MIT
44
-->
55

66
<template>
7-
<div class="flex items-center w-full hover:bg-neutral-50 rounded-lg transition-all duration-300 sm:px-3 px-0 h-15">
7+
<div
8+
class="flex items-center w-full hover:bg-neutral-50 rounded-lg transition-all duration-300 sm:px-3 px-0 h-15"
9+
:class="item.slug ? 'cursor-pointer' : ''"
10+
>
811
<!-- Rank -->
912
<div class="w-10 shrink-0 text-neutral-900 font-secondary overflow-hidden overflow-ellipsis">
1013
{{ item.rank }}
1114
</div>
1215

1316
<!-- Organization info -->
1417
<component
15-
:is="isTeamMember && item.slug ? nuxtLink : 'div'"
16-
:to="isTeamMember && item.slug ? { name: LfxRoutes.ORGANIZATION, params: { orgSlug: item.slug } } : undefined"
18+
:is="item.slug ? nuxtLink : 'div'"
19+
:to="item.slug ? { name: LfxRoutes.ORGANIZATION, params: { orgSlug: item.slug } } : undefined"
1720
class="flex-1 min-w-0 flex gap-3 items-center text-inherit no-underline"
18-
:class="isTeamMember && item.slug ? 'hover:text-brand-500 transition-colors cursor-pointer' : ''"
21+
:class="item.slug ? 'hover:text-brand-500 transition-colors cursor-pointer' : ''"
1922
>
2023
<lfx-avatar
2124
:src="item.logoUrl"
@@ -44,23 +47,20 @@ SPDX-License-Identifier: MIT
4447
</template>
4548

4649
<script setup lang="ts">
47-
import { computed, resolveComponent } from 'vue';
50+
import { resolveComponent } from 'vue';
4851
import type { LeaderboardConfig } from '../../config/types/leaderboard.types';
4952
import NumericDataDisplay from '../data-displays/numeric.vue';
5053
import NumericTrends from '../trends/numeric-trends.vue';
5154
import type { Leaderboard } from '~~/types/leaderboard/leaderboard';
5255
import LfxAvatar from '~/components/uikit/avatar/avatar.vue';
5356
import { LfxRoutes } from '~/components/shared/types/routes';
54-
import { useAuth } from '~~/composables/useAuth';
5557
5658
defineProps<{
5759
item: Leaderboard;
5860
leaderboardConfig: LeaderboardConfig;
5961
}>();
6062
6163
const nuxtLink = resolveComponent('NuxtLink');
62-
const { user } = useAuth();
63-
const isTeamMember = computed(() => !!user.value?.isLfInsightsTeamMember);
6464
</script>
6565

6666
<script lang="ts">

frontend/app/components/modules/organization/components/header.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ SPDX-License-Identifier: MIT
173173
name="arrow-up-right-from-square"
174174
:size="14"
175175
/>
176-
Open in LFX Self-Serve
176+
Open in LFX
177177
</lfx-button>
178178
</a>
179179
<template #content>

frontend/app/components/modules/organization/components/overview/locked-contributors-section.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ SPDX-License-Identifier: MIT
2020
button-style="pill"
2121
size="medium"
2222
>
23-
<span class="sm:hidden">Open in LFX Self-Serve</span>
24-
<span class="hidden sm:inline">Check your organization data in LFX Self-Serve</span>
23+
<span class="sm:hidden">Open in LFX</span>
24+
<span class="hidden sm:inline">Check your organization data in LFX</span>
2525
<lfx-icon
2626
name="arrow-up-right-from-square"
2727
:size="12"

frontend/app/components/modules/widget/components/contributors/fragments/organizations-table.vue

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ SPDX-License-Identifier: MIT
2828
v-for="(organization, index) in props.organizations"
2929
:key="`${organization.name}-${index}`"
3030
class="lfx-table-row"
31+
:class="organization.slug ? 'cursor-pointer' : ''"
3132
>
3233
<div class="name-col">
3334
<div
@@ -37,9 +38,9 @@ SPDX-License-Identifier: MIT
3738
{{ index + 1 }}
3839
</div>
3940
<nuxt-link
40-
v-if="isTeamMember && organization.slug"
41+
v-if="organization.slug"
4142
:to="`/organization/${organization.slug}`"
42-
class="flex items-center gap-2 min-w-0 overflow-hidden no-underline text-inherit"
43+
class="flex items-center gap-2 min-w-0 overflow-hidden no-underline text-inherit cursor-pointer"
4344
>
4445
<lfx-avatar
4546
:src="organization.logo"
@@ -107,7 +108,6 @@ import { formatNumber } from '~/components/shared/utils/formatter';
107108
import LfxScrollableShadow from '~/components/uikit/scrollable-shadow/scrollable-shadow.vue';
108109
import LfxSpinner from '~/components/uikit/spinner/spinner.vue';
109110
import { isElementVisible } from '~/components/shared/utils/helper';
110-
import { useAuth } from '~~/composables/useAuth';
111111
112112
const emit = defineEmits<{ (e: 'loadMore'): void }>();
113113
const loadMore = ref(null);
@@ -131,9 +131,6 @@ const props = withDefaults(
131131
132132
const showLoadMore = computed(() => props.hasNextPage && props.showFullList);
133133
134-
const { user } = useAuth();
135-
const isTeamMember = computed(() => !!user.value?.isLfInsightsTeamMember);
136-
137134
const options = {
138135
root: null,
139136
rootMargin: '0px',

frontend/docs/.vitepress/config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ export default defineConfig({
8484
{ text: 'LFX Data Copilot', link: '/features/lfx-data-copilot/index.md' },
8585
{ text: 'Repository Groups', link: '/features/repository-groups/index.md' },
8686
{ text: 'Community Collections', link: '/features/community-collections/index.md' },
87+
{ text: 'Organization Page', link: '/features/organization-page/index.md' },
8788
],
8889
},
8990
{
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Organization Page
2+
3+
Use the Organization Page to understand how your company contributes to critical open source projects — who is contributing, which projects you're involved in, and how your engagement has changed over time.
4+
5+
## Key Metrics
6+
7+
Three numbers at the top of the page give you an at-a-glance health check of your organization's open source activity over the **last 365 days**:
8+
9+
- **Active contributors** — how many of your employees made at least one code contribution (commit, pull request, or code review). Shows a year-over-year trend so you can see if engagement is growing or declining.
10+
- **Maintainer roles** — how many maintainer or owner roles your contributors hold across all projects. A higher number signals deeper trust and influence in those communities.
11+
- **Critical projects** — how many distinct projects your team contributed to. Useful for gauging breadth of involvement.
12+
13+
## Activity Over Time
14+
15+
A bar chart showing your organization's total code contributions per year, from the earliest recorded activity to today. Use it to spot periods of growth, sustained investment, or pullback across your open source program.
16+
17+
## Contributors Over Time
18+
19+
A bar chart showing how many unique contributors your organization had per year. Pair it with the Activity chart to distinguish between a growing team and a shrinking one that's working harder.
20+
21+
## Critical Projects
22+
23+
A ranked table of the projects your contributors were involved in, ordered by **Technical influence** — your organization's share of code contributions relative to what the whole project community produced.
24+
25+
Each project row shows:
26+
27+
- **Technical influence** — one of four levels based on your contribution share:
28+
- **Leading** — a large share; your team is a primary driver of the project.
29+
- **Contributing** — a meaningful share; consistent and committed involvement.
30+
- **Participating** — a small but non-zero share; actively helping.
31+
- **Silent** — minimal or no code contribution activity.
32+
- **Contributors** — number of your employees active in that project.
33+
- **Activities** — total code contributions your team made.
34+
35+
The table covers an extended rolling window of recent years and counts only code contribution activity types.

frontend/types/explore/organizations.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ export interface ExploreOrganizations {
55
logo?: string;
66
displayName: string;
77
activityCount: number;
8+
slug?: string;
89
}

0 commit comments

Comments
 (0)