Commit 944866b
feat: add interactive graph UI with prerequisite highlighting
Stimulus controller renders subject dependency graphs using Cytoscape.js
with semester-grouped columns (desktop) or 2-column grid (mobile).
Interactions:
- Click a subject to highlight its prerequisite chain (amber) and
dependents (violet), dimming unrelated nodes
- Click again to navigate to the subject detail page
- Hover (desktop) shows subtle border and connected edges
- Click background to deselect
- Tooltip with "Ver detalles" link appears on selection
- Debounced resize handler rebuilds layout on breakpoint change
Visual:
- Three-state nodes: unavailable (gray), available (blue), completed (green)
- Animated transitions on node/edge state changes
- Semester headers that reposition on pan/zoom
- Legend with state colors and highlight indicators
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 10a648e commit 944866b
5 files changed
Lines changed: 582 additions & 0 deletions
File tree
- app
- assets/tailwind
- javascript/controllers
- views
- planner/graphs
- subjects/graphs
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
0 commit comments