Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
aronhelser authored May 2, 2018
2 parents 07be8c5 + 3b48785 commit a351395
Show file tree
Hide file tree
Showing 14 changed files with 13,834 additions and 253 deletions.
20 changes: 17 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,22 @@ cache:
directories:
- node_modules
node_js:
- "4"
- "8"
notifications:
email: false
email:
recipients:
- [email protected]
on_success: change
on_failure: always
install:
- npm install
- npm install

script:
- npm run build

after_success:
- npm run semantic-release

branches:
except:
- "/^v\\d+\\.\\d+\\.\\d+$/"
49 changes: 0 additions & 49 deletions AUTHORS.txt

This file was deleted.

15 changes: 14 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
## Change Log

### 3.4.0 (2017/10/16 13:36 +00:00)
### 3.4.3 (2018/04/11 15:12 +00:00)
- [#207](https://github.com/wwayne/react-tooltip/pull/207) Return tooltip to original position when possible (@hassanbot)
- [#301](https://github.com/wwayne/react-tooltip/pull/301) insert css as first to allow easy css styling without important (@roblan)

### 3.4.2 (2018/04/09 18:58 +00:00)
- [#373](https://github.com/wwayne/react-tooltip/pull/373) fix(example): 'made dev' works again, small fixes. (@aronhelser)
- [#337](https://github.com/wwayne/react-tooltip/pull/337) Fix README show tip usage error (@gaohailang)
- [#359](https://github.com/wwayne/react-tooltip/pull/359) License should use H2 as the previous sections do (@konekoya)

### 3.4.1 (2018/04/05 17:24 +00:00)
- [#369](https://github.com/wwayne/react-tooltip/pull/369) fix(index.js): add missing argument so tooltip hides. (@aronhelser)
- [#372](https://github.com/wwayne/react-tooltip/pull/372) Travis: update node version to fix travis build. (@aronhelser)

### 3.4.0 (2017/10/16 13:39 +00:00)
- [#321](https://github.com/wwayne/react-tooltip/pull/321) React 16 support (@mikecousins)

### 3.3.1 (2017/10/05 05:08 +00:00)
Expand Down
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
[download-image]: https://img.shields.io/npm/dm/react-tooltip.svg?style=flat-square
[download-url]: https://npmjs.org/package/react-tooltip

## Looking for maintainers
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 :)

## Maintainers

[huumanoid](https://github.com/huumanoid)

[aronhelser](https://github.com/aronhelser)

## Installation

```sh
Expand Down Expand Up @@ -112,7 +112,7 @@ import {findDOMNode} from 'react-dom'
import ReactTooltip from 'react-tooltip'

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

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

## Authors
see [AUTHORS](https://github.com/wwayne/react-tooltip/blob/master/AUTHORS.txt)
## Contributing

We welcome your contribution! Fork the repo, make some changes, submit a pull-request! Our [contributing](contributing.md) doc has some details.

### License
## License

MIT
28 changes: 28 additions & 0 deletions contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Contributing

This doc needs help! Please submit your PR...

## Commit messages

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.

## Pull request testing

Some notes on testing and releasing.
* For a PR, follow Github's command-line instructions for retrieving the branch with the changes.
* `make dev` starts a development server, open `http://localhost:8888` to see the example website.
* Provide feedback on the PR about your results.

## Doing a release

We are using semantic-release instead of this:

* `make deploy` updates the files in the `standalone` directory
* update the version number in `package.json`
- Fixes update the patch number, features update the minor number.
- Major version update is reserved for API breaking changes, not just additions.
* `npm run github-changes -- -n 3.X.Y` to update the changelog
* `git add`, `git commit` and `git push` to get the version to master.
* `git tag -a 3.X.Y -m 3.X.Y` `git push --tags`
* `npm publish`
* add a version on the github release page, based on the tag
53 changes: 44 additions & 9 deletions example/src/index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
'use strict'

import React, { Component } from 'react'
import {render, findDOMNode} from 'react-dom'
import React from 'react'
import ReactDOM from 'react-dom'
import ReactTooltip from '../../src'

class Test extends Component {
class Test extends React.Component {
constructor(props) {
super(props);
this.state = {
Expand Down Expand Up @@ -157,8 +157,8 @@ class Test extends Component {
<ReactTooltip id='custom-off-event'/>
{/*
<div>
<button onClick={() => { ReactTooltip.show(findDOMNode(this.refs.target)) }}>Show toolip</button>
<button onClick={() => { ReactTooltip.hide(findDOMNode(this.refs.target)) }}>Hide toolip</button>
<button onClick={() => { ReactTooltip.show(ReactDOM.findDOMNode(this.refs.target)) }}>Show toolip</button>
<button onClick={() => { ReactTooltip.hide(ReactDOM.findDOMNode(this.refs.target)) }}>Hide toolip</button>
</div>
*/}
</div>
Expand Down Expand Up @@ -231,7 +231,7 @@ class Test extends Component {
<div className="side">
<a data-for='overTime' data-tip>=( •̀д•́)</a>
<ReactTooltip id='overTime'
getContent={[() => {return new Date().toISOString()}, 1000]}/>
getContent={[() => {return 'Random length content'.slice(0, Math.floor(Math.random() * 21) + 1)}, 1000]}/>
</div>
</div>
<br />
Expand All @@ -241,8 +241,43 @@ class Test extends Component {
"<ReactTooltip id='getContent' getContent={() => Math.floor(Math.random() * 100)} />"}</p>
</div>
<div>
<p>{"<a data-for='overTime' data-tip>=( •̀д•́)</a>\n" +
"<ReactTooltip id='overTime' getContent={[() => {return new Date().toISOString()}, 1000]}/>"}</p>
<p>{"<a data-for='overTime' data-tip>=( •̀д•́)</a>\naaaa" +
"<ReactTooltip id='overTime' getContent={[() => {\n" +
" return 'Random length content'.slice(0, Math.floor(Math.random() * 21) + 1)\n" +
"}, 1000]}/>"}</p>
</div>
</pre>
</div>
<div className="section">
<h4 className='title'>Test Scrolling</h4>
<p className="sub-title"></p>
<div className="example-jsx" style={{ height: '200px' }}>
<div className="side" style={{ overflow: 'auto', height: '200px' }}>
<div data-for='scrollContent' data-tip data-iscapture='true' style={{ width: '5000px', height: '5000px' }}>
Scroll me with the mouse wheel.<br/>
The tootlip will hide.<br/>
Make sure you set data-iscapture="true"
</div>
<ReactTooltip id='scrollContent' getContent={() => Math.floor(Math.random() * 100)}/>
</div>
<div className="side" style={{ overflow: 'auto', height: '200px' }}>
<div data-for='scrollTime' data-tip data-iscapture='true' data-scroll-hide='false' style={{ width: '5000px', height: '5000px' }}>
Scroll me with the mouse wheel.<br/>
The tootlip will stay visible.
</div>
<ReactTooltip id='scrollTime'
getContent={[() => {return new Date().toISOString()}, 1000]}/>
</div>
</div>
<br />
<pre className='example-pre'>
<div>
<p>{"<div data-for='scrollContent' data-tip data-iscapture='true'\n style={{ width: '5000px', height: '5000px' }}>...</div>\n" +
"<ReactTooltip id='scrollContent' getContent={() => Math.floor(Math.random() * 100)}/>"}</p>
</div>
<div>
<p>{"<div data-for='scrollTime' data-tip data-iscapture='true' data-scroll-hide='false'\n style={{ width: '5000px', height: '5000px' }}>...</div>\n" +
"<ReactTooltip id='scrollTime' getContent={[() => {return new Date().toISOString()}, 1000]}/>"}</p>
</div>
</pre>
</div>
Expand All @@ -252,4 +287,4 @@ class Test extends Component {
}
}

render(<Test />, document.getElementById('main'))
ReactDOM.render(<Test />, document.getElementById('main'))
Loading

0 comments on commit a351395

Please sign in to comment.