Skip to content

Commit a351395

Browse files
authored
Merge branch 'master' into master
2 parents 07be8c5 + 3b48785 commit a351395

File tree

14 files changed

+13834
-253
lines changed

14 files changed

+13834
-253
lines changed

.travis.yml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,22 @@ cache:
33
directories:
44
- node_modules
55
node_js:
6-
- "4"
6+
- "8"
77
notifications:
8-
email: false
8+
email:
9+
recipients:
10+
11+
on_success: change
12+
on_failure: always
913
install:
10-
- npm install
14+
- npm install
15+
16+
script:
17+
- npm run build
18+
19+
after_success:
20+
- npm run semantic-release
21+
22+
branches:
23+
except:
24+
- "/^v\\d+\\.\\d+\\.\\d+$/"

AUTHORS.txt

Lines changed: 0 additions & 49 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
## Change Log
22

3-
### 3.4.0 (2017/10/16 13:36 +00:00)
3+
### 3.4.3 (2018/04/11 15:12 +00:00)
4+
- [#207](https://github.com/wwayne/react-tooltip/pull/207) Return tooltip to original position when possible (@hassanbot)
5+
- [#301](https://github.com/wwayne/react-tooltip/pull/301) insert css as first to allow easy css styling without important (@roblan)
6+
7+
### 3.4.2 (2018/04/09 18:58 +00:00)
8+
- [#373](https://github.com/wwayne/react-tooltip/pull/373) fix(example): 'made dev' works again, small fixes. (@aronhelser)
9+
- [#337](https://github.com/wwayne/react-tooltip/pull/337) Fix README show tip usage error (@gaohailang)
10+
- [#359](https://github.com/wwayne/react-tooltip/pull/359) License should use H2 as the previous sections do (@konekoya)
11+
12+
### 3.4.1 (2018/04/05 17:24 +00:00)
13+
- [#369](https://github.com/wwayne/react-tooltip/pull/369) fix(index.js): add missing argument so tooltip hides. (@aronhelser)
14+
- [#372](https://github.com/wwayne/react-tooltip/pull/372) Travis: update node version to fix travis build. (@aronhelser)
15+
16+
### 3.4.0 (2017/10/16 13:39 +00:00)
417
- [#321](https://github.com/wwayne/react-tooltip/pull/321) React 16 support (@mikecousins)
518

619
### 3.3.1 (2017/10/05 05:08 +00:00)

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
[download-image]: https://img.shields.io/npm/dm/react-tooltip.svg?style=flat-square
88
[download-url]: https://npmjs.org/package/react-tooltip
99

10-
## Looking for maintainers
11-
I learnt a lot from creating and maintaining react-toolip, but now I start putting my focus on other challenges, so just let me know by sending email to [email protected] if you have interests in maintaining the project :)
12-
1310
## Maintainers
11+
1412
[huumanoid](https://github.com/huumanoid)
1513

14+
[aronhelser](https://github.com/aronhelser)
15+
1616
## Installation
1717

1818
```sh
@@ -112,7 +112,7 @@ import {findDOMNode} from 'react-dom'
112112
import ReactTooltip from 'react-tooltip'
113113

114114
<p ref='foo' data-tip='tooltip'></p>
115-
<button onClick={() => { ReactTooltip.show(this.refs.foo) }}></button>
115+
<button onClick={() => { ReactTooltip.show(findDOMNode(this.refs.foo)) }}></button>
116116
<ReactTooltip />
117117
```
118118

@@ -145,9 +145,10 @@ Same for empty children, if you don't want show the tooltip when the children is
145145
## Article
146146
[How I insert sass into react component](https://medium.com/@wwayne_me/how-i-insert-sass-into-my-npm-react-component-b46b9811c226#.gi4hxu44a)
147147

148-
## Authors
149-
see [AUTHORS](https://github.com/wwayne/react-tooltip/blob/master/AUTHORS.txt)
148+
## Contributing
149+
150+
We welcome your contribution! Fork the repo, make some changes, submit a pull-request! Our [contributing](contributing.md) doc has some details.
150151

151-
### License
152+
## License
152153

153154
MIT

contributing.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Contributing
2+
3+
This doc needs help! Please submit your PR...
4+
5+
## Commit messages
6+
7+
We are using semantic-release to automate the release process, and this depends on a specific format for commit messages. Please run `npm run commit` to use `commitizen` to properly format your commit messages so they can be automatically processed and included in release notes.
8+
9+
## Pull request testing
10+
11+
Some notes on testing and releasing.
12+
* For a PR, follow Github's command-line instructions for retrieving the branch with the changes.
13+
* `make dev` starts a development server, open `http://localhost:8888` to see the example website.
14+
* Provide feedback on the PR about your results.
15+
16+
## Doing a release
17+
18+
We are using semantic-release instead of this:
19+
20+
* `make deploy` updates the files in the `standalone` directory
21+
* update the version number in `package.json`
22+
- Fixes update the patch number, features update the minor number.
23+
- Major version update is reserved for API breaking changes, not just additions.
24+
* `npm run github-changes -- -n 3.X.Y` to update the changelog
25+
* `git add`, `git commit` and `git push` to get the version to master.
26+
* `git tag -a 3.X.Y -m 3.X.Y` `git push --tags`
27+
* `npm publish`
28+
* add a version on the github release page, based on the tag

example/src/index.js

Lines changed: 44 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
'use strict'
22

3-
import React, { Component } from 'react'
4-
import {render, findDOMNode} from 'react-dom'
3+
import React from 'react'
4+
import ReactDOM from 'react-dom'
55
import ReactTooltip from '../../src'
66

7-
class Test extends Component {
7+
class Test extends React.Component {
88
constructor(props) {
99
super(props);
1010
this.state = {
@@ -157,8 +157,8 @@ class Test extends Component {
157157
<ReactTooltip id='custom-off-event'/>
158158
{/*
159159
<div>
160-
<button onClick={() => { ReactTooltip.show(findDOMNode(this.refs.target)) }}>Show toolip</button>
161-
<button onClick={() => { ReactTooltip.hide(findDOMNode(this.refs.target)) }}>Hide toolip</button>
160+
<button onClick={() => { ReactTooltip.show(ReactDOM.findDOMNode(this.refs.target)) }}>Show toolip</button>
161+
<button onClick={() => { ReactTooltip.hide(ReactDOM.findDOMNode(this.refs.target)) }}>Hide toolip</button>
162162
</div>
163163
*/}
164164
</div>
@@ -231,7 +231,7 @@ class Test extends Component {
231231
<div className="side">
232232
<a data-for='overTime' data-tip>=( •̀д•́)</a>
233233
<ReactTooltip id='overTime'
234-
getContent={[() => {return new Date().toISOString()}, 1000]}/>
234+
getContent={[() => {return 'Random length content'.slice(0, Math.floor(Math.random() * 21) + 1)}, 1000]}/>
235235
</div>
236236
</div>
237237
<br />
@@ -241,8 +241,43 @@ class Test extends Component {
241241
"<ReactTooltip id='getContent' getContent={() => Math.floor(Math.random() * 100)} />"}</p>
242242
</div>
243243
<div>
244-
<p>{"<a data-for='overTime' data-tip>=( •̀д•́)</a>\n" +
245-
"<ReactTooltip id='overTime' getContent={[() => {return new Date().toISOString()}, 1000]}/>"}</p>
244+
<p>{"<a data-for='overTime' data-tip>=( •̀д•́)</a>\naaaa" +
245+
"<ReactTooltip id='overTime' getContent={[() => {\n" +
246+
" return 'Random length content'.slice(0, Math.floor(Math.random() * 21) + 1)\n" +
247+
"}, 1000]}/>"}</p>
248+
</div>
249+
</pre>
250+
</div>
251+
<div className="section">
252+
<h4 className='title'>Test Scrolling</h4>
253+
<p className="sub-title"></p>
254+
<div className="example-jsx" style={{ height: '200px' }}>
255+
<div className="side" style={{ overflow: 'auto', height: '200px' }}>
256+
<div data-for='scrollContent' data-tip data-iscapture='true' style={{ width: '5000px', height: '5000px' }}>
257+
Scroll me with the mouse wheel.<br/>
258+
The tootlip will hide.<br/>
259+
Make sure you set data-iscapture="true"
260+
</div>
261+
<ReactTooltip id='scrollContent' getContent={() => Math.floor(Math.random() * 100)}/>
262+
</div>
263+
<div className="side" style={{ overflow: 'auto', height: '200px' }}>
264+
<div data-for='scrollTime' data-tip data-iscapture='true' data-scroll-hide='false' style={{ width: '5000px', height: '5000px' }}>
265+
Scroll me with the mouse wheel.<br/>
266+
The tootlip will stay visible.
267+
</div>
268+
<ReactTooltip id='scrollTime'
269+
getContent={[() => {return new Date().toISOString()}, 1000]}/>
270+
</div>
271+
</div>
272+
<br />
273+
<pre className='example-pre'>
274+
<div>
275+
<p>{"<div data-for='scrollContent' data-tip data-iscapture='true'\n style={{ width: '5000px', height: '5000px' }}>...</div>\n" +
276+
"<ReactTooltip id='scrollContent' getContent={() => Math.floor(Math.random() * 100)}/>"}</p>
277+
</div>
278+
<div>
279+
<p>{"<div data-for='scrollTime' data-tip data-iscapture='true' data-scroll-hide='false'\n style={{ width: '5000px', height: '5000px' }}>...</div>\n" +
280+
"<ReactTooltip id='scrollTime' getContent={[() => {return new Date().toISOString()}, 1000]}/>"}</p>
246281
</div>
247282
</pre>
248283
</div>
@@ -252,4 +287,4 @@ class Test extends Component {
252287
}
253288
}
254289

255-
render(<Test />, document.getElementById('main'))
290+
ReactDOM.render(<Test />, document.getElementById('main'))

0 commit comments

Comments
 (0)