Commit Graph

7125 Commits

Author SHA1 Message Date
Emily Stark
172f709a5f Fix bug where event handler return values weren't being used. release/0.8.0-rc7 release/0.8.0 2014-03-27 11:10:30 -07:00
David Glasser
c89f5fd030 doc tweaks 2014-03-27 10:02:57 -07:00
Avital Oliver
4a328d0004 Fix failing IE test 2014-03-27 09:30:46 -07:00
Avital Oliver
42f5ff1fb9 Revert "Remove preserve-inputs package -- an upgrader removes it from apps"
This wouldn't work well if you run from a Meteor checkout or
without updating your app (via `meteor run --release 0.8.0`)

This reverts commit dc71bd2143.
2014-03-26 20:57:58 -07:00
Avital Oliver
dc71bd2143 Remove preserve-inputs package -- an upgrader removes it from apps 2014-03-26 20:55:02 -07:00
David Glasser
27ec7b1519 Fix stylus tests to test stylus rather than less 2014-03-26 20:41:58 -07:00
David Glasser
6b9c74561f banner and notices rough draft 2014-03-26 20:34:31 -07:00
David Glasser
9cb2131bb6 Check package notices line length 2014-03-26 20:33:56 -07:00
David Glasser
acb54beff8 add external contributors 2014-03-26 20:19:05 -07:00
David Glasser
321f1c752f initial history.md pass 2014-03-26 20:16:26 -07:00
David Glasser
ea10dfc545 Update concepts section 2014-03-26 19:38:02 -07:00
David Glasser
f58754cb01 Add stuff about template files to spacebars README 2014-03-26 19:10:46 -07:00
David Glasser
8ef35b7bfd warning about manual rendering 2014-03-26 17:31:42 -07:00
David Glasser
1d9c2443e8 Automatically remove deprecated preserve-inputs release/0.8.0-rc6 2014-03-26 15:02:34 -07:00
David Glasser
5fcae3cd26 Actually, remove deps.flush render thing
It is no longer true.
2014-03-26 14:50:07 -07:00
Avital Oliver
f0d6c15583 Execute helpers on UI.body release/0.8.0-rc5 release/test-0.8.0-rc5 2014-03-26 14:38:11 -07:00
Avital Oliver
cb80bb9f0d Better deprecation message for preserve-inputs package
Now we print it when loading the package (on the server console)
rather than when building it.
release/0.8.0-rc4
2014-03-26 14:27:46 -07:00
Avital Oliver
10b5c88f4e Remove madewith package 2014-03-26 14:23:04 -07:00
David Glasser
6a8f738ffb Remove more references to Meteor.render 2014-03-26 13:54:54 -07:00
David Glasser
85c3e124da update docs to 0.8.0-rc3 2014-03-26 13:43:54 -07:00
David Glasser
f3000b69bb Redo Templates *API* section in docs 2014-03-26 13:37:26 -07:00
David Glasser
a965a117d2 Replace one instance of Meteor.render in docs 2014-03-26 13:37:26 -07:00
David Glasser
90882aa136 don't use handlebars in docs 2014-03-26 13:37:26 -07:00
Avital Oliver
28ad0a45eb Fix tests release/0.8.0-rc3 2014-03-25 19:46:27 -07:00
Avital Oliver
c47e898070 Remove now-deprecated preserve-inputs package from examples
Also, add a helpful log message to help users know to remove the package.
2014-03-25 19:27:17 -07:00
Avital Oliver
3f62fab4f2 Remove unmaintained animation package.
We'll get back to animation after we ship 0.8.0.
2014-03-25 19:19:41 -07:00
Avital Oliver
6971f90c0b No more domutils and liverange packages 2014-03-25 19:18:45 -07:00
Avital Oliver
748c4db7a3 No more spark and universal-events packages 2014-03-25 19:09:56 -07:00
Nick Martin
b50733414a update license file for copied/adapted code packages/html5-tokenizer 2014-03-25 17:48:50 -07:00
David Glasser
952fb4d01b a bunch of updates to Templates api section 2014-03-25 17:07:24 -07:00
David Glasser
5252692de5 Update docs for {{> loginButtons}} 2014-03-25 16:02:40 -07:00
David Glasser
e7c2cb5c00 Delete docs for isolate 2014-03-25 15:59:44 -07:00
David Glasser
73cf568af1 Delete docs for constant 2014-03-25 15:59:13 -07:00
David Glasser
4ca31f1dea Delete docs for preserve 2014-03-25 15:56:11 -07:00
David Glasser
a5601ecd19 Merge remote-tracking branch 'origin/master' into release-0.8.0
Conflicts:
	docs/.meteor/release
