Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

typescript(vx-hierarchy): re-write package in TypeScript #524

Merged
merged 10 commits into from
Oct 9, 2019

Conversation

williaster
Copy link
Collaborator

@williaster williaster commented Sep 27, 2019

🚀 Enhancements

  • This PR builds off of typescript(vx-group): re-write package in TypeScript #488 which added TypeScript build support, and converts the @vx/hierarchy package to TypeScript.

  • Adds additional exports from d3-hierarchy which are commonly needed to generate the needed input to this suite of components (removing the need to also install d3-hierarchy as a direct dependency)

    • stratify + hierarchy to generate rootNodes for all hierarchy components
    • treeemap tile methods to be passed into Treemap.props.tile:
      • treemapSquarify, treemapBinary, treemapResquarify, treemapDice, treemapSlice, treemapSliceDice
    • the following types from @types/d3-hierarchy:
      • HierarchyNode, HierarchyRectangularNode, HierarchyCircularNode, HierarchyPointLink, HierarchyPointNode, HierarchyCircularLink, HierarchyRectangularLink, HierarchyLink
  • exports a new default node component for rectangular node layouts: HierarchyDefaultRectNode

  • adds a tile method select to the Treemap demo (see below)

💥 Breaking Changes

  • This PR introduces React.Fragments, which requires bumping the peerDep for react to ^16.3.0-0

🐛 Bug Fix

  • Fixes a bug where the default nodeComponent would render empty circle elements for Partition and Treemap because those layouts do not pass circle coordinates, they pass rectangular coordinates (x0, x1, y0, y1)

Tests

  • CI
  • functional /treemap, trees/, and /dendrograms demos
  • generates .d.ts files

Closes #523

@hshoff @schillerk @milesj @kristw @Rudeg

@williaster williaster force-pushed the chris--typescript-vx-hierarchy branch from 2c71847 to f042732 Compare October 2, 2019 20:34
@williaster williaster changed the base branch from chris--typescript to master October 4, 2019 20:24
@hshoff hshoff merged commit a381159 into master Oct 9, 2019
@hshoff hshoff deleted the chris--typescript-vx-hierarchy branch October 9, 2019 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Re-write @vx/hierarchy in TypeScript
2 participants