Skip to content
This repository was archived by the owner on May 15, 2022. It is now read-only.

Commit 7962c1e

Browse files
Merge pull request #3 from rohan-deshpande/master
Made updates to README and bumped to `v2.0.0` as we now have a requirement for a React v16.0.0 peer dependency
2 parents 9710c38 + b6c362c commit 7962c1e

File tree

4 files changed

+96
-58
lines changed

4 files changed

+96
-58
lines changed

CHANGELOG.md

Lines changed: 72 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,117 +1,143 @@
1-
# Release Notes
1+
# Changelog
2+
3+
## (2019-01-02) `v2.0.0`
4+
5+
### Added
6+
7+
- `DatFolder` now accepts a `closed` boolean prop to determine if the folder should be closed or open by default
8+
9+
### Changed
10+
11+
- React v16.0.0 is now required as a peer dependency
12+
- README updated with more docs, included a note about the React v16 peer dependency
13+
14+
## (2017-12-09) `v1.0.3`
15+
16+
### Added
17+
18+
- Section on React version to README
19+
- Point regarding animations for `DatFolder` to Roadmap
20+
- License section to README
21+
22+
## (2017-10-09) `v1.0.2`
23+
24+
### Changed
25+
26+
- Minor code formatting updates
27+
- Installation guidelines
228

329
## (2017-10-09) `v1.0.1`
430

531
### Changed
632

7-
* ES7 property initializers are now used to set initial state in all components rather than `componentWillMount`
33+
- ES7 property initializers are now used to set initial state in all components rather than `componentWillMount`
834

935
## (2017-10-09) `v1.0.0`
1036

1137
### Added
1238

13-
* A lot of documentation to the README
14-
* Deploy script to `./example` app which deploys to github pages
39+
- A lot of documentation to the README
40+
- Deploy script to `./example` app which deploys to github pages
1541

1642
### Changed
1743

18-
* Changed default export from `Dat` to `DatGui`
44+
- Changed default export from `Dat` to `DatGui`
1945

2046
## (2017-10-08) `v0.0.21`
2147

2248
### Changed
2349

24-
* Removed custom check box styling from `DatBoolean` component
25-
* Ensured sliders are the same height as number inputs
26-
* Minor style changes for consistency
50+
- Removed custom check box styling from `DatBoolean` component
51+
- Ensured sliders are the same height as number inputs
52+
- Minor style changes for consistency
2753

2854
## (2017-10-08) `v0.0.20`
2955

30-
### Changed
56+
### Changed
3157

32-
* Housekeeping in preparation for `v1.0.0`
58+
- Housekeeping in preparation for `v1.0.0`
3359

3460
## (2017-10-06) `v0.0.19`
3561

3662
### Added
3763

38-
* `DatPresets` component - this allows you to set presets for your DatGUI component and switch between them easily
64+
- `DatPresets` component - this allows you to set presets for your DatGUI component and switch between them easily
3965

4066
### Changed
4167

42-
* Removed final reference to `reactcss`, this can be completely removed from dependencies now
43-
* Removed unnecessary arrow functions in some `setState` callbacks
44-
* Fixed bug where `DatNumber` input updates weren't updating sliders
68+
- Removed final reference to `reactcss`, this can be completely removed from dependencies now
69+
- Removed unnecessary arrow functions in some `setState` callbacks
70+
- Fixed bug where `DatNumber` input updates weren't updating sliders
4571

4672
## (2017-10-05) `v0.0.18`
4773

48-
### Added
74+
### Added
4975

50-
* `DatColor` component - this allows color pickers, powered by `react-color` to be rendered for mutating colors
51-
* Added `example:promote` script for pushing development code up from `example/src/dev` into `src`
76+
- `DatColor` component - this allows color pickers, powered by `react-color` to be rendered for mutating colors
77+
- Added `example:promote` script for pushing development code up from `example/src/dev` into `src`
5278

5379
### Changed
5480

55-
* Example updated with `DatColor` included
81+
- Example updated with `DatColor` included
5682

5783
## (2017-10-04) `v0.0.17`
5884

5985
### Added
6086

61-
* `DatSelect` component
87+
- `DatSelect` component
6288

6389
### Changed
6490

65-
* Example updated with `DatSelect` included
91+
- Example updated with `DatSelect` included
6692

6793
## (2017-10-03) `v0.0.16`
6894

6995
### Added
7096

71-
* Support for nested folders via `DatFolder`
97+
- Support for nested folders via `DatFolder`
7298

73-
### Changed
99+
### Changed
74100

75-
* Example `App.js` has been updated to include a nested folder example
101+
- Example `App.js` has been updated to include a nested folder example
76102

77103
## (2017-10-02) `v0.0.15`
78104

79105
### Changed
80106

81-
* SCSS is now broken up into partials which align with the various components
107+
- SCSS is now broken up into partials which align with the various components
82108

83109
### Added
84110

85-
* Added `DatFolder` component
86-
* Added this to the example
111+
- Added `DatFolder` component
112+
- Added this to the example
87113

88114
## (2017-10-02) `v0.0.14`
89115

90116
### Changed
91117

