Conversation
Code Review: Grid Navigation for Scatter PlotsNice feature overall — the design follows MVVC well and the implementation is readable. Here are the findings, grouped by severity. Bugs / Correctness Issues1. Rotor and trace state go out of sync when normal navigation is used in grid mode ( public moveOnce(direction: MovableDirection): boolean {
// Exit grid mode when normal navigation resumes
this.isInGridMode = false;
...
}
2. return this.getMessage('grid', dirLabel);
// → "No grid value found to the right of the current value."
Architecture Concerns3. Grid methods on Adding 4. Stale/duplicate JSDoc before /**
* Sets whether grid navigation mode is active. Override in traces that support grid navigation.
*/
/**
* Returns true if this trace supports compare (lower/higher value) navigation.
*/
public supportsCompareMode(): boolean {Two consecutive JSDoc blocks — the first one belongs to 5. Grid mode detection via state shape rather than explicit flag ( Both 6. Two axis formats add schema complexity ( Format A ( Minor Issues7. The clamp comment ( 8. const hasElements = svgClones.length === data.length;When 9. Floating-point binning in
Missing TestsThe new logic in Summary
The grid navigation concept is solid and the main data-flow follows MVVC correctly. The primary concerns to address before merge are the rotor/trace sync issue (#1) and the abstract class pollution (#3). Everything else is advisory. |
Pull Request
Description
Introduces a new navigation mode for scatter plots that divides the plot area into a configurable grid of rectangular cells. Users cycle to "GRID NAVIGATION" via the rotor (Alt+Shift+Up/Down), then use arrow keys to move between cells. Each cell announces its axis ranges and the points it contains.
Related Issues
#529
Changes Made