feat: update Jira components with improved color schemes and UI enhancements
- Refined color schemes in `BurndownChart`, `CollaborationMatrix`, `ThroughputChart`, and `TeamActivityHeatmap` for better visibility and consistency. - Adjusted opacity handling in `TeamActivityHeatmap` for improved visual clarity. - Cleaned up imports in `CollaborationMatrix` and `SprintComparison` for better code organization. - Enhanced `JiraSync` component with updated color for the sync status indicator. - Updated `jira-period-filter` to remove unused imports, streamlining the codebase.
This commit is contained in:
@@ -131,12 +131,12 @@ export function BurndownChart({ sprintHistory, className }: BurndownChartProps)
|
||||
{/* Légende visuelle */}
|
||||
<div className="mb-4 flex justify-center gap-6 text-sm">
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="w-4 h-0.5 bg-green-500 border-dashed border-t-2 border-green-500"></div>
|
||||
<span className="text-green-500">Idéal</span>
|
||||
<div className="w-4 h-0.5 bg-green-600 dark:bg-green-500 border-dashed border-t-2 border-green-600 dark:border-green-500"></div>
|
||||
<span className="text-green-600 dark:text-green-500">Idéal</span>
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="w-4 h-0.5 bg-blue-500"></div>
|
||||
<span className="text-blue-500">Réel</span>
|
||||
<div className="w-4 h-0.5 bg-blue-600 dark:bg-blue-500"></div>
|
||||
<span className="text-blue-600 dark:text-blue-500">Réel</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import React from 'react';
|
||||
import { JiraAnalytics } from '@/lib/types';
|
||||
import { Card, CardContent, CardHeader } from '@/components/ui/Card';
|
||||
import { Card } from '@/components/ui/Card';
|
||||
|
||||
interface CollaborationMatrixProps {
|
||||
analytics: JiraAnalytics;
|
||||
@@ -78,17 +78,9 @@ export function CollaborationMatrix({ analytics, className }: CollaborationMatri
|
||||
// Couleur d'intensité
|
||||
const getIntensityColor = (intensity: 'low' | 'medium' | 'high') => {
|
||||
switch (intensity) {
|
||||
case 'high': return 'bg-green-500';
|
||||
case 'medium': return 'bg-yellow-500';
|
||||
case 'low': return 'bg-gray-400';
|
||||
}
|
||||
};
|
||||
|
||||
const getIntensityLabel = (intensity: 'low' | 'medium' | 'high') => {
|
||||
switch (intensity) {
|
||||
case 'high': return 'Forte';
|
||||
case 'medium': return 'Modérée';
|
||||
case 'low': return 'Faible';
|
||||
case 'high': return 'bg-green-600 dark:bg-green-500';
|
||||
case 'medium': return 'bg-yellow-600 dark:bg-yellow-500';
|
||||
case 'low': return 'bg-gray-500 dark:bg-gray-400';
|
||||
}
|
||||
};
|
||||
|
||||
@@ -108,8 +100,8 @@ export function CollaborationMatrix({ analytics, className }: CollaborationMatri
|
||||
Score: {person.collaborationScore}
|
||||
</span>
|
||||
<div className={`w-3 h-3 rounded-full ${
|
||||
person.isolation < 30 ? 'bg-green-500' :
|
||||
person.isolation < 60 ? 'bg-yellow-500' : 'bg-red-500'
|
||||
person.isolation < 30 ? 'bg-green-600 dark:bg-green-500' :
|
||||
person.isolation < 60 ? 'bg-yellow-600 dark:bg-yellow-500' : 'bg-red-600 dark:bg-red-500'
|
||||
}`} />
|
||||
</div>
|
||||
</div>
|
||||
@@ -149,8 +141,7 @@ export function CollaborationMatrix({ analytics, className }: CollaborationMatri
|
||||
const ranges = [[0, 30], [30, 50], [50, 70], [70, 100]];
|
||||
const [min, max] = ranges[index];
|
||||
const count = collaborationData.filter(d => d.isolation >= min && d.isolation < max).length;
|
||||
const percentage = (count / collaborationData.length) * 100;
|
||||
const colors = ['bg-green-500', 'bg-blue-500', 'bg-yellow-500', 'bg-red-500'];
|
||||
const colors = ['bg-green-600 dark:bg-green-500', 'bg-blue-600 dark:bg-blue-500', 'bg-yellow-600 dark:bg-yellow-500', 'bg-red-600 dark:bg-red-500'];
|
||||
|
||||
return (
|
||||
<div key={level} className="flex items-center gap-2 text-xs">
|
||||
|
||||
@@ -149,7 +149,7 @@ export function JiraSync({ onSyncComplete, className = "" }: JiraSyncProps) {
|
||||
<CardHeader className="pb-3">
|
||||
<div className="flex items-center justify-between">
|
||||
<div className="flex items-center gap-3">
|
||||
<div className="w-2 h-2 rounded-full bg-blue-400 animate-pulse"></div>
|
||||
<div className="w-2 h-2 rounded-full bg-blue-500 dark:bg-blue-400 animate-pulse"></div>
|
||||
<h3 className="font-mono text-sm font-bold text-blue-400 uppercase tracking-wider">
|
||||
JIRA SYNC
|
||||
</h3>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
'use client';
|
||||
|
||||
import { LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, ResponsiveContainer, BarChart, Bar, Cell } from 'recharts';
|
||||
import { LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, ResponsiveContainer, BarChart, Bar } from 'recharts';
|
||||
import { SprintVelocity } from '@/lib/types';
|
||||
import { Card, CardContent, CardHeader } from '@/components/ui/Card';
|
||||
import { Card } from '@/components/ui/Card';
|
||||
|
||||
interface SprintComparisonProps {
|
||||
sprintHistory: SprintVelocity[];
|
||||
|
||||
@@ -21,21 +21,21 @@ export function TeamActivityHeatmap({ workloadByAssignee, statusDistribution, cl
|
||||
// Couleurs pour les différents types de travail
|
||||
const getWorkloadColor = (todo: number, inProgress: number, review: number) => {
|
||||
const total = todo + inProgress + review;
|
||||
if (total === 0) return 'bg-[var(--muted)]/20';
|
||||
if (total === 0) return null; // Géré séparément
|
||||
|
||||
// Dominante par type de travail
|
||||
// Dominante par type de travail avec couleurs CSS directes (versions plus douces)
|
||||
if (review > inProgress && review > todo) {
|
||||
return 'bg-purple-500'; // Review dominant
|
||||
return '#a855f7'; // purple-500 - Review dominant (plus doux)
|
||||
} else if (inProgress > todo) {
|
||||
return 'bg-orange-500'; // In Progress dominant
|
||||
return '#f59e0b'; // amber-500 - In Progress dominant (plus doux)
|
||||
} else {
|
||||
return 'bg-blue-500'; // Todo dominant
|
||||
return '#3b82f6'; // blue-500 - Todo dominant (plus doux)
|
||||
}
|
||||
};
|
||||
|
||||
const getOpacity = (total: number) => {
|
||||
const intensity = getIntensity(total);
|
||||
return Math.max(0.2, intensity / 100);
|
||||
return Math.max(0.6, Math.min(0.9, intensity / 100)); // Opacité plus élevée et moins de variation
|
||||
};
|
||||
|
||||
return (
|
||||
@@ -45,28 +45,37 @@ export function TeamActivityHeatmap({ workloadByAssignee, statusDistribution, cl
|
||||
<div>
|
||||
<h4 className="text-sm font-medium mb-3">Intensité de travail par membre</h4>
|
||||
<div className="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-2">
|
||||
{workloadByAssignee.map(assignee => (
|
||||
<div
|
||||
key={assignee.assignee}
|
||||
className="relative p-3 rounded-lg border border-[var(--border)] transition-all hover:scale-105"
|
||||
style={{
|
||||
backgroundColor: getWorkloadColor(assignee.todoCount, assignee.inProgressCount, assignee.reviewCount),
|
||||
opacity: getOpacity(assignee.totalActive)
|
||||
}}
|
||||
>
|
||||
<div className="text-white text-xs font-medium mb-1 truncate">
|
||||
{workloadByAssignee.map(assignee => {
|
||||
const bgColor = getWorkloadColor(assignee.todoCount, assignee.inProgressCount, assignee.reviewCount);
|
||||
const isEmpty = assignee.totalActive === 0;
|
||||
|
||||
return (
|
||||
<div
|
||||
key={assignee.assignee}
|
||||
className={`relative p-3 rounded-lg border border-[var(--border)] transition-all hover:scale-105 ${
|
||||
isEmpty ? 'bg-[var(--muted)]/30' : ''
|
||||
}`}
|
||||
style={bgColor ? {
|
||||
backgroundColor: bgColor,
|
||||
opacity: getOpacity(assignee.totalActive)
|
||||
} : {
|
||||
opacity: getOpacity(assignee.totalActive)
|
||||
}}
|
||||
>
|
||||
<div className={isEmpty ? "text-[var(--foreground)] text-xs font-medium mb-1 truncate" : "text-white text-xs font-medium mb-1 truncate"}>
|
||||
{assignee.displayName}
|
||||
</div>
|
||||
<div className="text-white text-lg font-bold">
|
||||
<div className={isEmpty ? "text-[var(--foreground)] text-lg font-bold" : "text-white text-lg font-bold"}>
|
||||
{assignee.totalActive}
|
||||
</div>
|
||||
<div className="text-white/80 text-xs">
|
||||
<div className={isEmpty ? "text-[var(--muted-foreground)] text-xs" : "text-white/80 text-xs"}>
|
||||
{assignee.todoCount > 0 && `${assignee.todoCount} à faire`}
|
||||
{assignee.inProgressCount > 0 && ` ${assignee.inProgressCount} en cours`}
|
||||
{assignee.reviewCount > 0 && ` ${assignee.reviewCount} review`}
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -77,7 +86,7 @@ export function TeamActivityHeatmap({ workloadByAssignee, statusDistribution, cl
|
||||
<span>À faire dominant</span>
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="w-3 h-3 bg-orange-500 rounded"></div>
|
||||
<div className="w-3 h-3 bg-amber-500 rounded"></div>
|
||||
<span>En cours dominant</span>
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
|
||||
@@ -138,16 +138,16 @@ export function ThroughputChart({ sprintHistory, className }: ThroughputChartPro
|
||||
{/* Légende visuelle */}
|
||||
<div className="mb-4 flex justify-center gap-6 text-sm">
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="w-4 h-3 bg-blue-500 rounded-sm"></div>
|
||||
<span className="text-blue-500">Points complétés</span>
|
||||
<div className="w-4 h-3 bg-blue-600 dark:bg-blue-500 rounded-sm"></div>
|
||||
<span className="text-blue-600 dark:text-blue-500">Points complétés</span>
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="w-4 h-0.5 bg-green-500"></div>
|
||||
<span className="text-green-500">Throughput</span>
|
||||
<div className="w-4 h-0.5 bg-green-600 dark:bg-green-500"></div>
|
||||
<span className="text-green-600 dark:text-green-500">Throughput</span>
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="w-4 h-0.5 bg-orange-500 border-dashed border-t-2 border-orange-500"></div>
|
||||
<span className="text-orange-500">Tendance</span>
|
||||
<div className="w-4 h-0.5 bg-orange-600 dark:bg-orange-500 border-dashed border-t-2 border-orange-600 dark:border-orange-500"></div>
|
||||
<span className="text-orange-600 dark:text-orange-500">Tendance</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user