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

project: rename vx => visx #803

Merged
merged 74 commits into from
Sep 20, 2020
Merged
Show file tree
Hide file tree
Changes from 72 commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
1b08e09
rename(demo, part i)
williaster Sep 8, 2020
fa87156
rename(demo, part ii)
williaster Sep 8, 2020
228f38e
rename(demo, part iii)
williaster Sep 8, 2020
34801f2
rename(demo, part iv)
williaster Sep 8, 2020
3364fe6
rename(annotation)
williaster Sep 8, 2020
9088b0c
rename(axis)
williaster Sep 8, 2020
0f2ed88
rename(bounds)
williaster Sep 8, 2020
c1079ce
rename(brush)
williaster Sep 8, 2020
5569655
rename(chord)
williaster Sep 8, 2020
af2fb22
rename(clip-path)
williaster Sep 8, 2020
44b0426
rename(curve, i)
williaster Sep 8, 2020
58e9e04
rename(curve, ii)
williaster Sep 8, 2020
5dda1a3
rename(drag, i)
williaster Sep 8, 2020
45ba494
rename(drag, ii)
williaster Sep 8, 2020
0bfeae0
rename(event, i)
williaster Sep 8, 2020
e4a7d17
rename(event, ii)
williaster Sep 8, 2020
9f7d5d1
rename(geo, i)
williaster Sep 8, 2020
a4f7403
rename(geo, ii)
williaster Sep 8, 2020
5c5850c
rename(glyph, i)
williaster Sep 8, 2020
fc623ea
rename(glyph, ii)
williaster Sep 8, 2020
c5ec4b2
rename(gradient, i)
williaster Sep 8, 2020
e710c0d
rename(gradient, ii)
williaster Sep 8, 2020
2339968
rename(grid, i)
williaster Sep 8, 2020
d64e64f
rename(grid, ii)
williaster Sep 8, 2020
71cd548
rename(group, i)
williaster Sep 8, 2020
de90cbe
rename(group, ii)
williaster Sep 8, 2020
9cec98a
rename(heatmap, i)
williaster Sep 8, 2020
a102cae
rename(heatmap, ii)
williaster Sep 8, 2020
1f6c198
rename(hierarchy, i)
williaster Sep 8, 2020
edcac34
rename(hierarchy, ii)
williaster Sep 8, 2020
fd3bede
rename(legend, i)
williaster Sep 8, 2020
590ddbc
rename(legend, ii)
williaster Sep 8, 2020
e1960bd
rename(marker, i)
williaster Sep 8, 2020
2311176
rename(marker, ii)
williaster Sep 8, 2020
8c52bfc
rename(mock-data, i)
williaster Sep 8, 2020
957a82d
rename(mock-data, ii)
williaster Sep 8, 2020
6ddc2d3
rename(network, i)
williaster Sep 8, 2020
a863dda
rename(network, ii)
williaster Sep 8, 2020
67a176a
rename(pattern, i)
williaster Sep 8, 2020
f8d3d55
rename(pattern, ii)
williaster Sep 8, 2020
a32af45
rename(point, i)
williaster Sep 8, 2020
6cbd838
rename(point, ii)
williaster Sep 8, 2020
606fdbd
rename(react-spring, i)
williaster Sep 8, 2020
3bed6e8
rename(react-spring, ii)
williaster Sep 8, 2020
8cadf62
rename(responsive, i)
williaster Sep 8, 2020
3e0bb42
rename(responsive, ii)
williaster Sep 8, 2020
df5d67b
rename(scale, i)
williaster Sep 8, 2020
d3f26f1
rename(scale, ii)
williaster Sep 8, 2020
b4148f1
rename(shape, i)
williaster Sep 9, 2020
71132fd
rename(shape, ii)
williaster Sep 9, 2020
35b108d
rename(stats, i)
williaster Sep 9, 2020
69e70dc
rename(stats, ii)
williaster Sep 9, 2020
8198282
rename(text, i)
williaster Sep 9, 2020
3e0dece
rename(text, ii)
williaster Sep 9, 2020
f20c21c
rename(threshold, i)
williaster Sep 9, 2020
a2d02fc
rename(threshold, ii)
williaster Sep 9, 2020
061252c
rename(tooltip, i)
williaster Sep 9, 2020
0914d7e
rename(tooltip, ii)
williaster Sep 9, 2020
84bb051
rename(voronoi, i)
williaster Sep 9, 2020
72010e8
rename(voronoi, ii)
williaster Sep 9, 2020
814a318
rename(xychart, i)
williaster Sep 9, 2020
24315d6
rename(xychart, ii)
williaster Sep 9, 2020
cd5f846
rename(zoom, i)
williaster Sep 9, 2020
cbc74a7
rename(zoom, ii)
williaster Sep 9, 2020
a87968b
rename(umbrella, i)
williaster Sep 9, 2020
49d4a5c
rename(umbrella, ii)
williaster Sep 9, 2020
4bd2549
rename(root misc)
williaster Sep 9, 2020
336620b
rename(demo, v)
williaster Sep 9, 2020
6698da0
rename(demo url)
williaster Sep 9, 2020
7364f1c
fix(demo): misc fixes
williaster Sep 9, 2020
8dce870
rename(xychart): misc fixes
williaster Sep 16, 2020
7d5ea4c
rename(demo/xychart): misc fixes
williaster Sep 16, 2020
b074d48
rename: vx.demo.now.sh => airbnb.io/visx
williaster Sep 18, 2020
bdf2e0f
rename(README, visx-demo.hmtl): misc vx => visx
williaster Sep 20, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
32 changes: 16 additions & 16 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@ Contributions welcome! Please follow the [code of conduct](./CODE_OF_CONDUCT.md)
## Overview

