Commit Graph

3964 Commits

Author SHA1 Message Date
Avital Oliver
1d3a840372 Update Spacebars README
{{> content}} and {{> elseContent}} are now
{{> UI.contentBlock}} and {{> UI.elseBlock}}
respectively.
2014-03-13 14:45:29 -07:00
Avital Oliver
b2bb353a10 Implement UI.getElementData
Replaces Spark.getDataContext
2014-03-13 14:06:24 -07:00
David Greenspan
b9370da58d Don't use jQuery's buildFragment
It's slow and the benefits are not obvious
2014-03-10 18:46:31 -07:00
Avital Oliver
93c831b74e Merge branch 'devel' into shark 2014-03-10 15:55:57 -07:00
Avital Oliver
b25d765b3e Remove unused Deps._makeNonreactive 2014-03-10 15:55:37 -07:00
Avital Oliver
46964c77e6 Improve Deps performance by not using _.bind 2014-03-10 15:54:43 -07:00
David Greenspan
f97708bf19 Fix nested autoruns in Blaze rendering
Should address bugs where helpers fire more than expected, and also prevent wasted re-rendering of templates that are being destroyed anyway.

See: https://github.com/EventedMind/iron-router/issues/478
2014-03-10 14:31:12 -07:00
Chris Mather
9a7dfca06d Nonreactive callback for range.removed code
When a range is removed, if the component instance has a destroyed callback
defined, updateTemplateInstance is called and the destroyed callback is called
in the context of the updated templateInstance. updateTemplateInstance calls
getComonentData() which can create a reactive dependency. This doesn't seem
necessary since we're removing the range.

