Commit Graph

250 Commits

Author SHA1 Message Date
Sashko Stubailo
c0aab1e8d3 Template-level subscriptions 2015-02-11 18:10:33 -08:00
Sashko Stubailo
b3cb7a49f7 Merge branch 'devel' into windows-cr
Conflicts:
	packages/application-configuration/package.js
	packages/ctl-helper/package.js
	packages/ctl/package.js
	packages/dev-bundle-fetcher/package.js
	packages/follower-livedata/package.js
	packages/jquery/package.js
	packages/star-translate/package.js
	packages/test-in-browser/package.js
	tools/bundler.js
	tools/compiler.js
	tools/package-client.js
	tools/package-source.js
	tools/package-version-parser.js
	tools/server/boot.js
2015-02-04 13:56:54 -08:00
Sashko Stubailo
07dc77ee5c Mention that the test tests helpers as well 2015-01-28 11:28:55 -08:00
Avital Oliver
f2840103ca Tests for Template.currentData and Template.parentData
A recent change fixed the behavior of `Template.currentData`
and `Template.parentData` in event handlers and helpers.
These are tests for the new, correct behavior.

(The old behavior read the data of the template instance.
The new behavior read the data context around the DOM node
where the event or helper ran)
2015-01-26 16:44:50 -08:00
Sashko Stubailo
7ec339e5b8 Add tests for #3540 2015-01-23 16:57:13 -08:00
Slava Kim
27f249bfed A lot of crazy package bumps 2015-01-21 14:03:55 -08:00
Slava Kim
f146489c27 Fix the bug of firing a rendered callback when it was added too late 2015-01-21 12:26:51 -08:00
Sashko Stubailo
c37342d504 Bump a bunch of package versions 2015-01-20 22:34:24 -08:00
ekatek
c5bc843816 bring README.md files up to 1.0.3 compatibility
Fill in all packages without README.md files with a short
README.md mentioning that this is an internal Meteor package.

Break up the top paragraph of a couple of existing README.md
files to be proper long description.

There is more work to do here, involving line wrapping and the like.
2015-01-20 12:21:35 -08:00
David Glasser
6b204ca73a Bump package versions for 1.0.2 2014-12-19 10:31:59 -08:00
David Glasser
73b809c122 Bump versions for 1.0.2. 2014-12-11 22:44:41 -08:00
David Glasser
6ea8443f30 Update calls to addFiles, onUse, and onTest 2014-12-09 20:18:31 -08:00
David Greenspan
ab92f117ae Expand fix for #3130
If you Blaze.remove a View that is a template rendered by Blaze.renderWithData, or included with an implicit “with” as in `{{> myTemplate someData}}`, Blaze will now remove the DOM of the template, and also remove the implicit “with” (in both cases).

As background, Blaze.remove only works on Views that were attached directly under a DOM element, not inside another View.  Blaze.render always attaches the resulting View directly under a DOM element, but Blaze.renderWithData creates a “with” View around the template View.  Previously, you could Blaze.remove the “with” View (which is returned by renderWithData), but if you got access to the template’s View some other way and tried to remove it directly, nothing would happen.  Now, the correct thing happens (the View is destroyed and the DOM is removed).

In the future, we should consider whether Blaze.remove should work on arbitrary Views, not just Views attached under a DOM element.
2014-12-09 13:17:12 -08:00
Slava Kim
ebce6c46aa Add a blaze test for #3130 2014-12-08 17:05:05 -08:00
Mitar
d6fd5c21bc Added tests and documentation. 2014-12-07 13:30:38 -08:00
David Glasser
de5f68cf70 bump all versions (due to source-map upgrade) 2014-11-25 09:06:26 -08:00
Sashko Stubailo
36da5aecb4 Make all version numbers not have rc 2014-10-13 14:09:37 -07:00
Sashko Stubailo
698fbedb10 Bump all of the version numbers to rc.0 2014-10-07 17:10:48 -07:00
Sashko Stubailo
1e53f6b598 Bump all version numbers again after cherry-picking unipackage fix 2014-10-01 17:06:57 -07:00
Sashko Stubailo
0129c3f5ac Bump all of the version numbers again, to republish with the unipackage.json fix 2014-10-01 15:43:05 -07:00
Sashko Stubailo
eecc272e4a Bump every single package version number due to a change in compilation 2014-09-29 23:44:50 -07:00
David Greenspan
78bb8399d2 Merge branch 'devel' into helper-syntax 2014-09-25 13:55:36 -07:00
David Greenspan
22845b6f11 Port spacebars-tests to new-style helpers 2014-09-24 22:02:57 -07:00
David Greenspan
8407a81b16 Remove stray debugging aid 2014-09-24 19:44:15 -07:00
David Greenspan
a3f3b7b690 Add tests for old-style helper back-compat 2014-09-24 19:04:17 -07:00
David Greenspan
e8ebfe8aae First cut of deprecating old helper syntax
with back-compat.

The “old-style” syntax is `Template.foo.bar = …` instead of `Template.foo.helpers({bar: …})`.

Properties of back-compat to test:  You can replace an old-style helper (overwrite it).  You can delete an old-style helper.  We don’t have to support these capabilities, but we used them both in our test code, so apps probably do it too.

We print a deprecation once per helper.  This leads to a lot of warnings!  It’s helpful for porting, though developers who for some reason don’t want to port yet may want a way to disable them.

