Commit Graph

1580 Commits

Author SHA1 Message Date
Jim 91b45641b8 Merge pull request #3317 from ianobermiller/fix-shallow-equal
shallowEqual: bail if either argument is falsey
2015-03-10 15:45:03 -07:00
Ben Alpert 53f92bf858 Fix comma splice and line length 2015-03-10 15:36:27 -07:00
Jim 645a6caaf5 Merge pull request #3323 from jonhester/ie8-compat-mode
warn if IE8 is in compatibility mode
2015-03-10 15:35:09 -07:00
Ben Alpert 462e8f1be8 Merge pull request #3327 from Simek/initialize-variables-fix
initialize dev variables in dev mode only in shouldUpdateReactComponent.js
2015-03-10 15:33:29 -07:00
Ben Alpert cff3f35bf7 Merge pull request #3321 from Smert/master
Bringing the code to one style.
2015-03-10 15:32:43 -07:00
Ben Alpert 4d9561d938 Merge pull request #3310 from darcyadams/console-exists-before-warn
Check that console exists before warning
2015-03-10 15:32:32 -07:00
Ben Alpert b95fe57743 Merge pull request #3253 from jsfb/fix-comment-to-reflect-class-type-usage
Fix comment to reflect the new (non-deprecated) way of accessing a class type.
2015-03-10 15:31:50 -07:00
Ben Alpert e8af59cf82 Merge pull request #3246 from spicyj/onclick
Revert "Revert #1536"
2015-03-10 15:31:38 -07:00
Ben Alpert 68ca057bc3 Merge pull request #3230 from nmn/master
Add numeric CSS property - stroke width
2015-03-10 15:31:30 -07:00
Ben Anderson 75a8bc96b1 Warn when rendering directly into document.body
This is in response to #3207 to address concerns regarding third-party
scripts and browser plugins potentially altering DOM nodes within
document.body, causing problems with reconciliation.

