feat: implement interactive data table with sorting and column control

Replaces static course table with TanStack Table featuring sortable
columns, column visibility management, and server-side sort handling.
Adds reusable data-table primitives adapted for Svelte 5 runes.
This commit is contained in:
2026-01-29 01:04:18 -06:00
parent d108a41f91
commit 67d7c81ef4
13 changed files with 812 additions and 149 deletions
+4 -15
View File
@@ -122,14 +122,8 @@ impl RmpClient {
.as_str()
.ok_or_else(|| anyhow::anyhow!("Missing id"))?
.to_string(),
first_name: node["firstName"]
.as_str()
.unwrap_or_default()
.to_string(),
last_name: node["lastName"]
.as_str()
.unwrap_or_default()
.to_string(),
first_name: node["firstName"].as_str().unwrap_or_default().to_string(),
last_name: node["lastName"].as_str().unwrap_or_default().to_string(),
department: node["department"].as_str().map(|s| s.to_string()),
avg_rating: node["avgRating"].as_f64().map(|v| v as f32),
avg_difficulty: node["avgDifficulty"].as_f64().map(|v| v as f32),
@@ -145,14 +139,9 @@ impl RmpClient {
break;
}
cursor = page_info["endCursor"]
.as_str()
.map(|s| s.to_string());
cursor = page_info["endCursor"].as_str().map(|s| s.to_string());
debug!(
fetched = all.len(),
"RMP pagination: fetching next page"
);
debug!(fetched = all.len(), "RMP pagination: fetching next page");
}
info!(total = all.len(), "Fetched all RMP professors");