Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: activeBar shouldn't be true by default (#4139)
<!--- Provide a general summary of your changes in the Title above --> ## Description <!--- Describe your changes in detail --> We, a few months ago, introduced changes for a consistent interface of `activeShape` #3756 In doing so we created a regression when a bar `shape` is different than the default activeBar of `true` (and therefore a regular Rectangle component) This causes components to change to Bar on hover - see [sandbox](https://codesandbox.io/p/sandbox/mixed-bar-chart-forked-2wdtzj?file=%2Fpackage.json%3A11%2C21) Also noticed TS freaking out in some of our tests. This.. isn't good and means that the usability of some of these things is quite terrible ... ## Related Issue <!--- This project only accepts pull requests related to open issues --> <!--- If suggesting a new feature or change, please discuss it in an issue first --> <!--- If fixing a bug, there should be an issue describing it with steps to reproduce --> <!--- Please link to the issue here: --> #4103 and #4101 ## Motivation and Context <!--- Why is this change required? What problem does it solve? --> - Fix regression ## How Has This Been Tested? <!--- Please describe in detail how you tested your changes. --> <!--- Include details of your testing environment, and the tests you ran to --> <!--- see how your change affects other areas of the code, etc. --> - Tests continue to pass besides the ones that should have broken - Test by hand, everything else is the same ## Screenshots (if appropriate): <img width="453" alt="image" src="https://github.com/recharts/recharts/assets/25180830/2e27eeb8-5c38-4f5a-b05a-94f91ae60fb8"> Still works Does not break custom shape <img width="207" alt="image" src="https://github.com/recharts/recharts/assets/25180830/23f35287-db95-4157-9a76-c5971f0f1b76"> ## Types of changes <!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> - [X] 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: <!--- Go over all the following points, and put an `x` in all the boxes that apply. --> <!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> - [X] My code follows the code style of this project. - [ ] My change requires a change to the documentation. - [ ] I have updated the documentation accordingly. - [X] I have added tests to cover my changes. - [ ] I have added a storybook story or extended an existing story to show my changes - [X] All new and existing tests passed. Co-authored-by: Coltin Kifer <ckifer@amazon.com>
- Loading branch information
Showing
5 changed files
with
34 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters