Skip to content

Commit

Permalink
Merge tag 'v0.23.5' into v0.24-rc
Browse files Browse the repository at this point in the history
v0.23.5

Conflicts:
	package.json
	src/NavItem.js
	tools/amd/build.js
	tools/build-cli.js
	tools/release-scripts/release.js
  • Loading branch information
mtscout6 committed Jun 23, 2015
2 parents b798b7f + d00d9c7 commit 6c93a3f
Show file tree
Hide file tree
Showing 44 changed files with 498 additions and 239 deletions.
7 changes: 4 additions & 3 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
},
"parser": "babel-eslint",
"plugins": [
"react"
"react",
"babel"
],
"rules": {
"comma-spacing": 2,
Expand All @@ -18,15 +19,15 @@
"no-underscore-dangle": 0,
"no-unused-vars": [2, { "vars": "all", "args": "none" }],
"no-var": 2,
"object-shorthand": 2,
"babel/object-shorthand": 2,
"quotes": [2, "single", "avoid-escape"],
"react/display-name": 0,
"react/jsx-no-undef": 2,
"react/jsx-uses-react": 2,
"react/no-did-mount-set-state": 2,
"react/no-did-update-set-state": 2,
"react/no-multi-comp": 2,
"react/prop-types": [2, { ignore: [children, className] }],
"react/prop-types": [2, { "ignore": [ "children", "className" ] }],
"react/react-in-jsx-scope": 2,
"react/self-closing-comp": 2,
"react/wrap-multilines": 2,
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ docs-built/
tmp-bower-repo/
tmp-docs-repo/
.babel-cache/
.coverage/
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
v0.23.5 - Tue, 23 Jun 2015 01:31:35 GMT
---------------------------------------

- [23f9d21](../../commit/23f9d21) [changed] Add missed prop types validations.
- [320b7ab](../../commit/320b7ab) [changed] Update fs-extra. Dev dependency.
- [2ffcf5d](../../commit/2ffcf5d) [fixed] Popovers flicker when moving mouse amongst children of the trigger
- [ccc50e0](../../commit/ccc50e0) [fixed] Accessibility: Panel header uses aria-controls
- [1e552cc](../../commit/1e552cc) [added] Accessibility: use appropriate ARIA's when an id is given to the tabbed area
- [8752754](../../commit/8752754) [added] Add linkId prop to NavItem
- [722969d](../../commit/722969d) [added] Accessibility, add tab roles when type "tabs"
- [4adaa70](../../commit/4adaa70) [added] Accessibility: role 'alert' and aria-label to Alert component
- [2594dce](../../commit/2594dce) [fixed] Modal Null Exception when react-bootstrap is loaded before the Body tag
- [e77bf88](../../commit/e77bf88) [changed] Update eslint. Dev dependency.



v0.23.4 - Tue, 16 Jun 2015 00:37:04 GMT
---------------------------------------

Expand Down
28 changes: 21 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,27 @@ be interested in. Maybe somebody is trying to fix that stupid bug that bothers
you. Review the PR. Do you have any better ideas how to fix this problem? Let us
know...

## Current Issues

[![HuBoard][huboard-badge]][huboard]

We use HuBoard to triage issues and prioritize the backlog for the core dev
team. Feel free to tackle any currently open [issue][issues]. The issues tagged
with "help wanted" and especially those high in the backlog are fair game.
## Issues

The issue tracker is the preferred channel for bug reports, features requests
and submitting pull requests, but please respect the following restrictions:

- Please do not use the issue tracker for personal support requests. Stack
Overflow ([react-bootstrap](http://stackoverflow.com/questions/tagged/react-bootstrap)
tag), [Slack](http://www.reactiflux.com/) or
[gitter](https://gitter.im/react-bootstrap/react-bootstrap) are better places
to get help.
- Please do not open issues or pull requests regarding the code in React or
Bootstrap (open them in their respective repositories).

_Note: Occasionally issues are opened that are unclear, or we cannot verify them. When
the issue author has not responded to our questions for verification within 7
days then we will close the issue._

[![HuBoard][huboard-badge]][huboard] We use HuBoard to triage issues and
prioritize the backlog for the core dev team. Feel free to tackle any currently
open [issue][issues]. The issues tagged with "help wanted" and especially those
high in the backlog are fair game.

## Tests

Expand Down
5 changes: 5 additions & 0 deletions MAINTAINING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ room of the urgent issues. We are using
[HuBoard](https://huboard.com/react-bootstrap/react-bootstrap) which is a kanban
style board to track and prioritize issues.

Some issues are opened that are just too vague to do anything about. If after
attempting to get feedback from issue authors fails after 7 days, then close the
issue. Please inform the issue author that they may re-open if they are able to
present the requested information.

## Merging a pull request

Please, make sure:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Yes please! See the [contributing guidelines][contributing] for details.
[documentation]: http://react-bootstrap.github.io
[contributing]: https://github.com/react-bootstrap/react-bootstrap/blob/master/CONTRIBUTING.md

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

[npm-badge]: https://badge.fury.io/js/react-bootstrap.svg
Expand Down
28 changes: 25 additions & 3 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,24 @@
/* eslint no-var: 0 */
/* eslint no-var: 0, babel/object-shorthand: 0 */
require('babel/register');

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

var preprocessors = ['webpack', 'sourcemap'];
var reporters = ['mocha'];

if (runCoverage) {
webpackConfig = require('./webpack/test-coverage.config');
preprocessors.push('coverage');
reporters.push('coverage');

if (isCI) {
reporters.push('coveralls');
}
}

module.exports = function (config) {
config.set({

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

preprocessors: {
'test/index.js': ['webpack', 'sourcemap']
'test/index.js': preprocessors
},

webpack: webpackConfig,
Expand All @@ -31,12 +45,20 @@ module.exports = function (config) {
noInfo: isCI
},

reporters: ['mocha'],
reporters: reporters,

mochaReporter: {
output: 'autowatch'
},

coverageReporter: {
dir: '.coverage',
reporters: [
{ type: 'html' },
{ type: 'lcovonly' }
]
},

port: 9876,

colors: true,
Expand Down
15 changes: 11 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@
"homepage": "http://react-bootstrap.github.io/",
"scripts": {
"build": "babel-node tools/build-cli.js",
"test-watch": "karma start",
"test": "npm run lint && npm run build && karma start --single-run && _mocha --compilers js:babel-core/register test/server/*Spec.js",
"lib-build": "babel-node tools/build-cli.js --lib-only",
"test-watch": "npm run lib-build && karma start",
"test-coverage": "npm run lib-build && COVERAGE=true karma start --single-run",
"test": "npm run lint && npm run build && npm run tests-set",
"tests-set": "karma start --single-run && _mocha --compilers js:babel-core/register test/server/*Spec.js",
"lint": "eslint ./",
"docs-build": "babel-node tools/build-cli.js --docs-only",
"docs": "babel-node docs/dev-run",
Expand Down Expand Up @@ -52,22 +55,26 @@
"colors": "^1.0.3",
"css-loader": "^0.14.1",
"es5-shim": "^4.1.0",
"eslint": "0.22.1",
"eslint": "0.23.0",
"eslint-plugin-babel": "^1.0.0",
"eslint-plugin-mocha": "^0.2.2",
"eslint-plugin-react": "^2.1.0",
"express": "^4.12.3",
"extract-text-webpack-plugin": "^0.8.0",
"file-loader": "^0.8.1",
"fs-extra": "^0.19.0",
"fs-extra": "^0.20.0",
"fs-promise": "^0.3.1",
"glob": "^5.0.10",
"http-proxy": "^1.11.1",
"ip": "^0.3.2",
"isparta-loader": "^0.2.0",
"json-loader": "^0.5.1",
"karma": "~0.12.32",
"karma-chai": "^0.1.0",
"karma-chrome-launcher": "~0.1.2",
"karma-cli": "0.0.4",
"karma-coverage": "^0.4.2",
"karma-coveralls": "^1.1.0",
"karma-firefox-launcher": "~0.1.3",
"karma-mocha": "~0.1.1",
"karma-mocha-reporter": "^1.0.2",
Expand Down
14 changes: 8 additions & 6 deletions src/Alert.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ const Alert = React.createClass({

propTypes: {
onDismiss: React.PropTypes.func,
dismissAfter: React.PropTypes.number
dismissAfter: React.PropTypes.number,
closeLabel: React.PropTypes.string
},

getDefaultProps() {
return {
bsClass: 'alert',
bsStyle: 'info'
bsStyle: 'info',
closeLabel: 'Close Alert'
};
},

Expand All @@ -22,9 +24,9 @@ const Alert = React.createClass({
<button
type="button"
className="close"
onClick={this.props.onDismiss}
aria-hidden="true">
&times;
aria-label={this.props.closeLabel}
onClick={this.props.onDismiss}>
<span aria-hidden="true">&times;</span>
</button>
);
},
Expand All @@ -36,7 +38,7 @@ const Alert = React.createClass({
classes['alert-dismissable'] = isDismissable;

return (
<div {...this.props} className={classNames(this.props.className, classes)}>
<div {...this.props} role='alert' className={classNames(this.props.className, classes)}>
{isDismissable ? this.renderDismissButton() : null}
{this.props.children}
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const Button = React.createClass({
classes = {
active: this.props.active,
'btn-block': this.props.block,
...classes // eslint-disable-line object-shorthand
...classes
};

if (this.props.navItem) {
Expand Down
4 changes: 2 additions & 2 deletions src/ButtonInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import childrenValueValidation from './utils/childrenValueInputValidation';

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

renderInput() {
let {children, value, ...other} = this.props; // eslint-disable-line object-shorthand
let {children, value, ...other} = this.props;
let val = children ? children : value;
return <Button {...other} componentClass="input" ref="input" key="input" value={val} />;
}
Expand Down
8 changes: 7 additions & 1 deletion src/DropdownButton.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/* eslint react/prop-types: [2, {ignore: "bsSize"}] */
/* BootstrapMixin contains `bsSize` type validation */

import React, { cloneElement } from 'react';
import classNames from 'classnames';

Expand All @@ -17,11 +20,14 @@ const DropdownButton = React.createClass({
dropup: React.PropTypes.bool,
title: React.PropTypes.node,
href: React.PropTypes.string,
id: React.PropTypes.string,
onClick: React.PropTypes.func,
onSelect: React.PropTypes.func,
navItem: React.PropTypes.bool,
noCaret: React.PropTypes.bool,
buttonClassName: React.PropTypes.string
buttonClassName: React.PropTypes.string,
className: React.PropTypes.string,
children: React.PropTypes.node
},

render() {
Expand Down
4 changes: 3 additions & 1 deletion src/Interpolate.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ const Interpolate = React.createClass({
displayName: 'Interpolate',

propTypes: {
format: React.PropTypes.string
component: React.PropTypes.node,
format: React.PropTypes.string,
unsafe: React.PropTypes.bool
},

getDefaultProps() {
Expand Down
17 changes: 11 additions & 6 deletions src/Modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ function onFocus(context, handler) {

let scrollbarSize;

if (domUtils.canUseDom) {
function getScrollbarSize(){
if ( scrollbarSize !== undefined ){
return scrollbarSize;
}

let scrollDiv = document.createElement('div');

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

document.body.appendChild(scrollDiv);

scrollbarSize = scrollDiv.offsetWidth - scrollDiv.clientWidth;

document.body.removeChild(scrollDiv);

scrollDiv = null;
}


const Modal = React.createClass({

mixins: [BootstrapMixin, FadeMixin],
Expand All @@ -80,6 +84,7 @@ const Modal = React.createClass({
backdrop: React.PropTypes.oneOf(['static', true, false]),
keyboard: React.PropTypes.bool,
closeButton: React.PropTypes.bool,
container: React.PropTypes.object,
animation: React.PropTypes.bool,
onRequestHide: React.PropTypes.func.isRequired,
dialogClassName: React.PropTypes.string,
Expand Down Expand Up @@ -210,7 +215,7 @@ const Modal = React.createClass({
this._originalPadding = container.style.paddingRight;

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

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

return {
dialogStyles: {
paddingRight: containerIsOverflowing && !modalIsOverflowing ? scrollbarSize : void 0,
paddingLeft: !containerIsOverflowing && modalIsOverflowing ? scrollbarSize : void 0
paddingRight: containerIsOverflowing && !modalIsOverflowing ? getScrollbarSize() : void 0,
paddingLeft: !containerIsOverflowing && modalIsOverflowing ? getScrollbarSize() : void 0
}
};
}
Expand Down
6 changes: 5 additions & 1 deletion src/ModalTrigger.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ const ModalTrigger = React.createClass({
mixins: [OverlayMixin],

propTypes: {
modal: React.PropTypes.node.isRequired
modal: React.PropTypes.node.isRequired,
onBlur: React.PropTypes.func,
onFocus: React.PropTypes.func,
onMouseOut: React.PropTypes.func,
onMouseOver: React.PropTypes.func
},

getInitialState() {
Expand Down
Loading

0 comments on commit 6c93a3f

Please sign in to comment.