Skip to content

fix: allow brush travelers to be controled by keys after mouse interaction#6285

Merged
ckifer merged 1 commit intomainfrom
fix-brush-keyboard-controls
Sep 7, 2025
Merged

fix: allow brush travelers to be controled by keys after mouse interaction#6285
ckifer merged 1 commit intomainfrom
fix-brush-keyboard-controls

Conversation

@ckifer
Copy link
Member

@ckifer ckifer commented Sep 7, 2025

Description

We were taking the scale value of the current X of the brush even if that X value was in the middle of two actual Brush scale values and trying to find it in the list of real scale values

Instead we should just be able to rely on indices since we're just updating the index anyways.

Now you can tab to chart, move travelers, move travelers with the mouse, tab to chart, and the travelers will continue to move with the keyboard wheras before the would not

Related Issue

fix #6265

Motivation and Context

fix #6265

How Has This Been Tested?

  • red green unit test
  • locally in storybook

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • I have added a storybook story or VR test, or extended an existing story or VR test to show my changes

@codecov
Copy link

codecov bot commented Sep 7, 2025

Codecov Report

❌ Patch coverage is 75.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.62%. Comparing base (1e25111) to head (a839e4b).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/cartesian/Brush.tsx 75.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6285      +/-   ##
==========================================
- Coverage   96.63%   96.62%   -0.01%     
==========================================
  Files         221      221              
  Lines       20178    20182       +4     
  Branches     4139     4140       +1     
==========================================
+ Hits        19499    19501       +2     
- Misses        672      674       +2     
  Partials        7        7              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@codecov
Copy link

codecov bot commented Sep 7, 2025

Bundle Report

Changes will increase total bundle size by 396 bytes (0.02%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
recharts/bundle-cjs 1.04MB 175 bytes (0.02%) ⬆️
recharts/bundle-es6 897.4kB 175 bytes (0.02%) ⬆️
recharts/bundle-umd 487.58kB 46 bytes (0.01%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: recharts/bundle-umd

Assets Changed:

Asset Name Size Change Total Size Change (%)
Recharts.js 46 bytes 487.58kB 0.01%
view changes for bundle: recharts/bundle-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
cartesian/Brush.js 175 bytes 27.31kB 0.64%
view changes for bundle: recharts/bundle-es6

Assets Changed:

Asset Name Size Change Total Size Change (%)
cartesian/Brush.js 175 bytes 26.06kB 0.68%

@ckifer ckifer merged commit bbb344e into main Sep 7, 2025
25 of 27 checks passed
@ckifer ckifer deleted the fix-brush-keyboard-controls branch September 7, 2025 06:36
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.

Brush handles are not reacting to keyboard after mouse interactions

2 participants