Commit Graph

917 Commits

Author SHA1 Message Date
Dan Holmsand 25adadba66 Merge branch 'master' into nowrapper 2014-11-30 16:43:50 +01:00
Dan Holmsand 4e62b415ba Get rid of old wrapping code
Inputs are now backed by a proper Reagent component. The same class
is now shared by every input instance.
2014-11-30 16:41:00 +01:00
Dan Holmsand 2cfd616dd2 Tweak setup 2014-11-30 16:40:22 +01:00
Dan Holmsand c5497ea02e Remove obsolete code path 2014-11-30 14:25:26 +01:00
Dan Holmsand faddb83e2b Fix extra pseudo-names 2014-11-30 12:09:23 +01:00
Dan Holmsand cd44e87519 Add todo 2014-11-30 11:46:36 +01:00
Dan Holmsand 5fb9db3b14 Experiment with skipping wrappers for native React components
This should make initial rendering a bit faster, as well as cases
where many components change simultaneously.

It should also lead to slightly less memory use.

The drawback is that native components no longer use
shouldComponentUpdate, and so requires more conversion from cljs
to js values – but this is now quite fast anyway.
2014-11-30 11:29:36 +01:00
Dan Holmsand 9bfbbc1ae2 Make gh-pages pushing more explicit 2014-11-30 10:13:19 +01:00
Dan Holmsand a6cb21105a Tweak site-building
Allow files in outsite to be opened directly
2014-11-30 09:40:12 +01:00
Dan Holmsand 73f5ee53dc Add a build note to index.html 2014-11-29 23:54:17 +01:00
Dan Holmsand 723a1aa379 Really make advanced mode tests work 2014-11-29 23:47:57 +01:00
Dan Holmsand 4c8f08c646 Make sure index.html is in git 2014-11-29 23:34:59 +01:00
Dan Holmsand 17375490fe Got site generation and tests working with advanced compilation 2014-11-29 23:26:42 +01:00
Dan Holmsand bc89612a76 Fix site-generation and simplify title setting 2014-11-29 19:51:45 +01:00
Dan Holmsand bffbae231d Reorganize build, tests and doc site
Tests and doc site can now run without node, using only
"lein figwheel". Tests and site are then re-run automatically
whenever a source file changes.

The doc site is now generated into "outsite/public", and can be
copied into the "gh-pages" branch with "make build-gh-pages".

"make push-gh-pages" builds the doc site and pushes it upstream
to the gh-pages branch there.

Generation of html pages is now handled completely in
ClojureScript, loaded from "bin/gen-site.js".

Link handling is a bit simplified.
2014-11-29 18:30:24 +01:00
Sean Corfield 889de6bc22 Added a link to the mailing list 2014-11-28 16:09:14 -08:00
Sean Corfield 016a9795fe Update holmsand.github.io references
Per #72
2014-11-28 08:51:22 -08:00
Dan Holmsand 3bf98230ca Merge branch 'morecursor' 2014-11-23 21:09:56 +01:00
Dan Holmsand 67a88fce24 Generalize the experimental js importing 2014-11-23 12:02:14 +01:00
Dan Holmsand 36c48c0ea2 Simplify mount-count 2014-11-22 18:10:27 +01:00
Dan Holmsand 7d79637de6 Reuse render function between components 2014-11-22 17:05:43 +01:00
Dan Holmsand e4617bcaf6 Make workaround for circular dependency less cumbersome 2014-11-22 16:39:41 +01:00
Dan Holmsand b869f13a4e Merge branch 'mountorder' 2014-11-22 15:58:26 +01:00
Dan Holmsand a074ac9825 Cleanup
Avoid compiler warnings, some commented code
2014-11-22 15:57:40 +01:00
Dan Holmsand a1c6990c18 Re-render components in mount order instead of tree depth
This should be more robust, and allows us to stop passing tree
levels along to every component.
2014-11-22 12:36:36 +01:00
Dan Holmsand 7244ffc25d Add test for wrap 2014-11-22 11:08:17 +01:00
Dan Holmsand f94fcd5542 Add equality test for cursor 2014-11-22 10:45:36 +01:00
Dan Holmsand 6b87349d88 Make sure returning new class from render works 2014-11-22 09:42:31 +01:00
Dan Holmsand a56f1c3ef1 Update React to 0.12.1 2014-11-20 13:35:53 +01:00
Dan Holmsand 30427973d6 Add some docs and assert 2014-11-20 13:13:11 +01:00
Dan Holmsand e76c4b9c72 Add wrap and new cursor functionality to core.cljs 2014-11-13 19:59:42 +01:00
Dan Holmsand 02ffe6bcfa Update cursor test 2014-11-13 19:58:56 +01:00
Dan Holmsand a8ea307f85 Add Wrapper, a [value callback] combo that looks like an atom 2014-11-13 19:56:27 +01:00
Dan Holmsand 347bb4d1a3 Try to make RCursor a bit more efficient and flexible
It now avoids unnecessary re-renderings, by comparing equality
with all its arguments, and by using a Reaction to filter out
only the changes that affects its value.

