NSOC'26
Description
The Sprint Comparison section currently calculates and displays percentage changes for Completed Tasks and Reviews. However:
- Trend display logic is duplicated across multiple metric cards.
- Neutral trends (
0% change) are not visually distinguished beyond the icon.
- The comparison card is not reusable for future analytics metrics.
Proposed Improvements
1. Create a Reusable Component
Create:
frontend/app/components/analytics-comp/TrendMetricCard.tsx
Props:
type TrendMetricCardProps = {
label: string;
current: number;
previous: number;
};
2. Move Trend Logic Into Component
Calculate:
- Difference
- Percentage
- Trend Icon
- Color State
inside the component.
3. Improve Neutral State
Display:
using a neutral gray color instead of green.
4. Replace Existing Cards
Replace:
with reusable TrendMetricCard instances.
Expected Outcome
- Cleaner code
- Reduced duplication
- Easier future expansion
- Better maintainability
NSOC'26
Description
The Sprint Comparison section currently calculates and displays percentage changes for Completed Tasks and Reviews. However:
0%change) are not visually distinguished beyond the icon.Proposed Improvements
1. Create a Reusable Component
Create:
Props:
2. Move Trend Logic Into Component
Calculate:
inside the component.
3. Improve Neutral State
Display:
using a neutral gray color instead of green.
4. Replace Existing Cards
Replace:
with reusable
TrendMetricCardinstances.Expected Outcome