Group metrics dropdown by category in rankings and comparison views
Added optgroup elements to organize metrics into logical categories: - Expected Standard - Higher Standard - Progress Scores - Average Scores - Gender Performance - Equity (Disadvantaged) - School Context - 3-Year Trends Also added CSS styling for optgroup labels to match the design system. Note: School names in rankings are already clickable links to school details. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -140,11 +140,46 @@ export function ComparisonView({
|
||||
onChange={(e) => handleMetricChange(e.target.value)}
|
||||
className={styles.metricSelect}
|
||||
>
|
||||
{metrics.map((metric) => (
|
||||
<option key={metric.key} value={metric.key}>
|
||||
{metric.label}
|
||||
</option>
|
||||
))}
|
||||
<optgroup label="Expected Standard">
|
||||
{metrics.filter(m => m.category === 'expected').map((metric) => (
|
||||
<option key={metric.key} value={metric.key}>{metric.label}</option>
|
||||
))}
|
||||
</optgroup>
|
||||
<optgroup label="Higher Standard">
|
||||
{metrics.filter(m => m.category === 'higher').map((metric) => (
|
||||
<option key={metric.key} value={metric.key}>{metric.label}</option>
|
||||
))}
|
||||
</optgroup>
|
||||
<optgroup label="Progress Scores">
|
||||
{metrics.filter(m => m.category === 'progress').map((metric) => (
|
||||
<option key={metric.key} value={metric.key}>{metric.label}</option>
|
||||
))}
|
||||
</optgroup>
|
||||
<optgroup label="Average Scores">
|
||||
{metrics.filter(m => m.category === 'average').map((metric) => (
|
||||
<option key={metric.key} value={metric.key}>{metric.label}</option>
|
||||
))}
|
||||
</optgroup>
|
||||
<optgroup label="Gender Performance">
|
||||
{metrics.filter(m => m.category === 'gender').map((metric) => (
|
||||
<option key={metric.key} value={metric.key}>{metric.label}</option>
|
||||
))}
|
||||
</optgroup>
|
||||
<optgroup label="Equity (Disadvantaged)">
|
||||
{metrics.filter(m => m.category === 'equity').map((metric) => (
|
||||
<option key={metric.key} value={metric.key}>{metric.label}</option>
|
||||
))}
|
||||
</optgroup>
|
||||
<optgroup label="School Context">
|
||||
{metrics.filter(m => m.category === 'context').map((metric) => (
|
||||
<option key={metric.key} value={metric.key}>{metric.label}</option>
|
||||
))}
|
||||
</optgroup>
|
||||
<optgroup label="3-Year Trends">
|
||||
{metrics.filter(m => m.category === 'trends').map((metric) => (
|
||||
<option key={metric.key} value={metric.key}>{metric.label}</option>
|
||||
))}
|
||||
</optgroup>
|
||||
</select>
|
||||
</section>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user