Commit Graph

6141 Commits

Author SHA1 Message Date
David Greenspan
2b536f309f Fix Spacebars compile tests 2014-02-05 23:05:26 -08:00
David Greenspan
307eb04468 New and improved Spacebars README.md 2014-02-05 23:05:08 -08:00
Avital Oliver
0ba04e7078 On {{> foo}}, look for template before global helpers.
Motivated by our safe-guard to print an error when
using the old style {{loginButtons}}. And it seems
just as correct.
2014-02-03 23:43:36 -08:00
Avital Oliver
9fa73a3d25 Simplify account-ui-viewer due to new template argument paradigm 2014-02-03 23:43:04 -08:00
Avital Oliver
dee3799c4a Merge branch 'shark' into shark-newargs 2014-02-03 23:22:53 -08:00
Avital Oliver
e8dcd0d707 Remove bad helper
We made it accessible because of a recent
change to lookup order in template inclusions
that also have helpers.
2014-02-03 23:22:01 -08:00
David Greenspan
04138ce206 Fix data context and .. in {{> content}}
according to today's proposal (i.e. it's as if {{> content}} were invoked at the invocation site of the template that uses {{> content}}, as far as scopes are concerned).

Messy implementation with not enough comments.  But there's a test.
2014-02-03 17:32:14 -08:00
David Greenspan
135aefbdee Fix broken newargs semantics
All tests pass (except one which is a todo on shark).

If `{{> foo bar}}` is to desugar into `{{#with bar}}{{> foo}}{{/with}}`, there needs to be an explicit block in the generated code in which `self.lookup("foo")` binds the correct data context (`bar`).  So we now generate a UI.With rather than trying to call it from Spacebars.include.  This simplifies Spacebars.include, which is nice.

