Skip to content

Add configurable wheel activation to zoomX - #125

Open
tannerlinsley wants to merge 1 commit into
mainfrom
taren/modifier-wheel-zoom
Open

Add configurable wheel activation to zoomX#125
tannerlinsley wants to merge 1 commit into
mainfrom
taren/modifier-wheel-zoom

Conversation

@tannerlinsley

@tannerlinsley tannerlinsley commented Sep 3, 2026

Copy link
Copy Markdown
Member

Summary

  • add focus, modifier, and always wheel activation policies to zoomX
  • preserve focus-gated capture as the default and keep unmodified page scrolling available in modifier mode
  • update generated accessibility instructions, public docs, packed type coverage, and bundle policy
  • add a minor changeset for @tanstack/charts

Testing

  • pnpm validate
  • focused interaction-zoom suite, 23 tests
  • packed declaration and runtime consumer checks
  • bundle, documentation, catalog preview, and benchmark gates

Release impact: minor. The fixed Changesets group will advance together in the eventual release.

Fixes #69

Summary by CodeRabbit

  • New Features

    • Added configurable wheel activation for horizontal chart zoom.
    • Choose focused-plot activation by default, modifier-key activation with Control/Command + wheel, or always capture wheel input over the plot.
    • Added the corresponding public zoom activation type.
  • Documentation

    • Updated zoom, accessibility, interaction, and reference documentation with the new behaviors and usage guidance.
    • Updated bundle-size measurements and comparison snapshots.

@coderabbitai

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: 1287edea-c0c2-48c2-aa2c-2bf04c329e55

📥 Commits

Reviewing files that changed from the base of the PR and between 258ed39 and e4e06bb.

📒 Files selected for processing (25)
  • .changeset/warm-charts-wheel.md
  • API-FRICTION.md
  • benchmarks/comparison/bundle-baseline.json
  • benchmarks/conformance/previews/manifest.json
  • docs/comparison.md
  • docs/examples/interactive-charts.md
  • docs/guides/accessibility.md
  • docs/guides/bundle-size-and-performance.md
  • docs/guides/interactions-and-selections.md
  • docs/reference/focus-and-interaction.md
  • docs/reference/index.md
  • docs/reference/types.md
  • packages/charts-core/docs/comparison.md
  • packages/charts-core/docs/examples/interactive-charts.md
  • packages/charts-core/docs/guides/accessibility.md
  • packages/charts-core/docs/guides/bundle-size-and-performance.md
  • packages/charts-core/docs/guides/interactions-and-selections.md
  • packages/charts-core/docs/reference/focus-and-interaction.md
  • packages/charts-core/docs/reference/index.md
  • packages/charts-core/docs/reference/types.md
  • packages/charts-core/src/interaction-zoom.test.ts
  • packages/charts-core/src/interaction-zoom.ts
  • packages/charts-core/src/type-contract.test.ts
  • scripts/check-packed-consumers.mjs
  • scripts/measure-bundles.mjs

Included review availability: Your plan provides up to 4 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

zoomX now supports focus, modifier, and always wheel activation policies. Tests, consumer contracts, documentation, release metadata, bundle budgets, and generated baselines were updated.

Changes

Zoom wheel activation

Layer / File(s) Summary
Wheel activation policy implementation
packages/charts-core/src/interaction-zoom.ts
Adds ZoomXWheelActivation, validates the option, gates wheel input by policy, and generates policy-specific descriptions.
Wheel policy interaction coverage
packages/charts-core/src/interaction-zoom.test.ts
Tests focus, modifier, and always modes, modifier keys, pass-through, batching, cancellation, controlled updates, bounds, and ARIA descriptions.
Consumer and type-contract validation
packages/charts-core/src/type-contract.test.ts, scripts/check-packed-consumers.mjs
Exercises the new option and exported type in internal and packed-consumer contracts.
Public behavior documentation
docs/**, packages/charts-core/docs/**
Documents wheel activation modes and the ZoomXWheelActivation export.
Release and bundle metadata
.changeset/*, API-FRICTION.md, benchmarks/**, docs/comparison.md, packages/charts-core/docs/comparison.md, scripts/measure-bundles.mjs
Records the minor release, updated bundle measurements, budgets, dates, digests, and source hashes.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to e4e06

The wheel activation feature and its documentation, type contracts, and generated copies have no unresolved material risk.

Sequence Diagram(s)

sequenceDiagram
  participant Pointer
  participant zoomX
  participant ChartState
  Pointer->>zoomX: Send wheel event
  zoomX->>zoomX: Apply focus, modifier, or always policy
  zoomX->>ChartState: Emit zoom or pan change
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 6.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 15 functions across 5 files. (20 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: configurable wheel activation for zoomX.
Linked Issues check ✅ Passed The implementation satisfies issue #69. It adds wheelActivation: 'modifier', supports Ctrl+wheel and Command+wheel without prior focus, preserves unmodified page scrolling, and keeps focus as the …
Out of Scope Changes check ✅ Passed The changes are within scope. Source updates, tests, documentation, accessibility text, type coverage, bundle budgets, generated baselines, and the changeset all support configurable zoomX wheel act…
Full details: Linked Issues check

Explanation

The implementation satisfies issue #69. It adds wheelActivation: 'modifier', supports Ctrl+wheel and Command+wheel without prior focus, preserves unmodified page scrolling, and keeps focus as the default. Tests, documentation, type coverage, and consumer checks cover the change.

Full details: Out of Scope Changes check

Explanation

The changes are within scope. Source updates, tests, documentation, accessibility text, type coverage, bundle budgets, generated baselines, and the changeset all support configurable zoomX wheel activation.

Full details: Docstring Coverage

Explanation

Docstring coverage is 6.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 15 functions across 5 files. (20 skipped: 20 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch taren/modifier-wheel-zoom

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@nx-cloud

nx-cloud Bot commented Sep 3, 2026

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit e4e06bb

Command Status Duration Result
nx run charts-workspace:ci-distributed ✅ Succeeded 4m View ↗
nx run charts-workspace:package-check ✅ Succeeded <1s View ↗
nx run charts-workspace:benchmark-check ✅ Succeeded 52s View ↗

☁️ Nx Cloud last updated this comment at 2026-09-03 17:40:40 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

zoomX: support modifier-gated wheel zoom without prior focus (Ctrl+wheel)

1 participant