Implement optional rail heatmap and unassigned item rendering - #28
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3b94bcc02e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| className: 'sf-constraint-dot', | ||
| id: 'sf-cdot-' + i, | ||
| title: c.name || ('Constraint ' + i), | ||
| role: onClick ? 'button' : null, | ||
| tabIndex: onClick ? '0' : null, | ||
| 'aria-label': onClick ? ('Open constraint ' + (c.name || ('Constraint ' + i))) : null, |
There was a problem hiding this comment.
Restore
sf-cdot-* ids for analysis coloring
Because buildDots() no longer assigns id: 'sf-cdot-' + i, colorDotsFromAnalysis() in this same module still cannot resolve any of the dots it just rebuilt, and the calls from js-src/11-solver.js:64 silently skip every violation class. In any flow that shows post-run analysis, hard/soft constraint failures stop being highlighted even though the analysis payload is present.
Useful? React with 👍 / 👎.
| var heatmap = sf.el('div', { className: 'sf-heatmap' }); | ||
| var label = sf.el('div', { className: 'sf-heatmap-label' }, config.label || ''); | ||
| heatmap.appendChild(label); | ||
|
|
||
| var track = sf.el('div', { className: 'sf-heatmap-track' }); |
There was a problem hiding this comment.
Lay out heatmaps on the card's two-column grid
createCard() uses labelWidth + 'px 1fr' for the header/body rows, but the new heatmap strip never gets that template or even the labelWidth value. Since .sf-heatmap is only display: grid in css-src/16-rail-blocks.css:126-140, the label and track auto-flow into separate rows instead of aligning with the stats/rail columns, so any card that opts into heatmap renders the strip misaligned with the timeline (and a non-empty label can push it taller than the intended 10px strip).
Useful? React with 👍 / 👎.
3b94bcc to
286ddb9
Compare
Closes #8.
Summary
SF.rail.createHeatmap(config)and wire it intoSF.rail.createCardheatmapsupport on resource cards with configurable segmentsSF.rail.createUnassignedRailandcard.setUnassigned()for unassigned pill rendering