Commit Graph

7557 Commits

Author SHA1 Message Date
Emily Stark
ef3eaa427a Configure parties oauth in deploy-examples 2014-06-09 15:27:17 -07:00
Avital Oliver
76cb9bd36f Minor changes on deploy-example.sh 2014-06-09 14:55:27 -07:00
Avital Oliver
6be92962b3 Updated deploy-examples.sh script for Rainforest QA runs 2014-06-09 14:52:26 -07:00
Emily Stark
65b1eadf53 Tweak UI._templateInstance error message 2014-06-05 18:31:20 -07:00
Emily Stark
5f0067c4f8 Make UI._templateInstance throw when not in helper. 2014-06-05 18:20:51 -07:00
Avital Oliver
e3cfccb206 Stop not updating form controls if they're focused
On Blaze, we copied functionality we had on Spark: Don't update
form controls (INPUT, TEXTAREA) if they are focused and their underlying
value reactively updates. This was never meant to be the eventual
solution -- we'd eventually have a way to define strategies for two-way
data binding. Maybe you'd be able to define a callback that notifies
the app when a change happens to a field that hasn't been saved yet.

Moreover, not only is the feature incomplete, but with Blaze it works
much more poorly than in Spark. Due to fine-grained updates, users
his this more frequently and don't seem to like the behavior
(in Spark you would only hit this behavior if you set up your
preserve rules exactly right, which many users did not do).

So, we're just ripping out this functionality. Now if a field gets
edited by some other user while you're focused it will just lose its
value. Focus will remain.

Fixes #1965
2014-06-05 18:14:25 -07:00
Slava Kim
0f82f8406a Remove a dead import 2014-06-05 14:44:13 -07:00
David Glasser
df2820ffd9 Only do one query for forEach/count in Deps
They used to run the query twice: once for the actual result and once to
set up the observe. Now it shares the work between the observe and the
actual query.

This required me to inline the _depend helper, but I actually think this
made what's going on more direct and clear.