92-
* Updated component files to use `.js` file extension rather than `.jsx`
93-
* Removed `examples` directory and created single `example` directory which is now powered by `create-react-app`
94-
* Rewrote `webpack.config.js` so that it is compatible with Webpack v2
95-
* Updated a bunch of dependencies in `package.json`
96-
* Separated out `Slider` component from `DatNumber` and also added `utils` file
97-
* Switched all event handlers in components to ES7 syntax
98-
* Some code formatting
99-
* Changed `build` directory to `dist`
118+
- Updated component files to use `.js` file extension rather than `.jsx`
119+
- Removed `examples` directory and created single `example` directory which is now powered by `create-react-app`
120+
- Rewrote `webpack.config.js` so that it is compatible with Webpack v2
121+
- Updated a bunch of dependencies in `package.json`
122+
- Separated out `Slider` component from `DatNumber` and also added `utils` file
123+
- Switched all event handlers in components to ES7 syntax
124+
- Some code formatting
125+
- Changed `build` directory to `dist`
100126

101127
### Added
102128

103-
* `example` directory
104-
* `src/components/Slider.js`
105-
* `src/components/utils.js`
106-
* `src/style` directory
107-
* `.editorconfig` file
108-
* `.eslintrc.json` file
109-
* `.babelrc` file
110-
* `scripts` directory
111-
* A number of `npm` scripts to `package.json`
112-
* This change log!
129+
- `example` directory
130+
- `src/components/Slider.js`
131+
- `src/components/utils.js`
132+
- `src/style` directory
133+
- `.editorconfig` file
134+
- `.eslintrc.json` file
135+
- `.babelrc` file
136+
- `scripts` directory
137+
- A number of `npm` scripts to `package.json`
138+
- This change log!
113139

114140
### Removed
115141

116-
* The build no longer creates minified files, can add these back if required but I think it's better for the user to perform this step in their own build pipeline
117-
* ES5 examples, don't think many people are coding with React and ES5 nowadays
142+
- The build no longer creates minified files, can add these back if required but I think it's better for the user to perform this step in their own build pipeline
143+
- ES5 examples, don't think many people are coding with React and ES5 nowadays

README.md

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ For those that haven't used or seen dat.GUI before, it's basically a GUI for upd
88

99
- [Demo](#demo)
1010
- [Installation](#installation)
11+
* [React Version](#react-version)
1112
- [Usage](#usage)
1213
- [Docs](#docs)
1314
* [`DatGui`](#datgui)
@@ -36,6 +37,7 @@ For those that haven't used or seen dat.GUI before, it's basically a GUI for upd
3637
+ [`toc`](#toc)
3738
- [What's missing](#whats-missing)
3839
- [Roadmap](#roadmap)
40+
- [License](#license)
3941

4042
## Demo
4143

@@ -49,6 +51,10 @@ The demo is a deployed version of the latest production build of `./example`. Th
4951
npm install react-dat-gui --save
5052
```
5153

54+
### React Version
55+
56+
React dat.GUI uses React and React-DOM `^16.0.0` aka React Fiber. It's recommended that you update your app's React version to align with this in order to avoid any issues.
57+
5258
## Usage
5359

5460
First you'll need a wrapper component which will handle the updates from your dat.GUI, this component should pass the data for the GUI to control as well as an `onUpdate` function to the `DatGui` container component as props. Here's how you might do that:
@@ -69,13 +75,13 @@ class App extends Component {
6975
}
7076
}
7177
72-
update = data => this.setState({ data })
78+
handleUpdate = data => this.setState({ data })
7379
7480
render() {
7581
const { data } = this.state;
7682
7783
return (
78-
<DatGui data={data} onUpdate={this.update}>
84+
<DatGui data={data} onUpdate={this.handleUpdate}>
7985
<DatString path='package' label='Package' />
8086
<DatNumber path='power' label='Power' min={9000} max={9999} step={1} />
8187
<DatBoolean path='isAwesome' label='Awesome?' />
@@ -97,16 +103,16 @@ This is the main container component for your GUI and is the default export from
97103

98104
##### required
99105

100-
* `data` - The data your dat.GUI controller will mutate
101-
* `onUpdate` - The method which will be called whenever an update is handled by the controller
102-
* `children` - The dat.GUI components that make up the controller
106+
* `data: object` - The data your dat.GUI controller will mutate
107+
* `onUpdate: func` - The method which will be called whenever an update is handled by the controller
108+
* `children: array` - The dat.GUI components that make up the controller
103109

104110
##### optional
105111

106-
* `liveUpdate` - Determines if live updates should occur, defaults to `true`
107-
* `labelWidth` - The width of the labels in pixels, defaults to `40`
108-
* `className` - The class name to set on the `DatGui` div
109-
* `style` - The style object to set on the `DatGui` div
112+
* `liveUpdate: bool` - Determines if live updates should occur, defaults to `true`
113+
* `labelWidth: number` - The width of the labels in pixels, defaults to `40`
114+
* `className: string` - The class name to set on the `DatGui` div
115+
* `style: object` - The style object to set on the `DatGui` div
110116

111117
### Components
112118

@@ -258,6 +264,12 @@ For the first, I think the fact that this is now an NPM module sort of goes agai
258264
Local storage however is in the roadmap and will probably be done very soon.
259265

260266
## Roadmap
267+
261268
* Loading and storing both default and preset data via `localStorage`
262-
* Time travel with undo/redo buttons (edited)
269+
* Animations for `DatFolder` expanding/collapsing
270+
* Time travel with undo/redo buttons
263271
* Better support for floating point `DatNumber`s (rounding etc.)
272+
273+
## License
274+
275+
[MIT](https://opensource.org/licenses/MIT)

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-dat-gui",
3-
"version": "1.1.2",
3+
"version": "2.0.0",
44
"description": "dat.GUI reimagined for React",
55
"main": "build/react-dat-gui.js",
66
"style": "build/react-dat-gui.css",

0 commit comments

Comments
 (0)