[Yarn workspaces](https://yarnpkg.com/lang/en/docs/workspaces/) are used to manage dependencies and
build config across packages in the umbrella `vx` monorepo, and
build config across packages in the umbrella `visx` monorepo, and
[lerna](https://github.com/lerna/lerna/) is used to manage versioning.

## Project structure

```
vx/
visx/
lerna.json
package.json
packages/
vx-package-1/
visx-package-1/
src/
test/
build/
package.json
...
vx-package-2/
visx-package-2/
...
...
```
Expand All @@ -34,11 +34,11 @@ Run the following to setup your local dev environment:
# Install `yarn`, alternatives at https://yarnpkg.com/en/docs/install
curl -o- -L https://yarnpkg.com/install.sh | bash

# Clone or fork `vx`
git clone git@github.com:hshoff/vx.git # or your fork
cd vx
# Clone or fork `visx`
git clone git@github.com:airbnb/visx.git # or your fork
cd visx

# install dependencies, and have `yarn` symlink within-`vx` dependencies
# install dependencies, and have `yarn` symlink within-`visx` dependencies
yarn

# build packages and generate types for local development
Expand All @@ -51,25 +51,25 @@ Upon modification of a single `package` you can run

```sh
# build the package as cjs version
yarn build-one --workspaces=@vx/package
yarn build-one --workspaces=@visx/package

# build the esm version (the @vx/demo next server sources these files)
yarn build-one --workspaces=@vx/package --esm
# build the esm version (the @visx/demo next server sources these files)
yarn build-one --workspaces=@visx/package --esm

# generate d.ts(definition files) for a lib
yarn type-one --workspaces=@vx/package --esm
yarn type-one --workspaces=@visx/package --esm
```

from the `vx` monorepo root to re-build the package with your changes.
from the `visx` monorepo root to re-build the package with your changes.

#### Running demo pages

You can use the local [`next.js`](https://nextjs.org) dev server within `packages/vx-demo` to view
and iterate on your changes in the gallery. From the `packages/vx-demo` folder run `yarn dev` to
You can use the local [`next.js`](https://nextjs.org) dev server within `packages/visx-demo` to view
and iterate on your changes in the gallery. From the `packages/visx-demo` folder run `yarn dev` to
start the next server which (if correctly sym-linked) will also watch for changes you make to other
packages (upon re-building them).

#### Config generation

`vx` uses [`@airbnb/nimbus`](https://github.com/airbnb/nimbus) to generate build configuration for
`visx` uses [`@airbnb/nimbus`](https://github.com/airbnb/nimbus) to generate build configuration for
`eslint`, `prettier`, `jest`, `babel`, and `typescript`.
85 changes: 38 additions & 47 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
</p>

<p align="center">
<a title="npm version" href="https://www.npmjs.com/~vx">
<img src="https://img.shields.io/npm/v/@vx/demo.svg?style=flat-square" />
<a title="npm version" href="https://www.npmjs.com/~visx">
<img src="https://img.shields.io/npm/v/@visx/demo.svg?style=flat-square" />
</a>
<a title="build status" href="https://travis-ci.org/hshoff/vx">
<img src="https://travis-ci.org/hshoff/vx.svg?branch=master" />
<a title="build status" href="https://travis-ci.org/airbnb/visx">
<img src="https://travis-ci.org/airbnb/visx.svg?branch=master" />
</a>
<a href='https://coveralls.io/github/hshoff/vx?branch=master'>
<img src='https://coveralls.io/repos/github/hshoff/vx/badge.svg?branch=master' alt='Coverage Status' />
<a href='https://coveralls.io/github/airbnb/visx?branch=master'>
<img src='https://coveralls.io/repos/github/airbnb/visx/badge.svg?branch=master' alt='Coverage Status' />
</a>
<a title="@vx/shape npm downloads" href="https://www.npmjs.com/package/@vx/shape">
<img src="https://img.shields.io/npm/dm/@vx/shape.svg?style=flat-square" />
<a title="@visx/shape npm downloads" href="https://www.npmjs.com/package/@visx/shape">
<img src="https://img.shields.io/npm/dm/@visx/shape.svg?style=flat-square" />
</a>
<a title="Join the community on Spectrum" href="https://spectrum.chat/vx">
<img src="https://withspectrum.github.io/badge/badge.svg" />
Expand All @@ -25,28 +25,28 @@
</a>
</p>

### vx
### visx

vx is a collection of reusable low-level visualization components. vx combines the power of d3 to
generate your visualization with the benefits of react for updating the DOM.
visx is a collection of reusable low-level visualization components. visx combines the power of d3
to generate your visualization with the benefits of react for updating the DOM.

<br />

<p align="center">
<strong>
<a href="https://vx-demo.now.sh">Docs</a>
<a href="https://visx-demo.now.sh">Docs</a>
williaster marked this conversation as resolved.
Show resolved Hide resolved
</strong>
&bull;
<strong>
<a href="https://vx-demo.now.sh/gallery">Gallery</a>
<a href="https://visx-demo.now.sh/gallery">Gallery</a>
</strong>
&bull;
<strong>
<a href="https://medium.com/vx-code/getting-started-with-vx-1756bb661410">Blog</a>
</strong>
&bull;
<strong>
<a href="https://d3-slackin.herokuapp.com/" title="Join https://d3js.slack.com">Slack #vx</a>
<a href="https://d3-slackin.herokuapp.com/" title="Join https://d3js.slack.com">Slack #visx</a>
</strong>
&bull;
<strong>
Expand All @@ -59,8 +59,8 @@ generate your visualization with the benefits of react for updating the DOM.
</p>

<p align="center">
<a href="https://vx-demo.now.sh/gallery">
<img src="./assets/vx-gallery.png" />
<a href="https://visx-demo.now.sh/gallery">
<img src="./assets/visx-gallery.png" />
</a>
</p>

Expand All @@ -73,19 +73,19 @@ Let's make a simple bar graph.
First we'll install the relevant packages:

```
$ npm install --save @vx/mock-data @vx/group @vx/shape @vx/scale
$ npm install --save @visx/mock-data @visx/group @visx/shape @visx/scale
```

<img src="./assets/simplebar.png" height="150" />

```javascript
import React from 'react';
import { letterFrequency } from '@vx/mock-data';
import { Group } from '@vx/group';
import { Bar } from '@vx/shape';
import { scaleLinear, scaleBand } from '@vx/scale';
import { letterFrequency } from '@visx/mock-data';
import { Group } from '@visx/group';
import { Bar } from '@visx/shape';
import { scaleLinear, scaleBand } from '@visx/scale';

// We'll use some mock data from `@vx/mock-data` for this.
// We'll use some mock data from `@visx/mock-data` for this.
const data = letterFrequency;

// Define the graph dimensions and margins
Expand Down Expand Up @@ -145,21 +145,21 @@ function BarGraph(props) {
// <BarGraph />
```

For more examples using `vx`, check out the [gallery](https://vx-demo.now.sh/gallery).
For more examples using `visx`, check out the [gallery](https://visx-demo.now.sh/gallery).

## Motivation

**Goal**

The goal is to create a library of components you can use to make both your own reusable chart
library or your slick custom one-off chart. vx is largely unopinionated and is meant to be built
library or your slick custom one-off chart. visx is largely unopinionated and is meant to be built
upon. Keep your bundle sizes down and use only the packages you need.

**How?**

Under the hood, vx is using d3 for the calculations and math. If you're creating your own awesome
chart library on top of vx, it's easy to create a component api that hides d3 entirely. Meaning your
team could create charts as easily as using reusable react components.
Under the hood, visx is using d3 for the calculations and math. If you're creating your own awesome
chart library on top of visx, it's easy to create a component api that hides d3 entirely. Meaning
your team could create charts as easily as using reusable react components.

**But why?**

Expand All @@ -168,15 +168,6 @@ Mixing two mental models for updating the DOM is never a good time. Copy and pas
reusable visualization charts or library without having to learn d3. No more selections or
`enter()`/`exit()`/`update()`.

## Status

`Beta` We're still in pre v1. Need to add interactions. No breaking changes planned right now
[read more](https://github.com/hshoff/vx/issues/156#issuecomment-331318108). Check out
[the road to v1](https://github.com/hshoff/vx/projects/1).

If you're a curious coder, feel free to install and play around with the packages. I recommend using
`--save-exact` when you `npm install`.

## Roadmap

Lots coming soon, check out the [roadmap](./ROADMAP.md).
Expand All @@ -196,7 +187,7 @@ Lots coming soon, check out the [roadmap](./ROADMAP.md).
- Collapsible tree with [`react-move`](https://github.com/react-tools/react-move) by
[@techniq](https://github.com/techniq) ([Demo](https://codesandbox.io/s/n3w687vmqj))
([Radial demo](https://codesandbox.io/s/vmqwrkl395))
([More info](https://github.com/hshoff/vx/issues/162#issuecomment-335029517))
([More info](https://github.com/airbnb/visx/issues/162#issuecomment-335029517))
- Bitcoin 30-day price by [@hshoff](https://github.com/hshoff)
([Demo](https://viewsource.now.sh/bitcoin))
([Github](https://github.com/hshoff/viewsource#1-bitcoin-price-chart))
Expand Down Expand Up @@ -225,24 +216,24 @@ Lots coming soon, check out the [roadmap](./ROADMAP.md).

## FAQ

1. What does `vx` stand for?
1. What does `visx` stand for?

> vx stands for visualization components.
> visx stands for visualization components.

1. Do you plan on supporting animation/transitions?

> A common criticism of vx is it doesn't have animation baked in, but this was a concious choice.
> It's a powerful feature to not bake it in.
> A common criticism of visx is it doesn't have animation baked in, but this was a concious
> choice. It's a powerful feature to not bake it in.
>
> Imagine your app already bundles `react-motion`, adding a hypothetical `@vx/animation` is
> bloat. Since vx is react, it already supports all react animation libs.
> Imagine your app already bundles `react-motion`, adding a hypothetical `@visx/animation` is
> bloat. Since visx is react, it already supports all react animation libs.
>
> Charting libraries are like style guides. Each org or app will eventually want full control
> over their own implementation.
>
> vx makes this easier for everyone. No need to reinvent the wheel each time.
> visx makes this easier for everyone. No need to reinvent the wheel each time.
>
> more info: https://github.com/hshoff/vx/issues/6
> more info: https://github.com/airbnb/visx/issues/6
>
> examples:
>
Expand All @@ -260,7 +251,7 @@ Lots coming soon, check out the [roadmap](./ROADMAP.md).

> Please do.

1. Does vx work with [preact](https://preactjs.com/)?
1. Does visx work with [preact](https://preactjs.com/)?

> yup! need to alias `react` + `react-dom` and use `preact-compat`. Here's a quick demo:
> https://vx-preact.now.sh/.
williaster marked this conversation as resolved.
Show resolved Hide resolved
Expand All @@ -276,6 +267,6 @@ Please see [CONTRIBUTING.md](./CONTRIBUTING.md)

:v:

[MIT](./LICENSE) &bull; [@hshoff](https://twitter.com/hshoff)
[MIT](./LICENSE)

[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fhshoff%2Fvx.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fhshoff%2Fvx?ref=badge_large)
File renamed without changes
File renamed without changes
33 changes: 23 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,40 @@
{
"name": "@vx/root",
"name": "@visx/root",
"license": "MIT",
"version": "0.0.0",
"description": "Low-level visualization components",
"keywords": [
"react",
"d3",
"visualization",
"vx",
"visx",
"charts"
],
"engines": {
"node": ">=10.15.0",
"yarn": ">=1.17.0"
},
"author": "@hshoff",
"contributors": [
{
"name": "Harrison Shoff",
"url": "https://github.com/hshoff"
},
{
"name": "Chris Williams",
"url": "https://github.com/williaster"
},
{
"name": "Krist Wongsuphasawat",
"url": "https://github.com/kristw"
}
],
"private": true,
"scripts": {
"build": "yarn run babel && yarn run type:dts",
"build-one": "nimbus babel --clean",
"babel": "yarn run babel:cjs && yarn run babel:esm",
"babel:cjs": "nimbus babel --clean --workspaces=\"@vx/!(demo)\"",
"babel:esm": "nimbus babel --clean --workspaces=\"@vx/!(demo)\" --esm",
"babel:cjs": "nimbus babel --clean --workspaces=\"@visx/!(demo)\"",
"babel:esm": "nimbus babel --clean --workspaces=\"@visx/!(demo)\" --esm",
"clean": "rm -rf ./packages/**/{lib,esm}",
"format": "yarn run prettier --write",
"jest": "NODE_ENV=test nimbus jest --coverage --verbose",
Expand Down Expand Up @@ -102,12 +115,12 @@
"!packages/**/esm/**",
"!packages/**/lib/**",
"!packages/**/node_modules/**",
"!packages/vx-demo/**",
"!packages/vx-vx/**"
"!packages/visx-demo/**",
"!packages/visx-visx/**"
],
"testPathIgnorePatterns" : [
"<rootDir>/packages/vx-demo",
"<rootDir>/packages/vx-vx"
"<rootDir>/packages/visx-demo",
"<rootDir>/packages/visx-visx"
],
"coverageThreshold": {
"global": {
Expand Down Expand Up @@ -165,7 +178,7 @@
}
},
{
"files": "./packages/vx-demo/**",
"files": "./packages/visx-demo/**",
"rules": {
"@typescript-eslint/no-explicit-any": [
"warn",
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# @vx/annotation
# @visx/annotation

<p>
<a title="@vx/annotation npm downloads" href="https://www.npmjs.com/package/@vx/annotation">
<img src="https://img.shields.io/npm/dm/@vx/annotation.svg?style=flat-square" />
<a title="@visx/annotation npm downloads" href="https://www.npmjs.com/package/@visx/annotation">
<img src="https://img.shields.io/npm/dm/@visx/annotation.svg?style=flat-square" />
</a>
</p>

Expand All @@ -15,5 +15,5 @@ react-annotation.
## Installation

```
npm install --save @vx/annotation
npm install --save @visx/annotation
```
Loading