22<!-- SPDX-License-Identifier: MIT -->
33
44< section data-testid ="dashboard-organization-involvement-section ">
5- < div class ="mb-4 ">
6- < h2 class ="font-['Roboto_Slab'] font-semibold text-[16px] "> Organization Involvement</ h2 >
5+ < div class ="flex items-center justify-between mb-4 ">
6+ < div class ="flex flex-col md:flex-row md:items-center gap-3 ">
7+ < h2 class ="font-['Roboto_Slab'] font-semibold text-[16px] "> {{ accountName() }}'s Involvement</ h2 >
8+
9+ <!-- Filter Pills -->
10+ < lfx-filter-pills [options] ="filterOptions " [selectedFilter] ="selectedFilter() " (filterChange) ="handleFilterChange($event) "> </ lfx-filter-pills >
11+ </ div >
12+
13+ <!-- Carousel Controls -->
14+ < div class ="flex items-center gap-2 ">
15+ < button
16+ type ="button "
17+ (click) ="scrollLeft() "
18+ class ="h-8 w-8 p-0 flex items-center justify-center rounded border border-gray-300 bg-white text-gray-600 hover:bg-gray-100 hover:border-gray-400 transition-colors "
19+ data-testid ="dashboard-involvement-scroll-left "
20+ aria-label ="Scroll left ">
21+ < i class ="fa-light fa-chevron-left "> </ i >
22+ </ button >
23+ < button
24+ type ="button "
25+ (click) ="scrollRight() "
26+ class ="h-8 w-8 p-0 flex items-center justify-center rounded border border-gray-300 bg-white text-gray-600 hover:bg-gray-100 hover:border-gray-400 transition-colors "
27+ data-testid ="dashboard-involvement-scroll-right "
28+ aria-label ="Scroll right ">
29+ < i class ="fa-light fa-chevron-right "> </ i >
30+ </ button >
31+ </ div >
732 </ div >
833
934 @if (isLoading()) {
@@ -15,29 +40,19 @@ <h2 class="font-['Roboto_Slab'] font-semibold text-[16px]">Organization Involvem
1540 </ div >
1641 </ div >
1742 } @else {
18- < div class ="space-y-4 ">
19- <!-- Primary Metrics Row - 4 compact cards -->
20- < div class ="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 ">
43+ < div class ="overflow-hidden ">
44+ < div #carouselScroll class ="flex gap-4 overflow-x-auto pb-2 hide-scrollbar scroll-smooth " data-testid ="dashboard-involvement-carousel ">
2145 @for (metric of primaryMetrics(); track metric.title) {
2246 <!-- Membership Tier Card (Special) -->
2347 @if (metric.isMembershipTier) {
2448 < div
25- class ="p-3 bg-white rounded-lg border border-slate-200 hover:border-[#0094FF] transition-colors cursor-pointer "
49+ class ="p-4 bg-white rounded-lg border border-slate-200 hover:border-[#0094FF] transition-colors cursor-pointer flex-shrink-0 w-80 "
2650 [attr.data-testid] ="'dashboard-involvement-metric-' + metric.title ">
27- < div class ="space-y-2 ">
28- < div class ="flex items-center gap-2 ">
29- < i class ="fa-light fa-circle w-4 h-4 text-gray-500 "> </ i >
30- < h3 class ="text-sm font-medium "> {{ metric.title }}</ h3 >
31- < span
32- [class] ="metric.isConnected ? 'text-green-500' : 'text-gray-400' "
33- [pTooltip] ="metric.isConnected ? 'Connected to live data' : 'Using placeholder data' "
34- class ="text-xs cursor-help ">
35- ●
36- </ span >
37- </ div >
51+ < div class ="space-y-3 ">
52+ < h5 class ="text-sm font-medium w-full "> {{ metric.title }}</ h5 >
3853
3954 <!-- Membership Info -->
40- < div class ="space-y-2 pt-1 ">
55+ < div class ="space-y-2 ">
4156 < div class ="flex items-center justify-between ">
4257 < span class ="text-sm text-gray-500 "> Tier</ span >
4358 < span class ="px-2 py-0.5 text-xs font-medium rounded bg-gradient-to-r from-gray-400 to-gray-300 text-white border border-gray-300 ">
@@ -56,34 +71,20 @@ <h3 class="text-sm font-medium">{{ metric.title }}</h3>
5671 </ div >
5772 </ div >
5873 } @else {
59- <!-- Regular Compact Card -->
60- < div
61- class ="p-3 bg-white rounded-lg border border-slate-200 hover:border-[#0094FF] transition-colors cursor-pointer "
62- [attr.data-testid] ="'dashboard-involvement-metric-' + metric.title ">
63- < div class ="space-y-2 ">
64- < div class ="flex items-center gap-2 ">
65- < i [class] ="metric.icon + ' w-4 h-4 text-gray-500' "> </ i >
66- < h3 class ="text-sm font-medium "> {{ metric.title }}</ h3 >
67- < span
68- [class] ="metric.isConnected ? 'text-green-500' : 'text-gray-400' "
69- [pTooltip] ="metric.isConnected ? 'Connected to live data' : 'Using placeholder data' "
70- class ="text-xs cursor-help ">
71- ●
72- </ span >
73- </ div >
74+ <!-- Regular Card -->
75+ < div class ="p-4 bg-white rounded-lg border border-slate-200 flex-shrink-0 w-80 " [attr.data-testid] ="'dashboard-involvement-metric-' + metric.title ">
76+ < div class ="space-y-3 ">
77+ < h5 class ="text-sm font-medium w-full "> {{ metric.title }}</ h5 >
7478 @if (metric.chartData) {
75- <!-- Bar chart for Active Contributors and Maintainers -->
76- @if (metric.title === 'Active Contributors' || metric.title === 'Maintainers') {
77- < div class ="w-full h-8 ">
78- < lfx-chart type ="bar " [data] ="metric.chartData " [options] ="barChartOptions " height ="100% "> </ lfx-chart >
79- </ div >
80- } @else {
81- < div class ="w-full h-8 ">
82- < lfx-chart type ="line " [data] ="metric.chartData " [options] ="sparklineChartOptions " height ="100% "> </ lfx-chart >
83- </ div >
84- }
79+ < div class ="w-full h-8 ">
80+ < lfx-chart
81+ [type] ="metric.title === 'Active Contributors' || metric.title === 'Maintainers' ? 'bar' : 'line' "
82+ [data] ="metric.chartData "
83+ [options] ="metric.title === 'Active Contributors' || metric.title === 'Maintainers' ? barChartOptions : sparklineChartOptions "
84+ height ="100% "> </ lfx-chart >
85+ </ div >
8586 }
86- < div class ="space-y-0.5 ">
87+ < div class ="space-y-1 ">
8788 < div class ="text-xl font-medium "> {{ metric.value }}</ div >
8889 @if (metric.subtitle) {
8990 < div class ="text-xs text-gray-500 "> {{ metric.subtitle }}</ div >
@@ -94,53 +95,6 @@ <h3 class="text-sm font-medium">{{ metric.title }}</h3>
9495 }
9596 }
9697 </ div >
97-
98- <!-- Secondary Metrics Row - Two list tables -->
99- < div class ="grid grid-cols-1 lg:grid-cols-2 gap-4 ">
100- <!-- Our Contributions Table -->
101- < div class ="p-4 bg-white rounded-lg border border-slate-200 ">
102- < h3 class ="text-sm font-medium mb-3 "> Our Contributions</ h3 >
103- < div class ="space-y-0 -mb-4 ">
104- @for (metric of contributionsMetrics(); track metric.title) {
105- < div class ="flex items-center justify-between w-full py-2.5 px-3 rounded-lg " [attr.data-testid] ="'contributions-metric-' + metric.title ">
106- < span class ="text-sm text-gray-500 flex items-center gap-1 ">
107- {{ metric.title }}
108- < i class ="fa-light fa-circle-question w-3 h-3 cursor-help " [pTooltip] ="metric.tooltip "> </ i >
109- < span
110- [class] ="metric.isConnected ? 'text-green-500' : 'text-gray-400' "
111- [pTooltip] ="metric.isConnected ? 'Connected to live data' : 'Using placeholder data' "
112- class ="text-xs cursor-help ">
113- ●
114- </ span >
115- </ span >
116- < span class ="text-sm font-medium "> {{ metric.descriptiveValue }}</ span >
117- </ div >
118- }
119- </ div >
120- </ div >
121-
122- <!-- Our Impact Table -->
123- < div class ="p-4 bg-white rounded-lg border border-slate-200 ">
124- < h3 class ="text-sm font-medium mb-3 "> Our Impact</ h3 >
125- < div class ="space-y-0 -mb-4 ">
126- @for (metric of impactMetrics(); track metric.title) {
127- < div class ="flex items-center justify-between w-full py-2.5 px-3 rounded-lg " [attr.data-testid] ="'impact-metric-' + metric.title ">
128- < span class ="text-sm text-gray-500 flex items-center gap-1 ">
129- {{ metric.title }}
130- < i class ="fa-light fa-circle-question w-3 h-3 cursor-help " [pTooltip] ="metric.tooltip "> </ i >
131- < span
132- [class] ="metric.isConnected ? 'text-green-500' : 'text-gray-400' "
133- [pTooltip] ="metric.isConnected ? 'Connected to live data' : 'Using placeholder data' "
134- class ="text-xs cursor-help ">
135- ●
136- </ span >
137- </ span >
138- < span class ="text-sm font-medium "> {{ metric.descriptiveValue }}</ span >
139- </ div >
140- }
141- </ div >
142- </ div >
143- </ div >
14498 </ div >
14599 }
146100</ section >
0 commit comments