Commit Graph

9034 Commits

Author SHA1 Message Date
David Greenspan
f362f949af UI.data() / UI.data(view) / UI.data(element)
Question: Keep UI.getElementData in docs, or just for back-compat?
2014-08-15 16:17:23 -07:00
David Greenspan
577ff39c03 Expose AttributeHandler (privately) 2014-08-15 12:23:55 -07:00
David Greenspan
275d281202 How to obtain a View object 2014-08-15 11:22:42 -07:00
David Greenspan
aa0211a63c UI.View docs 2014-08-14 20:13:48 -07:00
David Greenspan
03def4beba Fix DOMRange onAttached; view.{first,last}Node()
DOMRange#setMembers was causing DOMRange#onAttached callbacks to get called, masking a bug in onViewReady where DOMRange#attached was misspelled DOMRange#isAttached.
2014-08-14 14:17:43 -07:00
David Greenspan
5f252370fe Make _onViewRendered private; onViewReady
The _onViewRendered hook fires when the View is actually rendered, not waiting until flush time or for the DOMRange to be attached.  It’s not very useful as part of the public API, because you can’t do anything with it (like manipulate the generated DOM).  Instead, expose onViewReady, which underlies the template “rendered” callback.
2014-08-14 13:31:39 -07:00
David Greenspan
ffd4a61227 Make view.domrange private; isRendered/isAttached 2014-08-14 13:21:44 -07:00
David Greenspan
4d9f4ebd35 Views only have an immediate onViewRendered cb
You don’t get the “wait for attached” behavior from Blaze.View anymore, you just get a plain onViewRendered callback.  No onMaterialized.  The template “rendered” callback implements the wait-for-attached and wait-for-afterFlush parts.

Also, if a template somehow re-renders, it won’t get extra event handlers now.  And if it re-renders before being attached, something sensible will happen (like all the calls of the rendered callback will be saved for onAttached).

view.isCreatedForExpansion and view.isInRender become private.
2014-08-13 17:22:07 -07:00
David Greenspan
b5507c33a7 Start view_tests for Blaze
Want to test view.onRendered and view.onMaterialized while nailing
down their API.
2014-08-13 15:02:11 -07:00
David Greenspan
f35ce02196 Rename to view._render, onView{Created,Destroyed} 2014-08-13 14:33:05 -07:00
David Greenspan
8ed48c457d Make Blaze.withCurrentView private 2014-08-12 14:05:56 -07:00
David Greenspan
28da81fd49 Make UI.parentData public 2014-08-12 13:57:33 -07:00
David Greenspan
10fe009db8 Make UI.templateInstance() public
Get rid of Template.updateTemplateInstance(view) and
Blaze.getCurrentTemplateView() in favor of view.templateInstance()
and UI.templateInstance().view.
2014-08-12 13:37:35 -07:00
David Greenspan
0f905100d3 View “kind” -> “viewName”; Template constructor
[new] UI.Template([viewName], renderFunction)

template.__render, template.__kind becomes template.renderFunction,
template.viewName.
2014-08-12 11:49:03 -07:00
David Greenspan
83073cd1eb Blaze === UI, add UI.destroy
Make Blaze.destroyView, Blaze.destroyNode private
2014-08-12 11:07:26 -07:00
David Greenspan
ebff9b3bdf Unbreak the build 2014-08-11 15:39:40 -07:00
David Greenspan
dae543946c Merge remote-tracking branch 'origin/devel' into blaze-templates 2014-08-11 14:39:14 -07:00
David Greenspan
307b9a9504 Make more Blaze calls private
Put underscores before:

ReactiveVar, InOuterTemplateScope, EventSupport, reportException,
wrapCatchingExceptions, DOMMaterializer, and HTMLJSExpander
2014-08-11 14:38:46 -07:00
David Greenspan
7ca944e665 UI.render/toHTML, TemplateWith, Blaze.toText
Move Spacebars.TemplateWith to Blaze._TemplateWith.  It is the official
way to give a template data, after all, but it’s a little too weird to
make public.  Use it in Blaze.renderWithData, even though it doesn’t
seem like it would make a difference.

Unify UI.render/renderWithData with Blaze.render, and add
toHTMLWithData.  Publicly, they take a Template or a View.
The View must be unrendered, of course.  If given a Template,
constructView will be called.  Privately, they take any HTMLJS
extended to be allowed to contain Templates and Views, except
null or undefined, or a function returning extended HTMLJS.
The “data” argument may be a function or a not, as in UI.With
(and unlike the old public UI.renderWithData).

Make Blaze.toText private (Blaze._toText).
2014-08-11 14:24:07 -07:00
David Glasser
64d939acb2 Add a lot more buildmessage captures
Many of these (mostly in top level commands in commands-packages.js) are
not super well thought out: they use a new "doOrDie" helper to run some
function in a capture and exit if there are any messages.  We really
need to get a little more thoughtful about the big picture of error
handling (combining "build" errors, network errors, catalog errors,
etc). But this at least allows the addition of more buildmessage
assertions.