2014-03-25 15:02:59 -07:00
David Glasser
592b539732 Update docs to 0.8.0-rc1 2014-03-25 15:02:03 -07:00
David Greenspan
5a1edba2ef Only look for helpers in the current template
Revert the new feature that all helpers in enclosing templates are visible, including helpers on the template that called the current template (for example) and helpers on UI.body.

Making helpers visible to sub-templates was a major change that was never properly justified or thought through.  Helpers take precedence over data properties, and having helpers "leak" down through the app could have bad consequences, even if it's useful for defining helpers on a group of related templates.  There was a point in shark's history where we needed this dynamic lookup in order for helpers to work in block tags, but that's no longer the case.

Now, helpers are only visible to the lexical body of the template they are defined on (except for global helpers defined with UI.registerHelper).

Ran tests in Chrome; ran todos and docs.
release/0.8.0-rc2 release/test-0.8.0-rc2
2014-03-24 17:45:05 -07:00
Avital Oliver
883188dc70 Revert "Mark backcompat on some Handlebars functions"
This reverts commit b777b04a66.
2014-03-24 14:37:28 -07:00
Avital Oliver
b777b04a66 Mark backcompat on some Handlebars functions 2014-03-24 14:24:03 -07:00
David Greenspan
30cd85f951 Fix templateInstance findAll, add $ alias
findAll was always supposed to return a jQuery object if you use jQuery (which is always at the moment).

Now `this.$` is an alias for `this.findAll`, as well.
release/0.8.0-rc1
2014-03-24 13:20:40 -07:00
David Greenspan
480016ea8b Fix #with 2014-03-23 09:53:53 -07:00
David Greenspan
a1d1549d77 Failing tests for #with behavior 2014-03-23 09:10:04 -07:00
David Greenspan
1fcb33e61b parse.js: Add more comments 2014-03-22 09:57:46 -07:00
Avital Oliver
4ba1abb79e Handlebars.registerHelper -> UI.registerHelper release/0.8.0-rc0-build1 release/0.8.0-rc0 2014-03-22 00:47:02 -07:00
Avital Oliver
cc4865c114 Handlebars._escape -> UI._escape 2014-03-22 00:35:51 -07:00
Avital Oliver
c2d985c235 Handlebars.SafeString -> Spacebars.SafeString 2014-03-22 00:35:26 -07:00
Avital Oliver
dd6a2a2e5e Pass empty object as 'this' when no data context
in template helpers and event handlers. 'this' must be an object and
it can't be null, so an empty object is the best we can do (and surely
better than 'window' which is what we had before this commit)

This was a regression from Spark.
2014-03-21 23:05:45 -07:00
Avital Oliver
9ef97fc297 Better parsing for {{! }} comments
We now no longer check whether we're at a closing
HTML tag by peeking for "</" since that would fail
if there were a {{! }} comment directly before it.

Instead, we tokenize and then rewind. Presumably
this does have an effect on compilation time but it's
probably fine. An alternative would have been to
explicitly parse {{! }} comments rather than implicitly
skipping them before generally parsing tokens.
2014-03-21 22:08:02 -07:00
David Greenspan
09b9b4adba Tower of hacks to get shark deps right
The implementation is getting really, really ugly.  Just want to get to correctness.

We now stop autoruns not just when started from `materialize` but also `toHTML`, `toText`, and `evaluate`, which is important for HTML attributes.  Reactive regions inside attributes aren't individually autorun; the design is that their dependencies will cause the entire attribute updater to be invalidated and re-run.  In other words, HTML.toText doesn't have internal re-runs but it does register dependencies on the current computation.  In fact, however, the presence of emboxedValues means that there *are* autoruns that need to be stopped, even in toText and evaluate.

The hack where we define a `.materialized()` callback for the benefit of UI.With falls short, because toText et al. don't call it.  The current workaround is yet worse hacks in htmljs (stopWithLater).

Finally, the fact that UI.If, UI.Unless, and Spacebars.include return reactive closures that close over emboxedValues is a problem when those same closures are reused in recalculating attributes.  The intent was that recalculating attributes should tear down any boxes internal to the attribute calculation and start fresh, but when we reuse closures that close over boxes, we are reusing boxes, and if those boxes have been stopped we lose correctness.  The ugly hack to get this to work for now is to have the boxes in If, Unless and include not be per reactive closure but per currentComputation, i.e. per autorun.  Since toText et al. don't normally autorun reactive closures, we add an autorun so that they get their own Computation objects.  This hack is supported by UI.namedEmboxValue and callReactiveFunction.

The good news is that the right answer is buried in here somewhere.
2014-03-21 03:54:28 -07:00
David Greenspan
7e49210eec Deps: Do less function wrapping
Now you can actually see function source code when you inspect _onInvalidateCallbacks in the debugger.  Instead of wrapping a bunch of stuff around the callbacks before enqueuing them, we move the logic to where they are called.
2014-03-21 02:53:34 -07:00