Drop the _allow_unordered hack. I'm not convinced that it was ever truly
valid; the observe code really doesn't support unordered observes with
skip and limit, and I could not remember what it was about count's use
that made it hypothetically safe.  Easier to just remove the hack (until
we maybe eventually actually fix #1643)

Stop using Deps.Dependency in an unidiomatic way; just use
Deps.currentComputation directly.
2014-06-05 13:18:51 -07:00
David Glasser
b5a0613f85 Remove cursor.rewind interface
Our cursor interface has no nextObject method, so there's no point in
having a rewind method. Its major effect is ensuring that
fetch/forEach/map return no documents if you've already called one of
them once. It's not clear why this is actually useful to anybody.

rewind is kept around as a no-op; if we later implement nextObject, we
can make rewind do something, but we still presumably would auto-rewind
before fetch/forEach/map.

In minimongo, remove the db_objects cache inside each cursor. The only
actual use of this cache was that if you called count multiple times, it
would return the same number without re-running the query, and you could
share the query work between N calls to count and one call to
fetch/forEach/map (but only one call! future calls would return
nothing!)  While there's a minor performance hit from getting rid of
this cache, it should also use a little less memory, and enable use
cases like

   {{#with someCursor}}
     {{#if count}}
        {{#each this}}
          ...
        {{/each}}
     {{/if}}
   {{/with}}

which didn't work before because even the deps invalidation didn't
rewind the cursor.

Also, as a minor optimization, skip an EJSON.clone if there's a
projection, because projection functions are guaranteed to clone.

Fixes #2114
2014-06-05 13:18:51 -07:00
Slava Kim
6394261d51 Tests for CSS url rewrites fixed to the new implementation
i.e. rewrite only style sheets taken from /packages/ folder
2014-06-04 18:57:15 -07:00
Slava Kim
1e4838ccd3 Fix css urls rewrite in application code.
An attempt to fix #2106
2014-06-04 18:19:03 -07:00
Emily Stark
5f222e60cc Merge branch 'via-backend-fix' into devel 2014-06-04 09:35:40 -07:00
Emily Stark
58a14da1a1 Fix double-removal of elements.
Change the unused `viaBackend` flag to `elementsAlreadyRemoved`, and set
the flag in two places: 1. when we remove things from a DomRange
immediately after calling `removeNode`, and 2. when DomRange is notified
that an element has been removed via DomBackend.

The motivation is that re-enabling undocumented animation hooks revealed
that we were trying to remove elements twice: once from `removeNode`,
and once from `nodeRemoved` (via `membersRemoved`).
2014-06-04 09:35:23 -07:00
Avital Oliver
a2d8a975bc Remove one unhelpful stack frame from Deps
Instead of `callWithNoYieldsAllowed` which calls a function
within (introducing a new stack frame that doesn't absolutely
nothing on the client), we now use `withNoYieldsAllowed` that
returns a new function that then gets called.

Since Deps is used all over the place, and in particular
in Blaze, this makes it much easier to look at the stack
trace when stopping in a debugger (for example, when a helper
gets re-executed).

Motivated by the Blaze manual.
2014-06-03 16:54:56 -07:00
ducdigital
3dfcb42eac Move credential token and secret into variables.
Allow 3rd party apps, like PhoneGap/Cordova, to execute inline script
and get the token and secret key easier.
2014-06-03 09:58:39 -07:00
David Glasser
6940c9837c Merge branch 'pr/2115' into devel 2014-06-02 14:41:47 -07:00
Emily Stark
a40a627395 Remove spacebars-compiler -> spacebars test dependency.
This fixes a circular build-time dependency when building test slices.
2014-06-02 14:15:17 -07:00
Emily Stark
e6271d6a7d Tweak error message for circular build-time deps 2014-06-02 14:15:17 -07:00
David Glasser
f8cabb4cfa update sockjs to 0.3.9, websocket-driver to 0.3.4
The websocket-driver update includes our PR to relinquish some memory
faster. https://github.com/faye/websocket-driver-node/pull/6

The sockjs update mostly consists of aligning the version of
faye-websocket it uses internally with the version that we use for our
client. It also contains this Vary: Origin change:
 https://github.com/sockjs/sockjs-node/pull/130
2014-06-02 14:06:11 -07:00
David Glasser
bceab2cbb6 Notice changes to npm-shrinkwrap.json
There were two separate issues here:

 - npm-shrinkwrap.json wasn't actually being used as part of the
   watchset/buildinfo, so changes to it might not cause the package to
   be considered for rebuilding

 - meteor-npm only compared top-level changes when deciding whether to
   update, not all changes

Fixes #1648
2014-06-02 14:06:11 -07:00
David Glasser
b7c547f090 history: a bit more explicit 2014-06-02 14:00:51 -07:00
Emily Stark
17c58f6706 Merge branch 'templ-instance-from-helpers' into devel 2014-06-02 13:51:25 -07:00
Emily Stark
65b76b2bc9 Add UI._templateInstance() 2014-06-02 13:51:13 -07:00
Emily Stark
588d0497ac Merge pull request #2202 from justinsb/cleanup_collections
Drop collections after test (WIP)
2014-06-02 13:26:01 -07:00
Emily Stark
a84d881044 Merge pull request #2186 from justinsb/avoid_dns_catchall
Switch the 'unreachable' url from http://asdf.asdf to http://0.0.0.0
2014-05-30 10:24:38 -07:00
Emily Stark
6b805c14cf Merge branch 'export-oauth-close-popup' into devel 2014-05-29 21:38:18 -07:00
Avital Oliver
58ea689c83 Update History.md for the method on template instances 2014-05-29 17:53:50 -07:00
Avital Oliver
0d81b25aeb Remove trailing whitespace 2014-05-29 17:53:50 -07:00
Avital Oliver
284f71666d Improve docs for this.$ and this.findAll 2014-05-29 17:53:50 -07:00
Hubert OG
e444ad134b Test added 2014-05-29 17:53:50 -07:00
Hubert OG
0da78aa3f0 Tiny optimization 2014-05-29 17:53:50 -07:00
Hubert OG
95c3ff365b Separated findAll and $ 2014-05-29 17:53:50 -07:00
Emily Stark
782c1afbd3 Update History 2014-05-29 15:42:35 -07:00
Emily Stark
d0abad9d66 Merge branch 'ui-dynamic-template' into devel 2014-05-29 15:27:12 -07:00
Emily Stark
3bc7141c34 Move ui-dynamic-template into spacebars package 2014-05-29 15:02:40 -07:00
Avital Oliver
213da73989 Make uihooks test more strict
We now make sure we didn't accidentally modify
the DOM before firing the hook
2014-05-29 12:07:52 -07:00
Emily Stark
9c5764fc83 Add a missing return 2014-05-29 10:02:09 -07:00
Emily Stark
4436cc4ad1 Nick comments 2014-05-29 10:00:11 -07:00
Emily Stark
33ddc92ffc Change _endOfLoginResponse signature.
The main changes are:
* The `isSafe` check happens before _endOfLoginResponse is called. If
  _endOfLoginResponse gets a credential token/secret, then the values
  are safe to include in HTML.
* _endOfLoginResponse gets a little more information about the request
  (like the query string, and a string or Error describing any error
  that occurred).
* We preserve the <=0.8.1.3 behavior where you have to pass ?close in
  the query parameter to get the popup to be closed at the end of the
  OAuth flow.
2014-05-28 21:03:51 -07:00
Emily Stark
bec17a6ccb Remove dead ?redirect OAuth flow.
This code has never worked without some fairly serious client-side
surgery, and it now especially doesn't work because it doesn't
communicate the credentialSecret back to the app. Rather than leave an
untested, unQA-ed code path in core, apps that are using the ?redirect
flow can just override `OAuth._endOfLoginResponse` to do the redirect
themselves.
2014-05-28 21:03:50 -07:00
Emily Stark
c827d00c11 Nick's comments 2014-05-28 21:03:50 -07:00
Emily Stark
cfa29769e0 Rename closePopup to OAuth._endOfLoginResponse. 2014-05-28 21:03:50 -07:00
Emily Stark
0ecc7dac16 Merge branch 'login-display-username' into devel 2014-05-28 21:01:58 -07:00
Emily Stark
af9192d8c0 Show name of logged-in user after email verification/password reset 2014-05-28 21:01:46 -07:00
Emily Stark
ba1450ced5 Update an accounts-ui-unstyled comment 2014-05-28 21:01:46 -07:00
Emily Stark
4a8c76051f Fix bug where data context was being set from falsey to template 2014-05-28 15:44:42 -07:00
Emily Stark
22177781bb Add some comments about UI.dynamic templates 2014-05-28 15:00:38 -07:00
Emily Stark
16b4c383d5 Add helper to check arguments to {{> UI.dynamic}} 2014-05-28 14:56:37 -07:00
Emily Stark
432cda8eb7 Change dynamic-tests.* file names 2014-05-28 14:47:22 -07:00
Emily Stark
4b6d3b2681 Reshuffle packages to allow ui to depend on ui-dynamic-template.
Remove the spacebars-compiler -> spacebars and spacebars-compiler -> ui
dependencies. With those dependencies, ui cannot depend on
ui-dynamic-template, because ui-dynamic-template depends on templating,
whose build plugin depends on spacebars-compiler, who depends on
spacebars who depends on ui.

spacebars-compiler doesn't actually need to depend on ui or spacebars;
it only needs to depend on spacebars to add things to the `Spacebars`
namespace, which this commit does by factoring out the Spacebars export
into a separate `spacebars-common` package.
2014-05-28 14:37:12 -07:00