At the very least, this ensures that if you edit a package.js in a local
package while "meteor run" is running, that instead of crashing the tool
it properly shows the buildmessage and lets you fix the issue.
2014-08-11 17:06:28 -04:00
David Greenspan
fa1d30f02d UI.render = Blaze.render, returns a View
The “rendered template” returned by UI.render and taken by UI.insert
and UI.remove is now a View (soon to be UI.View) instead of a DOMRange.
The pattern UI.insert(UI.render(Template.foo), div) is exactly the same.
The pattern Blaze.render(Template.foo).attach(div) no longer works.
2014-08-11 12:43:48 -07:00
Matthew Arbesfeld
c6aa178f22 Fix typo in Autoupdate.newClientAvailable 2014-08-10 17:35:56 -07:00
Matthew Arbesfeld
1f6f15dc20 Fix autoupdate in cases where Autoupdate.autoupdateVersion is set.
If Autoupdate.autoupdateVersion is set outside of the Autoupdate
package, we wouldn't notify the client of the new version. This
patch simplifies the updating logic by only having one document
per version type.
2014-08-10 17:27:22 -07:00
David Greenspan
57ade381c9 Make Blaze.DOMBackend private 2014-08-10 09:23:08 -07:00
David Greenspan
4771a65cdd Make Blaze.DOMRange private 2014-08-10 09:13:17 -07:00
David Greenspan
8019ec5ded Rename this.__view__ to this.view 2014-08-08 18:17:30 -07:00
David Greenspan
7035b91249 Merge branch 'devel' into blaze-templates
# 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-08-08 18:16:56 -07:00
David Glasser
a3e1ed79ff Print something better than [Object object]
If we ever load javascript (uniload load or package.js parse) outside of
a buildmessage job and there's a syntax error, FancySyntaxError gets
thrown instead of properly processed. Now, we shouldn't do that (we
should only load JS inside a buildmessage job!) but our codebase isn't
currently up to that standard, so at least ensure that there's some
level of useful syntax error (albeit with an ugly internal stack trace
attached) in this case.
2014-08-08 10:30:22 -07:00
David Glasser
4d1f7b58d0 missing newline release/METEOR-CORE@0.9.0-rc5 2014-08-08 00:30:36 -07:00
David Glasser
f4eefa1f04 vbump rc5 2014-08-08 00:06:55 -07:00
David Glasser
1a531aa363 Fix cross-linking
Broken by interface change in 8bcbd6
2014-08-08 00:04:14 -07:00
David Glasser
d2f950b594 download more aggressively in --get-ready 2014-08-07 23:37:23 -07:00
David Glasser
59257989e5 Always download missing packages before compiling 2014-08-07 23:37:01 -07:00
David Glasser
6dd5dc84f5 project._ensurePackagesExistOnDisk -> trophouse
Now called downloadMissingPackages. The function did not actually do
anything project-related.
2014-08-07 22:57:49 -07:00
David Glasser
f1f94d7151 Follow-up to 4cd1ea5: fix crash 2014-08-07 22:30:59 -07:00
David Glasser
861c755704 Use catalog.refreshInProgress just for one fiber
ie, this is preventing re-entrancy, not concurrency
2014-08-07 17:41:14 -07:00
David Glasser
4cd1ea5d1f Pass uniload's ignoreProjectDeps down farther
Fixes test-packages from a clean checkout (sigh)

Basically, uniload should never depend on your current project! It's
building separate JS images!
2014-08-07 17:07:54 -07:00
David Glasser
671c82e618 Print package downloads except background updater
Before, there were some random contexts (like 'test-packages') which
didn't print downloads. Now, the default is printing, and the exception
is the automatic background updater.

(Some of these bulk contexts should probably set silent and print their
own progress bar.  And maybe even do paralellism...)

Generally clean up the tropohouse.maybeDownloadPackageForArchitectures
interface. Change it to take options, remove the vestigial return
value (though really, there needs to be better error handling...)
2014-08-07 16:27:23 -07:00
David Glasser
ed6e9be0d6 bump BUILT_BY, just in case. 2014-08-07 14:50:25 -07:00
Sashko Stubailo
ce19e517e3 Add bundle version warning 2014-08-07 14:44:55 -07:00
David Glasser
afd77b4d0e Clarify that C.find(selector) is optional
Fixes #2353. Fixes #2367.
2014-08-07 14:41:47 -07:00
David Glasser
d8551ef656 Remove errant console.log 2014-08-07 14:37:26 -07:00
David Glasser
2d5c481e49 Upgrade less from 1.7.1 to 1.7.4. Fixes #2346 2014-08-07 14:36:50 -07:00
Richard Littauer
d7b403b5b6 Docs: Added cross-reference for origin.meteor.com
Fixes #2343.
2014-08-07 14:33:33 -07:00
David Glasser
5675d3e29a Merge branch 'packaging' into devel 2014-08-07 14:29:53 -07:00
David Greenspan
d2b0cb73df Merge pull request #2358 from mquandalle/edit-comment
Edit `TemplateTag` comments to mention BLOCKCOMMENT
2014-08-07 13:43:28 -07:00
David Glasser
ecdc772f28 Write unipackages and bundles read-only
This will mean that the tropohouse's unipackages are read-only
again (they used to be, due to extractTarGz's read-only nature, before
cross-platform merging was implemented)
2014-08-06 21:23:18 -07:00
David Glasser
4b7601aa92 builder: remove unused 'append' option 2014-08-06 20:44:41 -07:00
ekatek
b2b689b2f8 let users have versionless local packages 2014-08-06 20:33:02 -07:00
David Glasser
00b8ce07f3 runner "is it crashing" timeout increase to 3 secs
This fixes the test failure of the 'run' from checkout.  (It would be
nice if we weren't slowing down the rebuild in 0.9.0, but at least we
should ensure that this feature survives.)
2014-08-06 20:14:54 -07:00