The problem surfaced in iron-router in combination with using the {{#each
helper. The each helper is currently the only builtin that adds a destroyed
callback. If a previous layout used {{#each and a new layout rendered, the
previous range would be removed in the new computation. Then, if we updated the
data context, the dep would change and the entire new layout would be rendered
again :-(.

cc @tmeasday.
2014-03-08 18:04:49 -08:00
Avital Oliver
66cbdb2636 Better error for non-existent template inclusion 2014-03-07 15:55:14 -08:00
David Greenspan
73931f399f Merge branch 'pr/1718' into shark 2014-03-06 17:03:51 -08:00
David Greenspan
c04fb53156 Fix regression: don't optimize SVG in templates 2014-03-06 16:52:00 -08:00
David Greenspan
cf4d9ad175 Let tags containing ':' self-close
They won't be rendered to HTML as self-closing, but that should be ok.

This is so that weird XML tags in SVG can be parsed.
2014-03-06 16:51:26 -08:00
David Greenspan
084ee3bf4f Merge branch 'devel' into shark
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
2014-03-06 16:21:33 -08:00
David Greenspan
d27fa802b7 Change {{> content}} to {{> UI.contentBlock}}
...and elseContent to UI.elseBlock.
2014-03-04 20:08:22 -08:00
David Greenspan
8d77b770fb Spacebars: Disallow non-initial this in paths
Apparently `../this` used to work as a synonym for `..` in Handlebars, but in Spacebars it actually would look for a property named `this`, which caused confusing breaking changes in apps.
2014-03-04 15:40:23 -08:00
David Greenspan
f302d25dc1 Add UI.renderWithData; test UI.{insert,render*} 2014-03-04 15:32:19 -08:00
David Greenspan
2e57a7439d Remove Function(...) in component OO due to CSP
Can't use what's effectively an "eval" and still be safe for restrictive Content Security Policies.  Hopefully we get a better way to make classes print nicely in the dev console in the future.
2014-03-04 11:23:56 -08:00
Slava Kim
53f2b73d6f Merge branch 'oplog-limits-buffered' into devel 2014-03-03 23:28:54 -08:00
David Glasser
6069da6427 Update facebook config instructions. 2014-03-03 23:15:30 -08:00
Nick Martin
a1fed0caaa Comment only. Record idea about unblocking subs. 2014-03-03 22:49:49 -08:00
Nick Martin
f9c947a749 Print when we're listening, for use in automated tests. Fixes #1884. 2014-03-03 22:17:40 -08:00
Tim Haines
f079efe48b Update the instructions for creating a Google Client ID 2014-03-03 22:00:31 -08:00
David Glasser
c0447737ec Fix less error handling during ast.toCSS
Fixes #1877
2014-03-03 21:55:58 -08:00
rgould
51148c84df Update AmplifyJS from 1.1.0 to 1.1.2 2014-03-03 21:21:39 -08:00
Tim Haines
e356c23fdb Make factsByPackage data available to the server environment 2014-03-03 21:11:57 -08:00
David Glasser
06267daa93 Comment: we only partially do AJAX crawling spec
Fixes #487
2014-03-03 20:55:37 -08:00
David Greenspan
57f11cb961 Use HTMLTools namespace for all of html-tools 2014-03-03 15:51:35 -08:00
David Greenspan
5e85c32ea6 Move asciiLowerCase to html-tools 2014-03-03 15:51:35 -08:00
David Greenspan
f6c766ae06 Start html.js refactor; case-fold at compile time
- Start shrinking html.js down to the 150-line file it can be
- Move "proper case" logic to the template compiler; the tagName of an HTMLjs tag is now in proper case.  This is both for better performance and reduced size and complexity of runtime code (i.e. blaze.js).
- Start moving html-tools to the HTMLTools namespace
2014-03-03 15:51:35 -08:00
David Greenspan
d8999c1300 resurrect UI.insert 2014-03-03 15:04:29 -08:00
David Glasser
1cb76e1088 Merge branch 'devel' into oplog-limits-buffered 2014-03-01 18:21:52 -08:00
Slava Kim
e4c5f6ac97 Oplog limits test: big initial set, repolls, safeToAppend flag 2014-03-01 01:13:00 -08:00
David Glasser
bd05fdb2c5 minimongo: support semi-logical $elemMatch
ie, a document with some logical operator and some equality in an
elemMatch.

eg: {a: {$elemMatch: {x: 1, $or: [{a: 1}, {b: 1}]}}}

Fixes #1875.
2014-02-28 23:13:11 -08:00
Slava Kim
6c595e7b8d A remove a redundant clone 2014-02-28 21:42:51 -08:00
Slava Kim
1fef6e5662 Factor out published/buffer renewal into _runQuery
Fixes the bug when the buffer is empty on the first run if the size of query is more than limit*2
2014-02-28 18:18:09 -08:00
Slava Kim
c615ec11ef Move the comment 2014-02-28 16:51:09 -08:00
Slava Kim
29ebdbfeae Sophisticate the tests for oplog + limits + sorter 2014-02-28 14:34:44 -08:00
Slava Kim
571ba01f16 Use new sorter + projection api in oplog code 2014-02-28 14:25:33 -08:00
Slava Kim
c14e41a0d7 Simple tests on Sorter.combineIntoProjection 2014-02-28 14:22:30 -08:00
Slava Kim
a96243e746 Sorter.combineIntoProjection is an instance method
Reuse existing sort spec parsing, store sort spec explicitly with key-paths. Elide numeric key in Sorter._getPaths
2014-02-28 14:16:10 -08:00
David Glasser
45db64d4bf Support {a: {$regex: '', $options: 'i'}}
Fixes #1874.
2014-02-28 11:58:29 -08:00
David Glasser
d049bf7506 Use faye-websocket for server-to-server DDP
This matches what the SockJS server uses; now we only need to understand
and fix bugs in the implementation of one websocket npm module.

Some notes:

  - I actually trust that it's possible to close a connection before it
    successfully connects, which allows me to simplify the code a
    lot (since there shouldn't be multiple connections active per
    ClientStream). I put in some assertions to make sure this is the
    case, though.  (Note that this module also has a simpler model,
    where there's a single object representing the client connection,
    not a "client" object that spawns "connections".)

  - We now print connect errors as well as post-connect errors.  (This
    required adding a flag to keep tests quiet since it makes an
    expected-to-fail-to-connect connection.)  We need a better approach
    to stream error handling, though.

  - We used to have a test to make sure that a certain not-user-visible
    callback is called within a Fiber; structuring the code such that
    this test is still possible would lead to the code being less
    consistent and harder to read, so I dropped the test.

  - Fix a few bugs where we weren't using Meteor.setTimeout.
2014-02-27 15:20:43 -08:00
Avital Oliver
8efff3ebb7 Log deprecation notice for {{#isolate}}, {{#constant}}, preserve 2014-02-27 11:41:46 -08:00
Avital Oliver
208bbea9aa fix observe-sequence tests
in observe-sequence, we now no longer
try to make ids non-empty by prepending "-"
if they are numbers or booleans (since
those already are non-empty).
2014-02-26 21:16:02 -08:00
Slava Kim
85ba085c78 Oplog code takes sorter fields into shared projection 2014-02-26 18:45:25 -08:00
Slava Kim
b3548e5437 Combine sorter spec with projection 2014-02-26 18:44:24 -08:00
Slava Kim
7948c0f38b Test for preserving fields needed for sort 2014-02-26 17:09:16 -08:00
David Glasser
af08231656 When switching to QUERYING, stop what you're doing
We don't think there was a bug before but this should make things a
little more firm.
2014-02-26 16:33:27 -08:00
David Glasser
15a4cac27c typo 2014-02-26 15:58:08 -08:00
David Glasser
d249fbd07b Merge branch 'devel' into oplog-limits-buffered
Conflicts:
	packages/mongo-livedata/oplog_tests.js
2014-02-26 15:55:39 -08:00