Commit Graph

495 Commits

Author SHA1 Message Date
Avital Oliver
3351183d8a package version bumps for 0.9.1.1 2014-09-06 14:27:26 -07:00
Avital Oliver
16ff10c96b Fix weak dependencies on renamed packages
The renames of packages ui -> blaze, deps -> tracker,
livedata -> ddp worked fine when a package or an app
dependened on the renamed packages. But if there was
a weak dependency (say `api.use('ui', {weak: true})`)
then:

(1) `Package.ui` would be null (since it's not in
    meteor-platform)
(2) Even if your app added 'ui' explicitly, the 'ui'
    package didn't export any symbols.
2014-09-06 13:05:19 -07:00
Avital Oliver
c23408bdd7 versions for 0.9.1 2014-09-04 15:41:39 -07:00
Avital Oliver
864fffc9e9 Bump package versions in preparation for 0.9.1-rc0 2014-08-28 11:00:35 -07:00
David Greenspan
dd77f94035 Mark ui package as deprecated 2014-08-26 17:30:18 -07:00
David Greenspan
c93ac97c10 All-but-remove the ui package
Also improve info strings on blaze and ui

Not in this commit:
* Change all uses of `ui` package to use `blaze`
* Change all references to UI symbol to Blaze
* Change docs accordingly
2014-08-26 15:53:24 -07:00
David Greenspan
27c544ee05 Fix getParentView reference in test 2014-08-18 17:34:25 -07:00
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
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
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
f35ce02196 Rename to view._render, onView{Created,Destroyed} 2014-08-13 14:33:05 -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
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
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 Greenspan
22d4c48188 Rename Template.__create__, __define__, and others
* `Template.__create__` is now `new Template`
* `Template = Blaze.Template`
* `Template` is a constructor function
* `Template.foo instanceof Template` (but keep `Blaze.isTemplate`)
* No more `Blaze.runTemplate` (use `template.constructView`)
* `constructView` instead of `__makeView`
* template objects have `__kind` and `__render`
* No `__viewName`, `__templateName`
* `Template.__body__` is now `Template._body_` (and renamed methods)
* No `Template.__lookup__`, instead `(name in Template) && (Template[name] instance of Template)`
* `Template.__define__` replaced by `Template.__assign(name, template)`
2014-08-06 16:05:27 -07:00
David Glasser
996d347139 Merge branch 'devel' into packaging
Conflicts:
	docs/client/api.html
	docs/client/concepts.html
	docs/client/introduction.html
	meteor
	packages/html-tools/package.js
	packages/spacebars-common/package.js
	packages/webapp/webapp_server.js
	tools/bundler.js
2014-07-21 16:18:25 -07:00
David Greenspan
57465b00c2 Handle textarea edge case slightly more gracefully
and tests
2014-07-13 11:30:32 -07:00
ekatek
b9a714f028 ripping out internal, name and test from package.js files 2014-07-07 20:50:50 -07:00
David Greenspan
34d30f52ce Catch exceptions thrown from template helpers 2014-07-02 21:12:29 -07:00
David Greenspan
8c8887da7c Fix rest of the render tests 2014-07-01 10:20:06 -07:00
David Greenspan
3d12c6dbfa Fix a bunch of tests 2014-06-30 20:28:02 -07:00
Avital Oliver
217313f04a Fix UI.getElementData 2014-06-30 20:27:42 -07:00
Avital Oliver
bae3b16ebc Fix UI.render/UI.renderWithData/UI.insert 2014-06-30 20:22:24 -07:00
Avital Oliver
1ba01a4b19 Remove dead code 2014-06-30 20:16:26 -07:00
Avital Oliver
b21d87d142 Merge branch 'blaze-refactor' into blaze-views
Conflicts:
	packages/spacebars-tests/template_tests.html
	packages/spacebars-tests/template_tests.js
	packages/ui/package.js
	packages/ui/ui.js
