Uh oh!
There was an error while loading. Please reload this page.
feat: allow mode to be defined, default to fast - #77
Conversation
facebook-github-bot
commented
Jan 2, 2016
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks! |
facebook-github-bot
commented
Jan 2, 2016
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
andru
commented
Jan 2, 2016
Hm. The tests are ok but the travis container is using an old version of node and choking on I had to update some deps to get the tests running on my machine (old Jest wouldn't work on new node!) |
zpao
commented
Jan 3, 2016
Can you pull out the dependency changes into a separate PR (then you can also update the node version to 4 in .travis.yml) |
36d2b3d to
451782bCompare5a623a7 to
c00e3d7Compareandru
commented
Jan 4, 2016
@zpao not quite sure how to proceed here. I can't get the tests running for any combination of With an updated |
zpao
commented
Jan 4, 2016
How about this… are you ok with me syncing out some changes we have internally which overlap considerably and getting jest running so you can focus on the actual code changes you need to make for your PR? You's just strip the top 2 commits ( |
sophiebits
commented
Jan 4, 2016
By the way: require() with a dynamic argument doesn't work in many bundlers, including Facebook's. We also don't want to send down code that we won't ever run. Perhaps we could support |
andru
commented
Jan 5, 2016
@zpao That's ok with me. @spicyj I was wondering about whether that would be problematic. The first API I tried was requiring a mode file within the react-art package... Since I submitted this PR there's also another method I was playing with: each e.g. It would require a restructure of |
sebmarkbage
commented
Apr 26, 2016
I'm not a fan of dynamic dependency injection. I think it would be better to do this at the level of something like webpack with an override.
However, nobody has yet said WHY they want this. What's the use case? The primary feature of ART is to lock it down so that it doesn't matter which render mode it is. Is it because of browser bugs rendering to canvas? If so, could we maintain a UA blacklist that switches mode automatically for flaky browsers? I was kind of hoping of going all in on Canvas in the future - like Fabric.js did. |
Fix for #54.
This introduces a
.mode()method to the API to allow the mode to be defined. Mode is set bySurface.componentWillMountif the mode has not been set beforehand. Defaults tofast.