Commit Graph

2470 Commits

Author SHA1 Message Date
Anthony van der Hoorn 4ecde425f9 Update React-tools to support transform as object
This change adds an additional function to the exported object to support getting access to the transformed result as an object rather than just a string result - the separate function designed to maintain backwards compatibility. 

This facilitates tools that want the code separate from the sourcemap or anything else as time goes by.
2014-07-03 08:20:55 -04:00
Paul O’Shannessy 12479d3d20 Merge pull request #1780 from jbrantly/issue-1292
Fixing grunt jsx task in Windows
2014-07-02 17:41:18 -07:00
Cheng Lou 7a27d43020 Merge pull request #1779 from spicyj/spell-gram
Fix spelling/grammar in test comment
2014-07-02 15:13:36 -07:00
jbrantly 9e60afdc31 Fixing grunt jsx task in Windows
Spawning node directly instead of relying on shebang in the jsx-internal script

Fixes #1292
2014-07-02 17:26:40 -04:00
Ben Alpert c8d9957f68 Fix spelling/grammar in test comment 2014-07-02 14:09:38 -07:00
Ben Alpert a02b6b3d7f Clarify when getDefaultProps is called
Fixes #1778.
2014-07-02 14:06:48 -07:00
Yuval Dekel 40b522c498 Give context for owners of compenent instantiations with propType errors
See modification to the test-file: Basically we add a small hint at the end
of the error warning for propType errors to help identify which instantiation
of the component at hand is faulty.
2014-07-02 12:47:26 -07:00
Paul O’Shannessy 17aef05d75 Stop running so many things in travis
We're not actively looking at most of these and they take up valuable
job time.
2014-07-01 18:11:34 -07:00
Paul O'Shannessy a4e5327b76 Remove jest usage in ReactDescriptorTest
Until we're only using jest on github, we should stick with Jasmine spies. Soon, hopefully.
2014-06-30 20:55:19 -07:00
Paul O'Shannessy 022e44c95b Cleanup ReactChildren 2014-06-30 20:55:09 -07:00
Guangqiang Dong 1aa9cc6a8b add count() method to ReactChildren
added ReactChildren.count() to count the number of children, and a test case.
2014-06-30 20:54:57 -07:00
Paul O'Shannessy 5b17e75707 Support more properties for image maps
Supporting the `<area>` tag is pretty useless if we don't support the necessary properties.
2014-06-30 20:54:44 -07:00
Paul O’Shannessy 5eb57fa51b Add support to JSX transform for <hyphenated-tags>
This only adds support for whitelisted tags, not arbitrary ones.

Closes #1539
2014-06-30 20:54:41 -07:00
Cheng Lou 3e5c606f3f Merge pull request #1750 from protron/patch-1
Fix to sample code for href in ReactPropTypes
2014-06-30 17:14:58 -07:00
Paul O’Shannessy dc8ec2fab1 Cache node_modules on Travis
This isn't actually enabled yet for public projects, but this will help
us speed up builds when it does get enabled.

http://docs.travis-ci.com/user/caching/
2014-06-30 14:19:24 -07:00
Ben Alpert 94fd726f86 Merge pull request #1767 from jgebhardt/fixlink
fix link in community roundup #18
2014-06-30 10:48:29 -07:00
Jonas Gebhardt a8e273f844 fix link in community roundup #18 2014-06-30 10:41:42 -07:00
Ben Alpert 5a0eee3bb6 Merge pull request #1765 from chenglou/docs-tut-again
[Docs] Fix tutorial line highlights, revert ajax in cb
2014-06-30 01:02:29 -07:00
Cheng Lou 66d6e3f391 [Docs] Fix tutorial line highlights, revert ajax in cb 2014-06-30 01:01:48 -07:00
Cheng Lou 108efb4add Merge pull request #1763 from chenglou/docs-tut
[Docs] Put tutorial up-to-date with the code
2014-06-29 21:50:42 -07:00
Cheng Lou 58a463f01c [Docs] Put tutorial up-to-date with the code 2014-06-29 21:46:16 -07:00
Cheng Lou 546bf0ed74 Merge pull request #1760 from spicyj/docs-harmony
Add --harmony option to live JSX compiler page
2014-06-28 17:32:57 -07:00
Ben Alpert ba67bf1b0d Add --harmony option to live JSX compiler page 2014-06-28 17:29:30 -07:00
Mariano Desanze bb1a31930b Wrapped line to 80 chars in ReactPropTypes sample 2014-06-28 04:33:45 -03:00
Ben Alpert bc11793c04 Fix code style in TodoMVC Flux example 2014-06-27 22:16:42 -07:00
Paul O’Shannessy 8dcad5e09c Merge pull request #1622 from gebrits/patch-1
Update todo example. fixes 'Create' that shouldn't happen
2014-06-27 17:57:01 -07:00
Cheng Lou 5ba3911929 [Blog] Update round-up #19 to include more credit 2014-06-27 10:00:41 -07:00
Mariano Desanze 9854be2e46 Fix to sample code for href in ReactPropTypes
Error should be thrown in the previous condition is "not" meet. And the href propType is described as optional in the comment, but the null check was missing.
2014-06-27 11:50:03 -03:00
Sebastian Markbage ef67406272 Add simple React.createDescriptor hook
This is the minimal runtime change we need to switch the JSX syntax to resolve
to React.createDescriptor(...)
2014-06-26 15:42:18 -07:00
Sebastian Markbage d0719a5ea4 Preparing to move defaultProps resolution and type validation to the descriptor
This copies the propType and contextType validation to a wrapper around the
descriptor factory. By doing the validation early, we make it easier to track
down bugs. It also prepares for static type checking which should be done at the
usage site.