Define `lookupTemplate` because `self.lookup(.., {template: true})` pretty-prints bigly.
2014-02-02 12:26:48 -08:00
David Greenspan
ae21a7e4dd Add an XXX for failing test 2014-02-01 22:26:36 -08:00
David Greenspan
45b5885def Move re-render's isolateValue to UI; fix bugs
* Use isolateValue around `foo` in `{{> foo}}` as well as `{{#foo}}` (i.e. whether or not there's a content block)
* Make UI.With always embox its argument; this is achieved by moving embox/isolateValue from Spacebars into UI.  As a side effected, all reactive closures now use isolateValue, so we avoid re-rendering in a few more cases.
* Avoid calling data argument of `{{#with someHelper}}` twice ever instead of once ever (when helper isn't invalidated)
2014-02-01 19:58:13 -08:00
David Greenspan
ad5c294624 whitespace 2014-02-01 19:44:19 -08:00
David Greenspan
a7575b2d2e Remove stray console.log 2014-02-01 19:43:50 -08:00
Avital Oliver
69ba8feabd Minor stylistic changes to the clock example. 2014-02-01 10:10:47 -08:00
David Greenspan
a538501efe Fix bug in newargs; fix some tests 2014-01-29 18:32:47 -08:00
David Greenspan
36ab81daa3 Merge remote-tracking branch 'origin/shark' into shark-newargs
Conflicts:
	packages/spacebars-compiler/compile_tests.js
	packages/spacebars-compiler/spacebars-compiler.js
2014-01-29 18:30:31 -08:00
Avital Oliver
f21e63b495 Merge branch 'devel' into shark 2014-01-29 14:32:45 -08:00
Avital Oliver
fb446cbe16 Tests for our _.each patch 2014-01-29 14:32:13 -08:00
David Glasser
9b7ac6080b History update 2014-01-29 13:53:43 -08:00
yeputons
4facd57f5f #1751: add IPv6 loopback check to force-ssl 2014-01-29 13:52:48 -08:00
Avital Oliver
3347009f51 Merge branch 'devel' into shark 2014-01-29 13:19:14 -08:00
Avital Oliver
a4b9dd52f3 Fix _.each patch on IE.
The patch was originally introuduced in
bab936eac9
2014-01-29 13:17:34 -08:00
Avital Oliver
da3c410f56 Improve {{> foo}} lookup test release/shark-1-29-2014-e 2014-01-29 11:16:29 -08:00
Avital Oliver
4676a71af0 Add test for {{> foo}} lookup in data context 2014-01-29 10:30:55 -08:00
Avital Oliver
6d0348da5d Improve {{> foo}} lookup order
We now look for a helper named 'foo' (which can return
a dynamically chosen template object) before looking
for a global template named 'foo'. This is consistent
with the principle that adding a helper should generally
override other things with the same name (ie data properties)

This change was motivated by frontpage, which had both
a template and a helper named 'body'.
2014-01-28 22:53:31 -08:00
David Glasser
764ceb6077 add a test for observeChanges/limit/initial 2014-01-28 17:44:48 -08:00
David Glasser
25fd3a344c optionify LocalCollection._getRawObjects 2014-01-28 17:44:48 -08:00
David Glasser
9f253e6a0b minimongo: Make update-by-id O(1) 2014-01-28 17:44:48 -08:00
David Glasser
4352b79502 clean up minimongo 'query' object
delete unused fields, rename underscored fields
2014-01-28 15:41:53 -08:00
David Glasser
c8a1df81a7 optimize paused remove({}) which oplog uses 2014-01-28 15:41:53 -08:00
David Glasser
cf3ffa88a9 check for paused earlier 2014-01-28 15:12:14 -08:00
Avital Oliver
f728523599 Merge branch 'devel' into shark release/shark-1-29-2014-c 2014-01-28 15:00:19 -08:00
David Glasser
604cd853f3 Update http-proxy to 1.0.2 from our fork of 1.0.1
Only real change is changing a bad console.log into invoking our error
handler, which we need for not printing too much junk in the runner
  https://github.com/nodejitsu/node-http-proxy/commit/daad4703
2014-01-28 11:57:36 -08:00
Slava Kim
cb2f2adb1b Do less deep copies 2014-01-28 10:11:27 -08:00
David Glasser
297b97659b Merge branch 'oplog-localcollection' into devel 2014-01-27 22:34:59 -08:00
David Glasser
a65b978972 Refactor OplogObserveDriver to use LocalCollection
This should be a good starting point for implementing limit/sort/skip.
2014-01-27 21:57:00 -08:00
David Glasser
980b70596d More comments about our sort inconsistency 2014-01-27 21:56:17 -08:00
David Glasser
782ff1bcae Optionify the barely-used LocalCollection name arg 2014-01-27 21:40:24 -08:00
David Glasser
ed83f00fc1 Rename _SynchronousQueue to _UnyieldingQueue
Allow server uses of LocalCollection to prefer _UnyieldingQueue. This
will mean that, as long as their observeChanges callbacks do not yield,
calls to insert/update/remove will not yield either.
2014-01-27 21:19:32 -08:00
David Glasser
390dafea01 Move _SynchronousQueue into another file
This commit does not build but exists so that the next commit shows
diffs better.
2014-01-27 21:18:24 -08:00
David Glasser
f065ffd80f Merge branch 'devel' into shark
Conflicts:
	packages/minimongo/minimongo.js
	packages/minimongo/observe.js
	packages/minimongo/wrap_transform.js
	packages/mongo-livedata/collection.js
	packages/mongo-livedata/mongo_driver.js
	packages/mongo-livedata/mongo_livedata_tests.js
2014-01-27 16:34:15 -08:00
David Glasser
204959b509 Fix pronoun in docs 2014-01-27 16:30:43 -08:00
David Glasser
f53bf0ab82 Docs for wrapTransform 2014-01-27 16:29:59 -08:00
David Glasser
c18f7339bf Merge branch 'shark-backports' into devel 2014-01-27 16:24:12 -08:00
David Glasser
d577b05136 Review of wrapTransform with avital
- move _makeNonreactive into wrapTransform
- Use EJSON.equals for _id comparison
- Return null for nonexistent transforms
- Use isPlainObject for objectness check
- Add unit tests; remove some end-to-end tests

Also, add an EJSON.clone to the recently backported observeHandle._fetch
2014-01-27 16:22:30 -08:00
David Greenspan
89b11490d6 Fix "atoms" title tag 2014-01-27 15:27:32 -08:00
David Glasser
b5a14c5d30 Initial backport of wrapTransform from shark 2014-01-27 15:25:19 -08:00
David Glasser
20766ac05e Backport observeHandle._fetch from shark 2014-01-27 15:25:19 -08:00
David Glasser
c5e90053f2 Fix bug caused by d868325 2014-01-27 15:22:55 -08:00
David Greenspan
5038c63d08 Merge shark, including shark-isolate-helpers work 2014-01-27 15:21:23 -08:00
David Greenspan
b26f0271a0 Rename HTML.evaluate{Dynamic,}Attributes 2014-01-27 14:44:19 -08:00