This also adds an optional setter callback, that is called instead
updating the parent atom directly.
2014-11-13 19:52:59 +01:00
Dan Holmsand 92fdf36aa5 Improve managed inputs
Make sure they are reset to their current value just after the
next render (if they are not changed during that rendering).
2014-11-13 19:42:48 +01:00
Dan Holmsand b1bec33448 Make todomvc feel more responsive 2014-11-11 11:08:43 +01:00
Dan Holmsand d188be004e Change links to point to reagent-project 2014-11-06 20:21:38 +01:00
Dan Holmsand cf84b88e60 Compare component arguments with = in shouldComponentUpdate
This makes most comparisons faster, and should result in fewer
re-renderings. And it should be a lot easier to explain and
reason about than the old heuristics.

It also makes it much easier to make custom objects, e.g. different
cursor implementations, avoid unnecessary re-renderings.

The main downside is that it is no longer possible to pass infinite
sequences to components.
2014-11-06 19:45:49 +01:00
Dan Holmsand d74ae49c70 Add to Changelog 2014-11-06 19:33:06 +01:00
Dan Holmsand 3f696a3922 Make sure render-to-string etc work better in a browser
Previously, they would be reactive, which could lead to all
kinds of strangeness.

Also fix pesky Closure warning.
2014-11-06 19:18:56 +01:00
Dan Holmsand 12d475fc62 Introduce render, render-to-string and render-to-static-markup
The new names correspond to changes in React in 0.12.0.

Both render-component and render-component-to-string are kept for
backward compatibility.

Call React.render etc to avoid deprecation warnings from React.
2014-11-06 11:34:51 +01:00
Dan Holmsand b491098d5e Avoid unnecessary object creation
And fix check for input/textarea
2014-10-29 21:16:45 +01:00
Dan Holmsand 0267f69d3b Use React.createElement throughout 2014-10-29 17:37:27 +01:00
Dan Holmsand a27edf81c8 Use isValidElement and createElement to avoid deprecation messages 2014-10-29 14:47:55 +01:00
Dan Holmsand a658d28d93 Start updating react to 0.12.0 2014-10-29 14:18:28 +01:00
Dan Holmsand 14d5efc3f0 Use plain old curl instead of bower to download React 2014-10-29 11:38:40 +01:00
Dan Holmsand 2a52b6da8e Use clojurescript 2342
Later versions won't work with Light Table yet
2014-10-29 11:17:57 +01:00
Dan Holmsand a555484e9c Version 0.4.3 2014-10-28 16:34:26 +01:00
Dan Holmsand 6eb501b9cb Update changelog
And remove unnecessary logging.
2014-10-28 16:32:28 +01:00
Dan Holmsand a1a244e573 Merge branch 'master' of https://github.com/seancorfield/reagent 2014-10-20 13:29:19 +02:00