This validation is not yet active and is just logged using monitorCodeUse. This
will allow us to clean up callsites which would fail this new type of
validation.

I chose to copy the validation of abstracting it out since this is just an
intermediate step to avoid spamming consoles. This makes more a much cleaner
diff review/history. The original validation in the instance will be deleted as
soon as we can turn on the warnings.

Additionally, getDefaultProps are moved to become a static function which is
only executed once. It should be moved to statics but we don't have a
convenient way to merge mixins in statics right now. Deferring to ES6 classes.

This is still a breaking change since you can return an object or array from
getDefaultProps, which later gets mutated and now the shared instance is
mutated. Mutating an object that is passed into you from props is highly
discouraged and likely to lead to subtle bugs anyway. So I'm not too worried.

The defaultProps will later be resolved in the descriptor factory. This will
enable a perf optimizations where we don't create an unnecessary object
allocation when you use default props. It also means that ReactChildren.map
has access to resolved properties which gives them consistent behavior whether
or not the default prop is specified.
2014-06-26 15:40:12 -07:00
Sebastian Markbage e6134c307e [react jsx transform] Spread attribute -> Object.assign
Add support for spread attributes. Transforms into an Object.assign just
like jstransform does for spread properties in object literals.

Depends on https://github.com/facebook/esprima/pull/22
2014-06-26 15:40:02 -07:00
Paul O’Shannessy 0cf686fe1e Merge pull request #1738 from cassus/master
Add missing markerStart, markerMid, markerEnd SVG attributes
2014-06-26 15:24:30 -07:00
Ben Alpert 991c1c1169 Fix typo in blog post 2014-06-26 15:19:24 -07:00
Paul O’Shannessy 7ec2428611 Merge pull request #1748 from pieterv/community-roundup-19-fix
Change community roundup 19's React Bootstrap author to @stevoland
2014-06-26 15:14:03 -07:00
Pieter Vanderwerff deb47d5ecc Change community roundup 19's React Bootstrap author to @stevoland 2014-06-27 10:00:10 +12:00
Cheng Lou dbf41a55a4 {Blog] Community Round-up #19 2014-06-26 13:53:14 -07:00
Paul O’Shannessy 3581a92fc3 Merge pull request #1642 from ryanseddon/trimCSSValues
Correctly trim strings for css properties
2014-06-25 22:02:54 -07:00
Paul O’Shannessy 295da0a795 Merge pull request #1741 from spicyj/mount-unused
Remove unused properties from ReactMount
2014-06-25 21:24:42 -07:00
Ben Alpert b8ad5a23c6 Remove unused properties from ReactMount
(useTouchEvents lives in EventPluginUtils.)

Test Plan: jest
2014-06-24 22:03:43 -07:00
Cheng Lou d52bebd07b Merge pull request #1716 from somethingkindawierd/master
Removes value attribute from rendered html of textarea
2014-06-24 19:14:19 -07:00
Paul O’Shannessy 56263c44e8 2 docs fixes.
Fix 404 and extra slash in url
2014-06-24 15:12:19 -07:00
Paul O’Shannessy 2496757364 Simple custom 404 page.
Github doesn't let us handle 404s within a project repository, so we
handle them at the organization level. In order to handle graceully for
specific projects, we're setting up redirects to projects' own 404.html.
2014-06-24 14:11:37 -07:00
Cheng Lou a0486514a3 Merge pull request #1737 from spicyj/notime
Remove timing metrics from Transaction
2014-06-24 11:02:22 -07:00
Paul O’Shannessy b018870091 Merge pull request #1664 from spicyj/warn-pooling
Add helpful message about pooled classes
2014-06-24 11:01:21 -07:00
Jon Beebe e077dd40eb Adds empty onChange handler to textarea test 2014-06-24 07:26:07 -05:00
Cassus Adam Banko 30705f794c Add missing markerStart, markerMid, markerEnd SVG attributes 2014-06-24 11:17:34 +02:00
Ben Alpert 1c44b874fc Remove timing metrics from Transaction
No one uses these and they weren't meant to be left in.

Test Plan: jest
2014-06-23 20:32:12 -07:00
Ben Alpert e65f17b86c Add helpful message about pooled classes
Hopefully this will make fewer people confused at all of the null properties. The string won't wrap nicely so I tried to keep it pithy:

https://s3.amazonaws.com/uploads.hipchat.com/6574/26709/v8vzKAC784QMkX2/upload.png
2014-06-23 14:30:40 -07:00
Cheng Lou 9d5ad77774 [Docs] Render `null` returns noscript now
Following #1495.
2014-06-23 13:52:09 -07:00
Cheng Lou f81e213f41 Merge pull request #1495 from syranide/ie8noscript
Fix ReactEmptyComponent disappearing and throwing in IE8
2014-06-23 13:38:36 -07:00