2014-06-30 20:14:58 -07:00
Avital Oliver
31a6cec54b Port UI._parentData 2014-06-30 20:01:25 -07:00
David Greenspan
ab4bb8f993 Get rid of 3s/OLDSTYLE, start to exclude old code 2014-06-30 15:45:12 -07:00
Avital Oliver
5e0e227eb4 Remove an old test that was replaced by a test in spacebars-tests 2014-06-27 14:11:02 -07:00
Avital Oliver
c0edd2d699 Port UI._parentData 2014-06-27 14:03:23 -07:00
Avital Oliver
33cd3a5344 Port UI.getElementData 2014-06-27 13:40:06 -07:00
Avital Oliver
e9e7237e8f Port UI.render, UI.renderWithData, UI.insert
UI.render and UI.renderWithData now return a DOMRange.
We've never quite documented what the return value of
these functions is, other than "you can pass it to
UI.insert", which is still true.

Also ported the tests by moving them into the spacebars-tests
package, so that they use a template rather than the
component/htmljs API. This has the added benefit of
making the tests less brittle to changes in internals.
2014-06-25 17:07:32 -07:00
David Greenspan
1c42080ab3 Fix style attribute tests 2014-06-23 15:04:10 -07:00
David Glasser
5a85e2f24c Merge branch 'devel' into packaging
Conflicts:
	tools/bundler.js
	tools/tests/login.js
	tools/unipackage.js
2014-06-23 14:48:21 -07:00
David Greenspan
095b3a26c6 Merge remote-tracking branch 'origin/devel' into blaze-refactor
Conflicts:
	packages/spacebars-tests/template_tests.js
	packages/ui/base.js
	packages/ui/dombackend.js
	packages/ui/dombackend_tests.js
	packages/ui/domrange.js
	packages/ui/domrange_tests.js
	packages/ui/each.js
	packages/ui/render.js
	packages/ui/render_tests.js
2014-06-23 10:56:55 -07:00
Emily Stark
1c12b1a49f Merge branch 'master' into devel
Conflicts:
	History.md
	packages/accounts-password/password_server.js
	packages/spacebars-tests/template_tests.html
	packages/spacebars-tests/template_tests.js
	packages/ui/base.js
2014-06-23 08:18:19 -07:00
Emily Stark
2b87aa1f00 Do feature detection instead of browser detection for ui test.
The previous `isIE()` check returned false for IE11.
2014-06-22 16:31:13 -07:00
Emily Stark
69455d4df7 Use _.toArray to make IE8 happy 2014-06-22 08:27:42 -07:00
David Greenspan
15d23022b2 Remove more dead code 2014-06-21 18:34:18 -07:00
David Greenspan
1ebafb4d8c Remove dead code 2014-06-21 18:25:57 -07:00
David Greenspan
a72c497276 UI.body2 -> UI.body 2014-06-21 18:19:09 -07:00
David Greenspan
72d9cb9b90 Fix {{> content}} data context 2014-06-21 18:16:12 -07:00
David Greenspan
9a5e856bdf Reorder and rename test 2014-06-21 18:15:48 -07:00
Emily Stark
7b1cddad0c Merge branch 'fix-ui-hooks-nested-domranges' into release-0.8.2 2014-06-20 17:10:32 -07:00
David Greenspan
91de0eff62 Fix more tests (and code)
Biggest fix is that event data was wrong; when binding “this” for an event handler, we didn’t have a pointer to the current template, just a pointer to the prototype (i.e. the object Template.foo itself), and we were using that.
2014-06-20 15:24:54 -07:00
Matthew Arbesfeld
42b0cad48f Allow styles to not have a trailing semicolon. Fix cannonicalize_html to
remove trailing semicolons from styles.
2014-06-20 14:06:37 -07:00
Matthew Arbesfeld
02c0c4de68 IE8 fix for StyleAttrHandler. 2014-06-20 13:28:23 -07:00
David Greenspan
085441524f Separate element removal and “teardown”
DomRange now never removes elements except through the removeElement UI hook.  If you write a hook that prevents removal, teardown still happens (e.g. templates stop updating).

This code also provides the basis for stopping updates to part of the DOM by triggering teardown without removal.

Before, DomBackend.removeElement would both trigger teardown and actually deparent the element.  Now we have DomBackend.tearDownElement, which just triggers the jQuery teardown (which in turn triggers finalization of DomRanges that have been inserted in the DOM tree).

The flag to {node,members,range}Removed is now named “alreadyTornDown” and documented.  Its purpose is to prevent redundant teardown walks through the DOM.
2014-06-20 12:34:23 -07:00
Avital Oliver
2ea77a9409 Even better checks for the arguments to UI.insert 2014-06-20 12:17:58 -07:00