From 5fcae3cd269b0d5c415053442e9e0179fe519549 Mon Sep 17 00:00:00 2001 From: David Glasser Date: Wed, 26 Mar 2014 14:25:17 -0700 Subject: [PATCH 01/11] Actually, remove deps.flush render thing It is no longer true. --- docs/client/api.html | 9 --------- 1 file changed, 9 deletions(-) diff --git a/docs/client/api.html b/docs/client/api.html index 1850ef6f9b..e35f6319d3 100644 --- a/docs/client/api.html +++ b/docs/client/api.html @@ -2610,15 +2610,6 @@ same flush until there is no more work to be done. Callbacks registered with [`Deps.afterFlush`](#deps_afterflush) are called after processing outstanding invalidations. -Any auto-updating DOM elements that are found to not be in the -document during a flush may be cleaned up by Meteor (meaning that -Meteor will stop tracking and updating the elements, so that the -browser's garbage collector can delete them). So, if you manually -call `flush`, you need to make sure that any auto-updating elements -that you have manually created by calling [`UI.render`](#ui_render) -have already been inserted in the main DOM tree with -[`UI.insert`](#ui_insert). - It is illegal to call `flush` from inside a `flush` or from a running computation. From 1d9c2443e8a6c367d56c1528698159d3d4ecb55d Mon Sep 17 00:00:00 2001 From: David Glasser Date: Wed, 26 Mar 2014 15:02:34 -0700 Subject: [PATCH 02/11] Automatically remove deprecated preserve-inputs --- scripts/admin/build-release.sh | 2 +- tools/upgraders.js | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/scripts/admin/build-release.sh b/scripts/admin/build-release.sh index 3f0ce4c95b..d70df75c57 100755 --- a/scripts/admin/build-release.sh +++ b/scripts/admin/build-release.sh @@ -46,7 +46,7 @@ cat > "$OUTDIR/release.json-$PLATFORM" < Date: Wed, 26 Mar 2014 17:31:42 -0700 Subject: [PATCH 03/11] warning about manual rendering --- docs/client/api.html | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/docs/client/api.html b/docs/client/api.html index e35f6319d3..8d37d7a27f 100644 --- a/docs/client/api.html +++ b/docs/client/api.html @@ -2195,11 +2195,20 @@ This returns an "instantiated component" object, which can be passed to will be invoked. The component will continue to be updated reactively as the data used changes. -{{#note}} +{{#warning}} Future releases will provide a richer API for "instantiated components" (probably unifying them with "template instances"). For now, all you can do with them is pass them to `UI.insert`. -{{/note}} + + Most users will not need to manually render components or manually insert them + into the DOM at all. As of 0.8.0, if you call `UI.render` and never insert + the result into the DOM, the logic to keep the instantiated component updated + will continue running in your browser forever. Additionally, if you remove any + part of your DOM using any mechanism other than jQuery, the logic to keep that + part of the the DOM updated will continue running. To avoid these issues, + either avoid directly updating the DOM and ensure that any removals go through + jQuery. +{{/warning}} {{> api_box ui_renderwithdata}} From f58754cb01d4a6eacfd93fffa3040bd710af86fe Mon Sep 17 00:00:00 2001 From: David Glasser Date: Wed, 26 Mar 2014 19:10:46 -0700 Subject: [PATCH 04/11] Add stuff about template files to spacebars README --- packages/spacebars/README.md | 41 ++++++++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 9 deletions(-) diff --git a/packages/spacebars/README.md b/packages/spacebars/README.md index a42e499edb..c3bcfa5e31 100644 --- a/packages/spacebars/README.md +++ b/packages/spacebars/README.md @@ -7,18 +7,20 @@ Spacebars is a Meteor template language inspired by [Handlebars](http://handleba A Spacebars template consists of HTML interspersed with template tags, which are delimited by `{{` and `}}` (two curly braces). ``` -

{{pageTitle}}

+ ``` As illustrated by the above example, there are four major types of template tags: @@ -356,3 +358,24 @@ or equivalently `
`. The HTML spec allows omitting some additional end tags, such as P and LI, but Spacebars doesn't currently support this. + +## Top-level Elements in a `.html` file + +Technically speaking, the `