`spacebars-tests` pass.
2014-09-24 18:52:54 -07:00
David Greenspan
fe5c61104f Fix falsy helpers (like 0) 2014-09-24 17:02:20 -07:00
David Greenspan
dee69bde0b Fix some old_spacebars_test tests
… so that they test the right thing
2014-09-24 17:02:20 -07:00
David Greenspan
855284559a Back-compat tests 2014-09-18 17:29:04 -07:00
David Greenspan
e7cf040177 Rename {{> UI.*}} to Template; remove UI uses
Rename inclusion macros (with back-compat) to: Template.dynamic, Template.contentBlock, Template.elseBlock.

Update all uses and mentions of UI in the repo, unless they are there for back-compat or testing reasons.

To do: Run unit tests.  Update docs for UI.dynamic.  Document Template.contentBlock and Template.elseBlock.
2014-09-17 17:24:25 -07:00
Avital Oliver
60293005bd Test backcompat for pre-0.9.1 compiled templates
We run the entire suite of tests as we had on
0.9.0 against an old version of compiled templates.
The test suits is found in old_templates_tests.js

Why? Packages are published in built form. With Meteor 0.9.1, we
didn't bump the major version of the 'templating' package (which
would force packages that define templates to publish new versions
of their package). Instead, we decided to keep backcompat with the
old Blaze runtime APIs.

If these tests ever break in the future, and backcompat is too hard
to achieve (or undesirable), we can simply bump the major version
of the 'templating' package, and get rid of these tests.
2014-09-03 12:33:05 -07:00
David Greenspan
dc1eca1768 Better error message if you name a template “body” 2014-08-29 15:30:02 -07:00
Sashko Stubailo
82d1db5107 Rename Meteor.Collection to Mongo.Collection again 2014-08-29 12:28:32 -07:00
Sashko Stubailo
6b3d31ff5b Revert "Rename Meteor.Collection -> Mongo.Collection"
This reverts commit 96952dda2b.

Conflicts:
	packages/ddp/livedata_tests.js
	packages/minimongo/minimongo.js
	packages/mongo/collection.js
	packages/mongo/mongo_driver.js
	packages/mongo/mongo_livedata_tests.js
	packages/mongo/oplog_tests.js
	packages/reactive-dict/reactive-dict.js
	packages/session/session_tests.js
	tools/auth.js
2014-08-29 12:26:28 -07:00
Sashko Stubailo
96952dda2b Rename Meteor.Collection -> Mongo.Collection 2014-08-29 10:11:21 -07:00
David Greenspan
1dedd89387 Eliminate UI from docs; add some API to Template!
By choosing names like Template.registerHelper(…) and Template.instance() (instead of Blaze), we can separate the “Templates” section and the “Blaze” section of the docs.
2014-08-28 04:11:25 -07:00
David Greenspan
8345de74e9 Merge branch 'devel' into blaze-templates
Conflicts:
	docs/.meteor/versions
	docs/client/api.html
	docs/client/docs.js
	packages/blaze/builtins.js
	packages/blaze/materializer.js
	packages/blaze/render_tests.js
	packages/blaze/view.js
	packages/livedata/package.js
	packages/minimongo/package.js
	packages/reactive-var/reactive-var.js
	packages/standard-app-packages/package.js
	packages/templating/templating.js
	packages/test-helpers/reactivevar.js
	packages/test-in-browser/package.js
	packages/ui/package.js
2014-08-27 22:34:21 -07:00
David Greenspan
a0fe0c8ad6 Prevent Blaze.remove from doing extra detaches
(The test doesn’t really cover the case we encountered in iron-layout.)

It’s normal to end up calling Blaze.remove on an already-destroyed View, or a View that is not attached directly the DOM but has a parentRange (it’s just that it takes a situation like iron-layout to actually have a pointer to such a View in your code).
2014-08-27 20:28:05 -07:00
Sashko Stubailo
41910019e1 Renamed Deps to Tracker in all packages 2014-08-27 20:05:22 -07:00
David Greenspan
4e1111f6fa Make deprecated use of UI.render/UI.insert work
(but warn)
2014-08-27 16:03:37 -07:00
David Greenspan
56cb304895 Rename Blaze.findView to Blaze.getView
and make second argument private
2014-08-27 16:01:38 -07:00
David Greenspan
d660ffd290 Make “reactive-var” package
No more ReactiveVar test-helper!  They were basically identical.  Yay.
2014-08-27 14:42:59 -07:00
David Greenspan
0177507492 Template._body_ to Template.body 2014-08-26 17:37:52 -07:00
David Greenspan
28f8c0c9ef Kill UI.insert, make UI.render require DOM node 2014-08-26 17:26:03 -07:00
David Greenspan
e10e920942 UI.findView (instead of getCurrentView, etc.) 2014-08-18 17:05:37 -07:00
David Greenspan
be0e2a0139 Remove Template.__assign in favor of __checkName
It seems nice to actually write `Template[“foo”] = …` in our generated code rather than obscuring it behind __assign.
2014-08-17 12:04:25 -07:00
David Greenspan
1f5fc9d89a Merge branch 'devel' into blaze-templates 2014-08-17 11:23:48 -07:00
David Greenspan
b5715a9621 Stop trying to fetch an MP4 file in tests
We test event capturing using the <video> “play” event, because it is a non-bubbling event native to modern browsers.  We previously had the src URL be a video on the Internet, but even if the video could not be accessed, the test still seemed to work.

So now set the “src” to “”.  Seems to work in IE 9, Firefox, Safari, Chrome.
2014-08-16 11:21:45 -07:00
David Greenspan
7981f17af1 Make “same input.value” test work in IE 8 2014-08-16 11:04:43 -07:00
David Greenspan
7e44526ab9 Test for Avi’s fix to input elements (c2cf671)
Needs IE 8 version of test
2014-08-15 17:12:46 -07:00