Commit Graph
8981 Commits
Author SHA1 Message Date
Sophie Alpert 7fc4e69651 Update .mailmap 2017-09-06 16:58:21 -07:00
Flarnie MarchanandGitHub f53c3453a7 16.0.0-rc.1 (#10630) 2017-09-06 15:43:22 -07:00
Flarnie MarchanandGitHub 8967cb62be Add missing dependencies in art fixture, update yarn.lock (#10628)
* Add missing dependencies in `art` fixture, update `yarn.lock`

**what is the change?:**
See title

**why make this change?:**
We want the `art` fixture to be working so that we can test the latest
version of `react-art`.

**test plan:**
Built and inspected the fixture manually

**issue:**
Prepping for 16.0RC release - https://github.com/facebook/react/issues/10623

* ran prettier
2017-09-06 15:37:09 -07:00
Brian VaughnandGitHub bbe460c868 React native event type fixes (#10627)
* Added invariant check for native dispatching an unsupported event type
This prevents a case of a silent failure when native dispatches an event that JavaScript does not know how to handle.

* Added iOS direct event type 'onSnapshotReady'
This is used for snapshot testing.
2017-09-06 15:34:02 -07:00
Sophie AlpertandGitHub 4a7f3b363c Pull in react-art/lib/{Circle,Rectangle,Wedge}.art (#10629)
* Import react-art/lib/{Circle,Rectangle,Wedge}.art

Copied from [email protected].1 built files.

* Changes to built files to make ART shapes work

Test Plan: Opened the fixture. React logo shows up with its normal dot, now rendered by a `<Circle />`.
2017-09-06 15:10:14 -07:00
Flarnie MarchanandGitHub ac5fc3f257 Update to latest allowed versions of fbjs and prop-types (#10626)
**what is the change?:**
Updates to the latest allowed versions for two dependencies.

`yarn upgrade 'fbjs@^0.8.9'`
and
`yarn upgrade 'prop-types@^15.5.8'`

**why make this change?:**
Prepping for the 16.0 RC, we want to have a reproducible build that is
as close as possible to what new users will get when installing React.

**test plan:**
`yarn && yarn build && yarn test`

**issue:**
https://github.com/facebook/react/issues/10623
2017-09-06 14:29:23 -07:00
Flarnie MarchanandGitHub eb8ca666e9 Update error codes and results.json (#10619)
* Update results.json

**what is the change?:**
Ran the build after updating Yarn lockfile and recorded latest build
size results.

**why make this change?:**
Let's get an idea of bundle size at this point, when we are preparing
the 16.0 RC.

**test plan:**
NA

**issue:**
https://github.com/facebook/react/issues/8854

* Update error codes

https://github.com/facebook/react/tree/master/scripts/release-manager#update-the-error-codes
2017-09-06 11:11:19 -07:00
Dan AbramovandGitHub 6ed9cc8d7b Generate Markdown table from attribute fixture (#10595)
* Generate Markdown table

* Check in generated table

* Add fast mode

* Fix lint
2017-09-06 16:00:52 +01:00
Daniel RotterandNathan Hunzaker 0f5441c67b Add AgentConf 2018 (#10614)
* Add AgentConf 2018

We are having another edition of the AgentConf in 2018, which has again a strong focus on react, and we'll be skiing again 😎 Last year's PR for reference: https://github.com/facebook/react/pull/8196

* Update conferences.md
2017-09-06 08:56:36 -04:00
Andrew ClarkandFlarnie Marchan 8c7ab439a4 Moar attribute tests (#10509)
* WIP

* WIP Add the rest of the tests for what we expect re: unknown attributes

**what is the change?:**
Adds tests for the following behavior -

- Numbers and booleans should be converted to strings, and not warn
- NaN, Symbols, functions, and objects should be converted to strings,
  and *should* warn

Going to add tests for the not-warning behavior in a follow-up.

These tests are not entirely passing - we either need to change what we
expect or change the behavior.

**why make this change?:**
Gets everyone on the same page about expected behavior, and codifies it
in a maintainable way

**test plan:**
`yarn test src/renderers/dom/shared/__tests__/ReactDOMAttribute-test.js`

**issue:**
https://github.com/facebook/react/issues/10399

* WIP Add check that we *don't* warn when handling some unknown attributes

**what is the change?:**
We are testing the behavior of unknown attributes, which has changed
since React 15.

We want to *not* warn for the following cases -
- null
- undefined
- missing
- strings
- numbers
- booleans

**why make this change?:**
We want to verify that warnings don't get fired at the wrong time.

**test plan:**
`yarn test src/renderers/dom/shared/__tests__/ReactDOMAttribute-test.js`

**issue:**
https://github.com/facebook/react/issues/10399

* ran prettier

* Symbols and functions passed to unknown attributes should remove and warn

* Abstract tests a bit to make them easier to read

* Remove Markdown from test names

I don't think we use this convention anywhere.

* Add an assertion for NaN warning message

* Update ReactDOMAttribute test based on attribute fixture

**what is the change?:**
- booleans don't get stringified
- some warnings have changed since we originally wrote this

**why make this change?:**
The attribute behavior is finalized and now we can test it :D

I also found it handy to have a row with a truly unknown attribute, so
added "imaginaryFriend".

**test plan:**
`yarn test src/renderers/dom/shared/__tests__/ReactDOMAttribute-test.js`
and comparing the tests to the attribute table

**issue:**
https://github.com/facebook/react/issues/10399

* remove imaginaryFriend to resolve conflict

* ran prettier
2017-09-05 11:25:23 -07:00
David BeiteyandAndrew Clark 9cc27c1398 Fix minor typo in Firefox name (#10605) 2017-09-05 10:28:54 -07:00
Nikita LebedevandAndrew Clark db952e53f9 Fix typo in script function name (#10611) 2017-09-05 10:28:34 -07:00
Dan AbramovandGitHub 48422b4e26 Fix warning deduplication in attribute table (#10594)
* Fix warning deduplication by eval-ing React

* Move checkbox to the left

* Fix alphabetical sort

* Fix the pooling logic

* Avoid false positive warning due to controlled/uncontrolled switch

* Naming: 15 => Stable, 16 => Next

* Prettier

* Add "Save" button
2017-09-01 18:37:45 -07:00
Brandon DailandDan Abramov f61947a5fa Default to first non-disabled option for select elements (#10456)
* Default to first non-disabled option for select

Instead of defaulting to the first option for a select element, which could be a disabled option, we find the first non-disabled option available while we looping through the options. If no option matches, set the first non-disabled option as selected.

* Add ReactDOMSelect test for defaulting to non-disabled options

* Add test fixtures to cover disabled selected options

* Fix bad merge
2017-09-01 13:34:28 -07:00
Eric NakagawaandDan Abramov 78e4b0ab22 Adding Crowdin config file to master repo (#10579)
* Adding Crowdin config file to master repo

* Updated to include additional files while ignoring localized community files stored on github

* Additional files ignored

* Included additional files in root docs directory
2017-09-01 11:33:18 -07:00
Dan Abramov 6f2d7be6fd Update sizes 2017-08-31 22:35:42 -07:00
Dan AbramovandAndrew Clark 04755d4998 Ensure attribute table server-renders SVG inside SVG container (#10588) 2017-08-31 18:41:50 -07:00
Dan AbramovandGitHub fcb1fee2b2 Don't treat dashed SVG tags as custom elements (#10586) 2017-08-31 18:24:23 -07:00
Dan AbramovandGitHub 06754974dd Remove disableNewFiberFeatures flag (#10585) 2017-08-31 18:23:08 -07:00
Andrew ClarkandDan Abramov 26b8e6195b [attribute-behavior] Canonicalize values immediately after reading them (#10584)
In case they are mutated
2017-08-31 16:46:44 -07:00
Brian VaughnandGitHub 49e2856681 Embed ReactNative event types in JavaScript (#10567)
* ReactNative doesn't query UIManager for native event types
This is a pre-req to unblock Prepack optimiations for ReactNative apps
* Replaced mock ReactNativeEventTypes with mock Platform
* Added Platform.OS to RN host hooks Flow types
2017-08-31 15:27:54 -07:00
Brian VaughnandGitHub 7c1af05099 Defer reading native view config from UIManager until view is used (#10569)
* ReactNative supports lazy view registration
Don't react viewConfig from UIManager when a view is registered, but only when it is used for the first time. This will help unblock Prepack optimizations for RN views.

* Added new lazy-creation method for native views
Also exposed the native view config registry to allow invalid/unsupported host components to fall back to RCTView

* Removed ReactNativeViewConfigRegistry from RN __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
After discussion with Spencer Ahrens and Andy Street, it seems the early fallback behavior was mostly for the early days of Ads Manager when Android didn't yet support a lot of the view types. It should be okay now to use an invarient/redbox instead for unsupported views.

* Removed non-lazy createReactNativeComponentClass impl
There are only a handful of components with JavaScript-defined view configs. It's probably worth making them use the new lazy/async interface as well to be more consistent.
2017-08-31 13:42:27 -07:00
Nathan HunzakerandDan Abramov 8e93b3459f Changes to attribute whitelist logic (#10564)
* Remove HTMLPropertyConfig entries for non-boolean values

When we originally removed attributes from the whitelist, we assumed a
few attributes were string booleans, but they are not:

Autocomplete ("on", "off")
https://developer.apple.com/library/content/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/Attributes.html#autocomplete

Autocapitalize ("none", "sentence", "words", ...)
https://developer.apple.com/library/content/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/Attributes.html#autocapitalize

Autocorrect ("on", "off")
https://developer.apple.com/library/content/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/Attributes.html#autocorrect

Autosave (string)
https://developer.apple.com/library/content/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/Attributes.html#autosave

* Only HAS_BOOLEAN_VALUE attribute flag can assign booleans

* Use a non-boolean attribute in object assignment tests

* Add HAS_STRING_BOOLEAN_VALUE attribute flag

* Fix boolean tests, add boolean warning.

* Reserved props should allow booleans

* Remove outdated comments

* Style tweaks

* Don't treat dashed SVG tags as custom elements

* SVG elements like font-face are not custom attributes

- Adds exceptions to isCustomAttribute for dashed SVG elements
- Use consistent custom element check across all modules

* Move namespace check to isCustomAttribute. Add caveat for stack.

* Remove unused namespace variable assignment

* Fix the DEV-only whitelist

* Don't read property twice

* Ignore and warn about non-string `is` attribute

* Blacklist "aria" and "data" attributes

* Don't pass unknown on* attributes through

* Remove dead code

* Avoid accessing namespace when possible

* Drop .only in ReactDOMComponent-test

* Make isCustomComponent logic more solid

* Do attribute name check earlier

* Fix fbjs import

* Revert unintentional edit

* Re-allow "data" attribute

We intentionally allowed it.

* Use stricter check when attaching events

* Pass SVG boolean attributes with correct casing

* Fix the test

* Undo the SVG dashed-name fix

Per conversation with @sebmarkbage we decided that the fix is too complicated, and it's unfortunate it depends on the DOM element.
It's only relevant for super rare tags that aren't even working consistently across browsers so we'll leave it unfixed for now.

* Prettier

* Fix lint

* Fix flow

* Pass "aria" through but still warn

* Remove special cases for onfocusin, onfocusout

They're covered by event handler code now.

* Add a more specific warning for unknown events

* Pass badly cased React attributes through with warning
2017-08-30 18:28:55 -07:00
Andrew ClarkandGitHub b46291a760 Track nested updates per root (#10574)
We track nested updates to simulate a stack overflow error and prevent
infinite loops. Every time we commit a tree, we increment a counter.
This works if you only have one tree, but if you update many separate
trees, it creates a false negative.

The fix is to reset the counter whenever we switch trees.
2017-08-30 18:17:48 -07:00
Andrew ClarkandGitHub 661973eb19 [attribute-behavior] Track differences between DOM and server renderer (#10575)
* Load ReactDOMServer into attribute table

* Highlight differences between DOM and server renderer

* Use SSR behavior when comparing behavior across renderers

* Use less severe color if SSR differences are only due to warnings

* Ensure result node's tagName matches what's expected

* Throw on unexpected HTMLUnknownElement
2017-08-30 18:17:31 -07:00
Jason QuenseandGitHub 9c11763678 Update issue template with PropTypes package (#10578)
Adds `prop-types` to the template
2017-08-30 16:35:29 -04:00
Brian VaughnandGitHub 14cd5765be Add --sync-www flag to build script (#10571) 2017-08-30 09:38:14 -07:00
Brian VaughnandGitHub 2cd0b21595 Lint command fails if there are any warnings (#10572)
You get a lint failure! You get a lint failure! Eeeeverybody gets a lint failure!
2017-08-30 08:03:17 -07:00
Brian VaughnandGitHub b80412b728 Fixed lint error in ReactErrorUtils-test (#10570) 2017-08-29 17:54:36 -07:00
Tyler DeitzandBrandon Dail f5525f94fb Update reference-events.md (#10554) 2017-08-29 08:11:45 -07:00
Andrew ClarkandDan Abramov 45c5cfc928 Add ability to "complete" rows and store state in localStorage (#10562)
* Add ability to "complete" rows and store state in localStorage

* Sort groups based on size

Also: include tagName and containerTagName in info object.

* Tweak sort order
2017-08-28 19:44:26 -06:00
Dan Abramov a77ba0cf97 Fix {false} test in attribute table 2017-08-28 16:31:08 -07:00
Dan AbramovandGitHub bbabc2f104 More consistent hashing (#10561) 2017-08-28 16:39:19 -06:00
Dan AbramovandGitHub 4dc3bf531b Disable hasOwnProperty test in attribute table (#10560) 2017-08-28 15:46:38 -06:00
Brian VaughnandGitHub bdce6512fa Upgrade flow-bin to 0.53.1 (#10510)
* Update flow-bin to 0.53.1

* Ran flow-upgrade utility
Manually corrected a few over-eager cases where it tried to replace our ReactElement sub-type.

* Replaced a couple of React.Element types with React

* Removed temporary ReactComponent/ReactComponent Flow types

* Prettier

* Replaced React with React based on Dan's PR feedback
2017-08-28 14:39:58 -07:00
Dan AbramovandGitHub ffae2296b1 Tweak attribute whitelist table (#10559)
* Move null and undefined to the end

* Highlight attributes with changes
2017-08-28 15:13:35 -06:00
Sebastian MarkbågeandGitHub c76fb239ab Read SVG properties instead of attributes where applicable (#10549)
Also canonicalize object results (since these SVG properties are objects).

The canonicalized format is what we compare against.

(This will cause unknown objects to show up as unchanged.)
2017-08-28 14:11:32 -07:00
Mitermayer ReisandFlarnie Marchan 52348312b1 Updating param flow type definition (#10558) 2017-08-28 11:06:56 -07:00
zombieJandAndrew Clark 763ab3a09f Refactor ensureUpdateQueues to avoid returning a tuple (#10437)
* remove tuple

* clean up

* prettier code

* Use module-level varibles
2017-08-28 11:04:28 -07:00
Mitermayer ReisandFlarnie Marchan fcaa98d887 Fixing incorrect documentation tags (#10530) 2017-08-26 16:53:37 -07:00
Flarnie MarchanandAndrew Clark 70184246f4 [attribute-behavior] Add alphabetical and rev-alphabetical sorting (#10546)
* Add alphabetical and rev-alphabetical sorting

This is just an initial convenient way to jump to the top or bottom of
the list.

Next we will add a sorting which groups rows together if their behavior
pattern is the same.

* Add sorting to group the rows by behavior pattern

**what is the change?:**
Another sorting option - if the content of a row is the same, it takes
those rows and groups them together.

**why make this change?:**
This will help us find groups of attributes that behave similarly.

**test plan:**
manual testing

* rename variable to be more clear
2017-08-25 18:03:25 -07:00
Sebastian MarkbågeandGitHub d441a58840 Use proper SVG tags for all SVG attributes and read using a special function (#10545) 2017-08-25 17:27:07 -07:00
Andrew ClarkandGitHub 78c9c1036a Remove UMD builds from fixture directory (#10547) 2017-08-25 17:17:31 -07:00
Andrew ClarkandGitHub a3f0d07105 [attribute-behavior] Use development builds of React and ReactDOM (#10544)
Enables warning detection.

Start-up is noticeably slower, but after that the perf is about the same.
2017-08-25 15:44:37 -07:00
Andrew Clark 8ff26f3664 Update eslintignore and prettier config to ignore UMD builds of React 2017-08-25 11:35:43 -07:00
Andrew Clark dee3a59c01 Add basic popover with additional information 2017-08-25 11:35:43 -07:00
Andrew Clark 04c2b2a1f5 Delete vestigial CRA files 2017-08-25 10:43:47 -07:00
Andrew Clark 723742dbf1 Move attribite-behavior to fixtures 2017-08-25 10:40:09 -07:00
Andrew Clark 62f8f8d8d1 Use monospace font-family 2017-08-25 10:37:46 -07:00
Andrew Clark 853ef73962 Wrap string values in quotes
All other types are formatted as as <type: param>
2017-08-25 10:37:46 -07:00