Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: recharts/recharts
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.6.1
Choose a base ref
...
head repository: recharts/recharts
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.6.2
Choose a head ref
  • 1 commit
  • 3 files changed
  • 2 contributors

Commits on May 10, 2023

  1. fix: sankey types - add expliciy return type for renderTooltip (#3581)

    <!--- Provide a general summary of your changes in the Title above -->
    
    ## Description
    
    <!--- Describe your changes in detail -->
    #3580
    
    Broken types after refactoring Tooltip to a function component because
    `renderTooltip` of Sankey didn't explicitly set a return type. This
    confirms the flakiness of recharts types and the use of
    `React.cloneElement`.
    
    Before any more refactoring changes try to build into a project and
    compile it with `tsc`
    
    ## Related Issue
    #3580
    
    <!--- 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: -->
    
    ## Motivation and Context
    
    <!--- Why is this change required? What problem does it solve? -->
    
    ## How Has This Been Tested?
    - reproduce error with test repo
    - look at `Sankey.d.ts` in recharts build after `tsc` -> see error in
    output
    - look at implied type of `renderTooltip`
    - look at other `renderTooltip` functions (they all use
    `React.ReactElement`)
    - see search
    https://github.com/search?q=repo%3Arecharts%2Frecharts%20renderTooltip&type=code
    - explicitly set type returned to `React.ReactElement`
    
    <!--- 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. -->
    
    ## Screenshots (if appropriate):
    <img width="909" alt="image"
    src="https://github.com/recharts/recharts/assets/25180830/53eb7102-3434-4da8-b6da-601f412dc6aa">
    
    
    ## 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.
    - [ ] I have added tests to cover my changes.
    - [x] All new and existing tests passed.
    
    ---------
    
    Co-authored-by: Coltin Kifer <[email protected]>
    ckifer and Coltin Kifer authored May 10, 2023
    Configuration menu
    Copy the full SHA
    ebaa111 View commit details
    Browse the repository at this point in the history
Loading