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

feat: rewrite react-vega in typescript #54

Merged
merged 13 commits into from
Sep 15, 2019
Merged

feat: rewrite react-vega in typescript #54

merged 13 commits into from
Sep 15, 2019

Conversation

kristw
Copy link
Member

@kristw kristw commented Sep 14, 2019

💔 BREAKING CHANGE:

  • Rewrite the project in typescript.
  • Changes API of react-vega to mimic vega-embed. The new <Vega /> component actually supports both vega and vega-lite.
import { Vega } from 'react-vega';

<Vega 
  // class and style of the container div element
  className
  style
  // pass data
  data
  // handle signals
  signalHandlers
  // These props are from vega-embed. See https://github.com/vega/vega-embed
  mode
  theme
  defaultStyle
  renderer
  logLovel
  tooltip
  loader
  patch
  width
  height
  padding
  actions
  scaleFactor
  config
  editorUrl
  sourceHeader
  sourceFooter
  hover
  i18n
  downloadFileName
/>
  • Since the new <Vega /> already support vega-lite. I am deprecating react-vega-lite and add lightweight convenient component VegaLite to react-vega instead.

Internal

  • Update storybook config to support typescript.
  • Enable travis CI.

Fixes: #46, #47, #25, #23, #53

@codecov
Copy link

codecov bot commented Sep 14, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@005d5d4). Click here to learn what that means.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##             master    #54   +/-   ##
=======================================
  Coverage          ?   100%           
=======================================
  Files             ?      1           
  Lines             ?      2           
  Branches          ?      1           
=======================================
  Hits              ?      2           
  Misses            ?      0           
  Partials          ?      0
Impacted Files Coverage Δ
packages/react-vega/src/utils/isFunction.ts 100% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 005d5d4...8b04a99. Read the comment docs.

@domoritz
Copy link
Member

Thank you ❤️ !

@domoritz
Copy link
Member

Should we use npm deprecate to tell people not to use the react-vega-lite package?

@kristw
Copy link
Member Author

kristw commented Sep 15, 2019

@domoritz I haven't published react-vega@7 yet. Thinking about publishing a prerelease version first.

I still have to update docs and add a few more things for perf, but at the least the storybook is working. Perhaps after official 7.0.0 is release can do npm deprecate at that point.

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.

Storybook doesn't rebuild when package sources change
2 participants