Skip to content

Commit 6c93a3f

Browse files
committed
Merge tag 'v0.23.5' into v0.24-rc
v0.23.5 Conflicts: package.json src/NavItem.js tools/amd/build.js tools/build-cli.js tools/release-scripts/release.js
2 parents b798b7f + d00d9c7 commit 6c93a3f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+498
-239
lines changed

Diff for: .eslintrc

+4-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
},
99
"parser": "babel-eslint",
1010
"plugins": [
11-
"react"
11+
"react",
12+
"babel"
1213
],
1314
"rules": {
1415
"comma-spacing": 2,
@@ -18,15 +19,15 @@
1819
"no-underscore-dangle": 0,
1920
"no-unused-vars": [2, { "vars": "all", "args": "none" }],
2021
"no-var": 2,
21-
"object-shorthand": 2,
22+
"babel/object-shorthand": 2,
2223
"quotes": [2, "single", "avoid-escape"],
2324
"react/display-name": 0,
2425
"react/jsx-no-undef": 2,
2526
"react/jsx-uses-react": 2,
2627
"react/no-did-mount-set-state": 2,
2728
"react/no-did-update-set-state": 2,
2829
"react/no-multi-comp": 2,
29-
"react/prop-types": [2, { ignore: [children, className] }],
30+
"react/prop-types": [2, { "ignore": [ "children", "className" ] }],
3031
"react/react-in-jsx-scope": 2,
3132
"react/self-closing-comp": 2,
3233
"react/wrap-multilines": 2,

Diff for: .gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ docs-built/
1212
tmp-bower-repo/
1313
tmp-docs-repo/
1414
.babel-cache/
15+
.coverage/

Diff for: CHANGELOG.md

+16
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
v0.23.5 - Tue, 23 Jun 2015 01:31:35 GMT
2+
---------------------------------------
3+
4+
- [23f9d21](../../commit/23f9d21) [changed] Add missed prop types validations.
5+
- [320b7ab](../../commit/320b7ab) [changed] Update fs-extra. Dev dependency.
6+
- [2ffcf5d](../../commit/2ffcf5d) [fixed] Popovers flicker when moving mouse amongst children of the trigger
7+
- [ccc50e0](../../commit/ccc50e0) [fixed] Accessibility: Panel header uses aria-controls
8+
- [1e552cc](../../commit/1e552cc) [added] Accessibility: use appropriate ARIA's when an id is given to the tabbed area
9+
- [8752754](../../commit/8752754) [added] Add linkId prop to NavItem
10+
- [722969d](../../commit/722969d) [added] Accessibility, add tab roles when type "tabs"
11+
- [4adaa70](../../commit/4adaa70) [added] Accessibility: role 'alert' and aria-label to Alert component
12+
- [2594dce](../../commit/2594dce) [fixed] Modal Null Exception when react-bootstrap is loaded before the Body tag
13+
- [e77bf88](../../commit/e77bf88) [changed] Update eslint. Dev dependency.
14+
15+
16+
117
v0.23.4 - Tue, 16 Jun 2015 00:37:04 GMT
218
---------------------------------------
319

Diff for: CONTRIBUTING.md

+21-7
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,27 @@ be interested in. Maybe somebody is trying to fix that stupid bug that bothers
1010
you. Review the PR. Do you have any better ideas how to fix this problem? Let us
1111
know...
1212

13-
## Current Issues
14-
15-
[![HuBoard][huboard-badge]][huboard]
16-
17-
We use HuBoard to triage issues and prioritize the backlog for the core dev
18-
team. Feel free to tackle any currently open [issue][issues]. The issues tagged
19-
with "help wanted" and especially those high in the backlog are fair game.
13+
## Issues
14+
15+
The issue tracker is the preferred channel for bug reports, features requests
16+
and submitting pull requests, but please respect the following restrictions:
17+
18+
- Please do not use the issue tracker for personal support requests. Stack
19+
Overflow ([react-bootstrap](http://stackoverflow.com/questions/tagged/react-bootstrap)
20+
tag), [Slack](http://www.reactiflux.com/) or
21+
[gitter](https://gitter.im/react-bootstrap/react-bootstrap) are better places
22+
to get help.
23+
- Please do not open issues or pull requests regarding the code in React or
24+
Bootstrap (open them in their respective repositories).
25+
26+
_Note: Occasionally issues are opened that are unclear, or we cannot verify them. When
27+
the issue author has not responded to our questions for verification within 7
28+
days then we will close the issue._
29+
30+
[![HuBoard][huboard-badge]][huboard] We use HuBoard to triage issues and
31+
prioritize the backlog for the core dev team. Feel free to tackle any currently
32+
open [issue][issues]. The issues tagged with "help wanted" and especially those
33+
high in the backlog are fair game.
2034

2135
## Tests
2236

Diff for: MAINTAINING.md

+5
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ room of the urgent issues. We are using
1616
[HuBoard](https://huboard.com/react-bootstrap/react-bootstrap) which is a kanban
1717
style board to track and prioritize issues.
1818

19+
Some issues are opened that are just too vague to do anything about. If after
20+
attempting to get feedback from issue authors fails after 7 days, then close the
21+
issue. Please inform the issue author that they may re-open if they are able to
22+
present the requested information.
23+
1924
## Merging a pull request
2025

2126
Please, make sure:

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Yes please! See the [contributing guidelines][contributing] for details.
4646
[documentation]: http://react-bootstrap.github.io
4747
[contributing]: https://github.com/react-bootstrap/react-bootstrap/blob/master/CONTRIBUTING.md
4848

49-
[build-badge]: https://travis-ci.org/react-bootstrap/react-bootstrap.svg
49+
[build-badge]: https://travis-ci.org/react-bootstrap/react-bootstrap.svg?branch=master
5050
[build]: https://travis-ci.org/react-bootstrap/react-bootstrap
5151

5252
[npm-badge]: https://badge.fury.io/js/react-bootstrap.svg

Diff for: karma.conf.js

+25-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,24 @@
1-
/* eslint no-var: 0 */
1+
/* eslint no-var: 0, babel/object-shorthand: 0 */
22
require('babel/register');
33

44
var webpackConfig = require('./webpack/test.config.js');
55
var isCI = process.env.CONTINUOUS_INTEGRATION === 'true';
6+
var runCoverage = process.env.COVERAGE === 'true' || isCI;
67
var devBrowser = process.env.PHANTOM ? 'PhantomJS' : 'Chrome';
78

9+
var preprocessors = ['webpack', 'sourcemap'];
10+
var reporters = ['mocha'];
11+
12+
if (runCoverage) {
13+
webpackConfig = require('./webpack/test-coverage.config');
14+
preprocessors.push('coverage');
15+
reporters.push('coverage');
16+
17+
if (isCI) {
18+
reporters.push('coveralls');
19+
}
20+
}
21+
822
module.exports = function (config) {
923
config.set({
1024

@@ -22,7 +36,7 @@ module.exports = function (config) {
2236
],
2337

2438
preprocessors: {
25-
'test/index.js': ['webpack', 'sourcemap']
39+
'test/index.js': preprocessors
2640
},
2741

2842
webpack: webpackConfig,
@@ -31,12 +45,20 @@ module.exports = function (config) {
3145
noInfo: isCI
3246
},
3347

34-
reporters: ['mocha'],
48+
reporters: reporters,
3549

3650
mochaReporter: {
3751
output: 'autowatch'
3852
},
3953

54+
coverageReporter: {
55+
dir: '.coverage',
56+
reporters: [
57+
{ type: 'html' },
58+
{ type: 'lcovonly' }
59+
]
60+
},
61+
4062
port: 9876,
4163

4264
colors: true,

Diff for: package.json

+11-4
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,11 @@
99
"homepage": "http://react-bootstrap.github.io/",
1010
"scripts": {
1111
"build": "babel-node tools/build-cli.js",
12-
"test-watch": "karma start",
13-
"test": "npm run lint && npm run build && karma start --single-run && _mocha --compilers js:babel-core/register test/server/*Spec.js",
12+
"lib-build": "babel-node tools/build-cli.js --lib-only",
13+
"test-watch": "npm run lib-build && karma start",
14+
"test-coverage": "npm run lib-build && COVERAGE=true karma start --single-run",
15+
"test": "npm run lint && npm run build && npm run tests-set",
16+
"tests-set": "karma start --single-run && _mocha --compilers js:babel-core/register test/server/*Spec.js",
1417
"lint": "eslint ./",
1518
"docs-build": "babel-node tools/build-cli.js --docs-only",
1619
"docs": "babel-node docs/dev-run",
@@ -52,22 +55,26 @@
5255
"colors": "^1.0.3",
5356
"css-loader": "^0.14.1",
5457
"es5-shim": "^4.1.0",
55-
"eslint": "0.22.1",
58+
"eslint": "0.23.0",
59+
"eslint-plugin-babel": "^1.0.0",
5660
"eslint-plugin-mocha": "^0.2.2",
5761
"eslint-plugin-react": "^2.1.0",
5862
"express": "^4.12.3",
5963
"extract-text-webpack-plugin": "^0.8.0",
6064
"file-loader": "^0.8.1",
61-
"fs-extra": "^0.19.0",
65+
"fs-extra": "^0.20.0",
6266
"fs-promise": "^0.3.1",
6367
"glob": "^5.0.10",
6468
"http-proxy": "^1.11.1",
6569
"ip": "^0.3.2",
70+
"isparta-loader": "^0.2.0",
6671
"json-loader": "^0.5.1",
6772
"karma": "~0.12.32",
6873
"karma-chai": "^0.1.0",
6974
"karma-chrome-launcher": "~0.1.2",
7075
"karma-cli": "0.0.4",
76+
"karma-coverage": "^0.4.2",
77+
"karma-coveralls": "^1.1.0",
7178
"karma-firefox-launcher": "~0.1.3",
7279
"karma-mocha": "~0.1.1",
7380
"karma-mocha-reporter": "^1.0.2",

Diff for: src/Alert.js

+8-6
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@ const Alert = React.createClass({
77

88
propTypes: {
99
onDismiss: React.PropTypes.func,
10-
dismissAfter: React.PropTypes.number
10+
dismissAfter: React.PropTypes.number,
11+
closeLabel: React.PropTypes.string
1112
},
1213

1314
getDefaultProps() {
1415
return {
1516
bsClass: 'alert',
16-
bsStyle: 'info'
17+
bsStyle: 'info',
18+
closeLabel: 'Close Alert'
1719
};
1820
},
1921

@@ -22,9 +24,9 @@ const Alert = React.createClass({
2224
<button
2325
type="button"
2426
className="close"
25-
onClick={this.props.onDismiss}
26-
aria-hidden="true">
27-
&times;
27+
aria-label={this.props.closeLabel}
28+
onClick={this.props.onDismiss}>
29+
<span aria-hidden="true">&times;</span>
2830
</button>
2931
);
3032
},
@@ -36,7 +38,7 @@ const Alert = React.createClass({
3638
classes['alert-dismissable'] = isDismissable;
3739

3840
return (
39-
<div {...this.props} className={classNames(this.props.className, classes)}>
41+
<div {...this.props} role='alert' className={classNames(this.props.className, classes)}>
4042
{isDismissable ? this.renderDismissButton() : null}
4143
{this.props.children}
4244
</div>

Diff for: src/Button.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const Button = React.createClass({
3131
classes = {
3232
active: this.props.active,
3333
'btn-block': this.props.block,
34-
...classes // eslint-disable-line object-shorthand
34+
...classes
3535
};
3636

3737
if (this.props.navItem) {

Diff for: src/ButtonInput.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ import childrenValueValidation from './utils/childrenValueInputValidation';
66

77
class ButtonInput extends InputBase {
88
renderFormGroup(children) {
9-
let {bsStyle, value, ...other} = this.props; // eslint-disable-line object-shorthand
9+
let {bsStyle, value, ...other} = this.props;
1010
return <FormGroup {...other}>{children}</FormGroup>;
1111
}
1212

1313
renderInput() {
14-
let {children, value, ...other} = this.props; // eslint-disable-line object-shorthand
14+
let {children, value, ...other} = this.props;
1515
let val = children ? children : value;
1616
return <Button {...other} componentClass="input" ref="input" key="input" value={val} />;
1717
}

Diff for: src/DropdownButton.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/* eslint react/prop-types: [2, {ignore: "bsSize"}] */
2+
/* BootstrapMixin contains `bsSize` type validation */
3+
14
import React, { cloneElement } from 'react';
25
import classNames from 'classnames';
36

@@ -17,11 +20,14 @@ const DropdownButton = React.createClass({
1720
dropup: React.PropTypes.bool,
1821
title: React.PropTypes.node,
1922
href: React.PropTypes.string,
23+
id: React.PropTypes.string,
2024
onClick: React.PropTypes.func,
2125
onSelect: React.PropTypes.func,
2226
navItem: React.PropTypes.bool,
2327
noCaret: React.PropTypes.bool,
24-
buttonClassName: React.PropTypes.string
28+
buttonClassName: React.PropTypes.string,
29+
className: React.PropTypes.string,
30+
children: React.PropTypes.node
2531
},
2632

2733
render() {

Diff for: src/Interpolate.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ const Interpolate = React.createClass({
1010
displayName: 'Interpolate',
1111

1212
propTypes: {
13-
format: React.PropTypes.string
13+
component: React.PropTypes.node,
14+
format: React.PropTypes.string,
15+
unsafe: React.PropTypes.bool
1416
},
1517

1618
getDefaultProps() {

Diff for: src/Modal.js

+11-6
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,11 @@ function onFocus(context, handler) {
5454

5555
let scrollbarSize;
5656

57-
if (domUtils.canUseDom) {
57+
function getScrollbarSize(){
58+
if ( scrollbarSize !== undefined ){
59+
return scrollbarSize;
60+
}
61+
5862
let scrollDiv = document.createElement('div');
5963

6064
scrollDiv.style.position = 'absolute';
@@ -64,13 +68,13 @@ if (domUtils.canUseDom) {
6468
scrollDiv.style.overflow = 'scroll';
6569

6670
document.body.appendChild(scrollDiv);
67-
6871
scrollbarSize = scrollDiv.offsetWidth - scrollDiv.clientWidth;
69-
7072
document.body.removeChild(scrollDiv);
73+
7174
scrollDiv = null;
7275
}
7376

77+
7478
const Modal = React.createClass({
7579

7680
mixins: [BootstrapMixin, FadeMixin],
@@ -80,6 +84,7 @@ const Modal = React.createClass({
8084
backdrop: React.PropTypes.oneOf(['static', true, false]),
8185
keyboard: React.PropTypes.bool,
8286
closeButton: React.PropTypes.bool,
87+
container: React.PropTypes.object,
8388
animation: React.PropTypes.bool,
8489
onRequestHide: React.PropTypes.func.isRequired,
8590
dialogClassName: React.PropTypes.string,
@@ -210,7 +215,7 @@ const Modal = React.createClass({
210215
this._originalPadding = container.style.paddingRight;
211216

212217
if (this._containerIsOverflowing) {
213-
container.style.paddingRight = parseInt(this._originalPadding || 0, 10) + scrollbarSize + 'px';
218+
container.style.paddingRight = parseInt(this._originalPadding || 0, 10) + getScrollbarSize() + 'px';
214219
}
215220

216221
if (this.props.backdrop) {
@@ -308,8 +313,8 @@ const Modal = React.createClass({
308313

309314
return {
310315
dialogStyles: {
311-
paddingRight: containerIsOverflowing && !modalIsOverflowing ? scrollbarSize : void 0,
312-
paddingLeft: !containerIsOverflowing && modalIsOverflowing ? scrollbarSize : void 0
316+
paddingRight: containerIsOverflowing && !modalIsOverflowing ? getScrollbarSize() : void 0,
317+
paddingLeft: !containerIsOverflowing && modalIsOverflowing ? getScrollbarSize() : void 0
313318
}
314319
};
315320
}

Diff for: src/ModalTrigger.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ const ModalTrigger = React.createClass({
88
mixins: [OverlayMixin],
99

1010
propTypes: {
11-
modal: React.PropTypes.node.isRequired
11+
modal: React.PropTypes.node.isRequired,
12+
onBlur: React.PropTypes.func,
13+
onFocus: React.PropTypes.func,
14+
onMouseOut: React.PropTypes.func,
15+
onMouseOver: React.PropTypes.func
1216
},
1317

1418
getInitialState() {

0 commit comments

Comments
 (0)