Commit Graph

6165 Commits

Author SHA1 Message Date
Avital Oliver
faf717fcf8 When running tests, improve contrast when diffing strings 2014-02-24 22:22:28 -08:00
David Greenspan
4b14c59f63 Fix radio button test in IE 8 2014-02-24 16:40:04 -08:00
David Greenspan
af682984a2 Fix \v in IE 8 2014-02-24 15:28:16 -08:00
Avital Oliver
8f16d8e3db Fix observe-sequence when console is undefined 2014-02-24 15:27:23 -08:00
Avital Oliver
0bf8e3d9a5 Don't run event capturing test on IE8 2014-02-24 15:04:34 -08:00
Avital Oliver
793dca0c52 Fix test on IE by not depending on newline behavior 2014-02-21 19:58:53 -08:00
Avital Oliver
20bb8562f2 Fix argument to an event handler in a test
Also, eliminate code to deal with IE7
2014-02-21 19:44:26 -08:00
Avital Oliver
fbc2c7620e Update DomBackend tests for IE8 removal behavior
In IE8, removing an element from the DOM makes it
have a parentNode which is a document fragment
that itself has no parentNode.

This is different than on other browsers that leave
the element with no parentNode.
2014-02-21 19:22:45 -08:00
Avital Oliver
da4d014698 Improve canonicalizeHtml to ignore internal Blaze attributes
On IE8, attributes are serialized into innerHTML. Ignore
the $meteor_ui_removal_callbacks attribute that's used
to keep track of callbacks to fire when an element is removed.
2014-02-21 19:21:14 -08:00
Avital Oliver
517da63f41 Fix a textarea test on IE8.
IE8 substitutes \n with \r\n in values of
textarea elements.
2014-02-21 17:43:18 -08:00
Avital Oliver
43858de596 Improve canonicalizeHTML to support empty attribute on IE8 2014-02-21 17:17:00 -08:00
Avital Oliver
6c835722b6 Fix all but one IE test on the templating package 2014-02-21 10:04:15 -08:00
Avital Oliver
ea5050497d Rename tests. Spark is no more. 2014-02-20 11:50:12 -08:00
Avital Oliver
bf3e0cdf24 Don't update OPTION fields if their SELECT wrapper is focused
This commit includes a port of the old Spark "control" tests,
which uncovered this bug.
2014-02-19 21:35:46 -08:00
Avital Oliver
1d24565fb5 Don't update an input field when its focused 2014-02-10 00:49:15 -08:00
Avital Oliver
7309025348 mv examples/unfinished/shark/ examples/unfinished/reorderable-list/ 2014-02-07 15:04:42 -08:00
Avital Oliver
042fef5af4 Get unfinished/shark back to a working state. 2014-02-07 15:03:48 -08:00
Avital Oliver
1ea406b4f3 Merge branch 'shark-newargs' into shark 2014-02-07 11:47:27 -08:00
Avital Oliver
ef56dfa514 eliminate a try/catch block
we have hard-coded "#each" into errors thrown
from observe-sequence. maybe that's not the right
way to do it but for now it works. if we want to support
other packages using observe-sequence we could
give it a constructor with a string to add to error
messages
2014-02-06 22:50:45 -08:00
Avital Oliver
31bc21f96f Eliminate withData on components
Helpers returning dynamically chosen templates shouldn't
set the data context inside the return value. Instead,
the data context should be computed in a separate helper.
Then the `{{> dynamicTemplate dataContext}}` pattern can
be used.

The reason is that if `withData` were to be used in
the return value from helpers, then there's no way to
do fine-grained reactive updates -- we'd have to
re-render the full template each time the dynamic
template is re-computed (even if the data context
hasn't changed at all, say).
2014-02-06 20:24:58 -08:00
David Greenspan
e055347a6f minor 2014-02-05 23:35:57 -08:00
David Greenspan
41113920c2 Bring back HTML Dialect section 2014-02-05 23:34:39 -08:00
David Greenspan
951b07c7c0 Support Spacebars.SafeString
...not just Handlebars.SafeString.

Test that helpers can depend on `instanceof Spacebars.kw` to detect options hash.
2014-02-05 23:06:18 -08:00
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
e08aa89ca5 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-04 00:13:05 -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