Closes #3211.
2015-03-10 15:31:02 -07:00
Ben Alpert f77de57e41 Merge pull request #2946 from benmoss/nested-render-warning
Add displayName to nested render warnings [#1726]
2015-03-10 15:24:59 -07:00
Ben Alpert 4feed4fcc5 Merge pull request #2868 from chicoxyzzy/dev_and_prod_environments_consistancy
make dev and production environment consistent
2015-03-10 15:24:33 -07:00
Ben Alpert 9cb25b3ddb Merge pull request #2266 from syranide/voidelem
ReactDOMComponent should not accept children for void elements
2015-03-10 15:24:00 -07:00
Paul O’Shannessy e313616be7 Bump version so we can get back to work 2015-03-10 15:06:35 -07:00
Paul O’Shannessy 9d58e9a27b Deprecate replaceProps
This isn't supported on plain JS classes anyway, so this is just adding
a warning in DEV before the code throws.
2015-03-10 10:44:47 -07:00
Toru Kobayashi 29506cec54 Fix Perf displayName with ES6 classes 2015-03-10 09:45:40 +09:00
Paul O’Shannessy 62ee384d7b Merge pull request #3330 from spicyj/no-render
Add warning when using non-component element types
2015-03-09 13:47:39 -07:00
Paul O’Shannessy 769e1cea03 Merge pull request #3337 from facebook/cpojer-patch-2
"Better" duck typing in reactComponentExpect
2015-03-09 13:45:50 -07:00
Paul O’Shannessy 8a3dd040a0 Merge pull request #3331 from zpao/null-frag-proptypes
Allow null and undefined values in non-frag object passed to PropTypes.node
2015-03-09 13:43:26 -07:00
Christoph Pojer 8ce9e2b194 Update reactComponentExpect.js 2015-03-06 02:46:33 -08:00
Christoph Pojer 419038f846 Fix documentation typo in ReactComponent 2015-03-06 01:33:56 -08:00
Paul O’Shannessy 0e797dffe4 Allow null and undefined values in non-frag object passed to PropTypes.node 2015-03-05 17:56:50 -08:00
Ben Alpert 6b7e4dc8e8 Add warning when using non-component element types
This should make debugging easier for people who missed callsites when fixing up their JSX/non-JSX usage.
2015-03-05 15:24:31 -08:00
Bartosz Kaszubowski a42dcf4f7b initialize dev variables in dev mode only 2015-03-05 21:20:48 +01:00
Jon Hester 65c4aeaa3a use warning module instead of console.debug 2015-03-05 18:53:12 +00:00
Darcy 6b593083ed check that console exists before warning
Console is undefined in earlier versions of IE when it is not open. This causes an uncaught exception, and breaks applications in these versions of IE when attempting to warn when the  console is closed.
Admittedly, console will usually be open when testing in development, but still React should not break the application when it is not.
2015-03-05 09:20:16 -05:00
Jon Hester a999ac1ac3 warn if IE8 is in compatibility mode 2015-03-05 13:48:28 +00:00
dmitry adb9b20f6d Bringing the code to one style. 2015-03-05 14:04:47 +02:00
Ian Obermiller 34f4a0e42d shallowEqual: bail if either argument is falsey
Also add some unit tests.
2015-03-04 22:16:51 -08:00
Paul O’Shannessy 21b41480a5 v0.13.0-rc2 2015-03-03 11:46:01 -08:00
Sebastian Markbage a27c6d1690 Always use a static message formats
These are the only places that seems to be including environment specific
variables in the message format.

By ensuring that they're static, we make it easier to group logs by
format. I also ensure that I keep each addendum separate so that they can
be filtered/grouped separately.
2015-03-02 13:18:38 -08:00
Paul O’Shannessy 4bad1aacb6 Merge pull request #3275 from spicyj/gh-3222
Don't use undefined as parent name in key warning
2015-03-02 12:47:52 -08:00
Paul O’Shannessy 8fdf4bbffc Merge pull request #3276 from spicyj/gh-2978
Add regression test for scry order
2015-03-02 12:46:55 -08:00
Sebastian Markbåge ecc4ad569a Merge pull request #3266 from sebmarkbage/cloneelement
Add cloneElement Implementation
2015-03-02 12:15:20 -08:00
Sebastian Markbåge edddd57d28 Merge pull request #3293 from spicyj/gh-3286
ReactFragment counts as a node without warning
2015-03-02 12:10:50 -08:00
Ben Alpert 7ebf7c46f5 ReactFragment counts as a node without warning
Fixes #3286.
2015-03-01 11:50:07 -08:00
Antti Ahti 323789540a Remove unnecessary variable from test 2015-02-28 15:23:34 +02:00
Ben Alpert feae9ad0a8 Add regression test for scry order
Fixes #2978.
2015-02-26 15:54:50 -08:00
Ben Alpert d5fa14de1a Don't use undefined as parent name in key warning
Fixes #3222.
2015-02-26 15:20:37 -08:00
Sebastian Markbage 4adcee69a0 Add cloneElement Implementation
This is a new version of cloneWithProps but this one is moving out of
add-ons. Unlike cloneWithProps, this one doesn't have special logic for
style, className and children.

This one also preserves the original ref. This is critical when upgrading
from a mutative pattern where a child might have a ref on it.

It also preserves context, which is similar to how context would work when
it is parent based. It also ensures that we're compatible with the old
mutative pattern which makes updates easier.
2015-02-26 01:17:05 -08:00
Andreas Svensson 20dd247292 ReactDOMComponent should warn when provided children for void elements 2015-02-26 10:14:47 +01:00
Sebastian Markbage 061c6fc13c Avoid passing this of a static object
Refactoring artifact.
2015-02-25 18:37:02 -08:00
Jim 29f6c7e774 Fix comment to reflect the new (non-deprecated) way of accessing a class type. 2015-02-24 11:18:17 -08:00
Ben Alpert 1943a9a0db Only call put/deleteListener with truthy listeners
Without this, transitioning from `<div onClick={null} />` to `<div />` triggered `willDeleteListener` to delete the `click` handler which caused problems; now, we only call `putListener` and `deleteListener` when we have an actual listener.

I now also clean up the `onClickListeners` map upon deletion and don't double-listen when updating the event listener.
2015-02-23 14:52:30 -08:00
Ben Alpert 090e4bbc9a Revert "Revert #1536"
Formerly "Attach empty onclick listener to each node". This reverts commit 431155d2e2.
2015-02-23 14:28:22 -08:00
Paul O’Shannessy 95206fe5dc Make cloneWithProps typechecks static-only 2015-02-22 14:40:39 -08:00
Paul O’Shannessy 06126ad3f4 v0.13.0-rc1 2015-02-22 13:26:13 -08:00
Naman Goel 34d5e05199 Merge branch 'master' of https://github.com/facebook/react
* 'master' of https://github.com/facebook/react: (30 commits)
  Expose --target flag on jsx executable
  Contributing: cleanup quote style
  Add Relay blog post
  Fix long lines in vendor/fbtransform/visitors
  lint vendor/*.js
  fix .eslintignore
  remove ballmer example
  Fix a doc. cloneWithProps clones a ReactElement.
  lint from root
  Fixed mistake in jsdocs types for cloneWithProps
  Put deprecation warning for classSet
  Lint vendor/fbtransform as well
  More warnings to ReactFragment.create
  Warn when using constructor function directly
  Move option parsing into react-tools proper.
  Remove lodash devDependency
  Added the immutability talk to the React.js Conf update.
  Use same pathways for browser transforms as we use in react-tools
  lint: remove spaces from array brackets
  lint: remove spaces from object braces
  ...
2015-02-22 15:57:34 +01:00
Naman Goel 20d3f0db29 CSS property 2015-02-22 15:57:30 +01:00
chico 9185323959 make dev and production environment consistent 2015-02-22 14:58:42 +03:00