New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement Glimmer Engine #10501
Implement Glimmer Engine #10501
Commits on Apr 2, 2015
-
-
Attrs, scope and view destruction cleanup
This commit fixes several edge cases in how scope was managed in templates, how attrs are looked up, and how views are cleaned up, particularly the willDestroyElement user hook.
-
-
-
-
-
-
-
-
-
-
-
-
-
No longer requires `npm link` for HTMLBars.
-
-
-
-
-
Commits on Apr 3, 2015
Commits on Apr 6, 2015
-
-
-
-
-
Allow Handlebars compat helpers to specify additional dep keys.
In Ember.Handlebars helpers it is possible to add additional dependent keys: ```javascript Ember.Handlebars.helper('capitalize-name', function(value) { return get(value, 'name').toUpperCase(); }, 'name'); ``` --- Unfortunately, the area that we know about the render node and can add more dependent keys, had no knowledge of the individual helper being rendered. Thsi commit adds a `findHelper` call to `linkRenderNode` so that we can determine if additional dependent keys are needed. This is sub-optimal because the additional `findHelper` may have a negative impact on render speed, but a better solution is not currently possible.
-
Process
fooBinding
in general.Previously, the `TransformOldBindingSyntax` AST walker was only processing `{{view}}` invocations. This change makes it process all helper invocation, and updates a number of related tests. In order to do that, we had to change the asserts and deprecations in the transform so that when the `loc` information is not present no errors are thrown.
-
-
-
Update to use new _itemViewTemplate for CollectionView test.
The `{{collection}}` helper sets this automatically, so we need to ensure the tests follow suit.
-
Commits on Apr 7, 2015
-
-
-
Some are still skipped, but will require further thought/details on passing the renderer through to all children in `ComponentNode.prototype.createOrUpdateComponent`.
-
Enable LOG_VIEW_LOOKUPS for {{outlet}} keyword.
Note: that {{outlet}} templates without a view instance do not get a default view any longer (the template is just rendered).
-
-
Restore Component.prototype.targetObject.
This is needed to target the parentView.controller with the action (when it is provided in the template). It is possible that in 2.x this conceptually needs to change from `parentView.controller` to something else, but the general idea will still remain.
Commits on Apr 8, 2015
-
-
Stream dependencies now mock the Stream interface which accomodates some leaner code. Stream now has a revalidate hook which is used for manual dependency management. This hook is invoked in two cases: 1. The stream just activated. 2. The stream is already activate and is about to re-compute.
-
Add deactivate hook in Stream, fix KeyStream observers lifecycle
The commit ensures observers for a KeyStream are removed correctly. A new revalidate hook was introduced as a place to clean up any manual dependencies. This hook is invoked when the last subscriber is removed (including when the stream is being destroyed).
Commits on Apr 9, 2015
-
-
-
This commit modifies the AST transforms to match the Handlebars 3.0 AST.
Commits on Apr 10, 2015
-
And remove the workarounds from it being wrong.
Commits on Apr 11, 2015
Commits on Apr 12, 2015
-
-
-
I don't see a reason to bend over backwards to support the exact same assertion language for this (deprecated) feature. This new message is sufficiently clear.
-
-
-
-
-
Commits on Apr 13, 2015
Commits on Apr 14, 2015
-
Merge branch 'master-before-tomhuda' into ir-before-tomhuda
Conflicts: packages/ember-routing-htmlbars/lib/helpers/render.js packages/ember-template-compiler/lib/plugins/transform-each-in-to-hash.js packages/ember-views/lib/attr_nodes/attr_node.js
-
-
-
This commit also adds several tests for the path and helper usages of the subexpression form, e.g. ```hbs {{capitalize (unbound foo)}} ``` and ```hbs {{capitalize (unbound if foo bar baz)}} ```
-
-
-
-
-
-
Commits on Apr 15, 2015
-
-
-
Unify legacy class binding into AST preprocessor
There are several paths and microsyntaxes for creating class name bindings for a component’s element via Handlebars. For example: `{{view ‘my-view’ class=“hello” classBindings=“:foo isApp:is-an-app”}}` With HTMLbars, these have been deprecated in favor of a single API: `{{view class=“hello foo (if isApp ‘is-an-app’)”}}` This commit rewrites the AST of templates that contain the old syntax into the new syntax at template compile time.
-
ContainerView should inherit from View
While it was a noble effort, the attempt to have ContainerView subclass Component did not work because it broke propagation of the `controller` template keyword.
-
Commits on Apr 16, 2015
-
Updates HTMLBars to ensure that initially undefined/null `attributeBindings` are not set on the views element.
-
-
-
Merge pull request #10886 from mitchlloyd/html-class-spacing
Fix class spacing for classNameBindings
-
-
Update link-render-node to handle missing params.
The `{{component}}` keyword specifies `null` as `params` (since a component cannot receive ordered arguments). This commit simply adds a guard to ensure we do not attempt to access `params.length` when `params` is `null`.
-
-
-
-
-
-
-
this is all old implementation of pre-glimmer outlet behavior
-
-
-
-
-
Merge pull request #10888 from mitchlloyd/is-visible-fixes
isVisible fixes
-
Commits on Apr 17, 2015
-
-
-
-
Fix a test using an undefined context
Context-changing helpers no longer allow an undefined context. Instead, null is substituted for the context.
-
Remove ember-metal-views tests
These tests were removed because they were only testing a stub renderer defined in the tests.
-
-
Commits on Apr 18, 2015
-
-
Completely remove the concept of isVirtual
MetamorphView (and the Metamorph mixin) are the final bastion of virtual views. This commit removes much of their use. MetamorphView had two behaviors: First, it was tagless. Second, it was not included in the view hierarchy. The first concept (taglessness) is still valid in Ember post-Glimmer. For this, we use `tagName: ''`. The second concept (virtual views) is not longer present. So views which previously used MetamorphView will not longer be able to escape the view hierarchy. In most cases, the intent was likely to be tagless and being virtual was simply a side effect. OutletView and EachView will now be present in childViews and will be parentViews. `{{render` used to always create a view. Now, it will only create a view if one is set by the user. By default it is only a componentNode and has no view at all. The final spot MetamorphViews are used it for the default itemView and emptyView on EachView. This should be easy to address in a manner similar to {{render: If the user does not specify a view, none should be required. After this, MetamorphView will no longer be used by internals.
-
Merge pull request #10903 from mixonic/idempotent-rerender-no-virtual
Completely remove the concept of isVirtual
Commits on Apr 19, 2015
-
-
-
-
-
Make createElement work without view entering inDOM state
createElement requires that a view be rendered without the lifecycle hooks being rendered. This leaves it in the hasElement state instead of moving to inDOM as a normal render would.
-
-
-
Commits on Apr 20, 2015
-
-
topmost outlet must ensure its child has a DOM element
This keeps us consistent with the DOM structure we produced pre-glimmer. The topmost out ensures that it's child (not itself) always has a real View with an element.
-
-
-
-
-
Commits on Apr 21, 2015
-
- Rename render_test.js to view_test.js. - Move conatiner view related tests to container_view_test.js. - Remove invalid tests that are overly specific about rerender behaviour. There are much more comprehensive tests in view_lifecycle_test.js.
-
-
Commits on Apr 22, 2015
-
-
Cancel scheduled view#append on view#remove
If a view is in a ‘preRender’ state (or any state for that matter) attempting to destroy the element will effectively make any pending view#append operations a noop.
-
Destroy ember views in destroy-render-node hook
The way `clearRender` works, it won’t call destroy on the top level view if given `destroySelf` flag set to false. By moving the `view.destroy` call into this hook, we can avoid destroying the top level view when it is being cleared by `clearRender`. The `view.lastResult` check seemed to just happen to work and needed to be changed to get more tests passing.
Commits on Apr 23, 2015
-
Merge pull request #10924 from mitchlloyd/view-remove-fixes
Get more tests with view#remove working
Commits on Apr 26, 2015
-
-
-
-
-
-
-
Update number of observers in test
It seems that this test was passing in spirit: the number of observers does not increase when rerendering.
-
Disallow spaces in classNameBindings property
Interestingly, spaces are allowed when setting classNameBindings on a view inside of a template. {{view classNameBindings="prop:true:false anotherProp:more-true:more-false"}} However, they are not allowed when setting the property on a view class: Ember.View.create({ classNameBindings: 'prop:true:false anotherProp:more-true:more-false' }); To handle both of these cases, we split the incoming classNameBindings property by spaces when using the view keyword.
-
Merge pull request #10957 from mitchlloyd/view-attr-fixes
View attribute fixes
-
-
-
Commits on Apr 27, 2015
-
-
Merge pull request #10960 from mitchlloyd/tagless-assertion
Add back assertion for tagless components with classNameBindings
Commits on Apr 28, 2015
-
Merge pull request #10969 from machty/ir-qp
Get remainder of query_params_test.js passing
-
-
Differentiate between mutable and immutable dependencies
this.addDependency now assumes that the dependee is immutable. In particular this means that it no longer returns the Dependency instance. If you need access to the dependency you must now call this.addMutableDependency. This change allows this.addDependency to be a no-op if the passed in object is not a stream. This is useful for subexpression streams to avoid creating unnecessary dependencies for primitive values, as in this example: ```hbs {{concat values sep=','}} ```
-
-
-
-
publish glimmer builds to bower
Stanley Stuart committedApr 28, 2015
Commits on Apr 29, 2015
-
-
Throw when rerender called after rendering
Just before a block is rendered, views are put into a renderedViews list. When `rerender` is called, this list is checked to ensure the view being rerendered has not already been rerendered.
-
-
-
-
Add support for intercepting get and set
These hooks are internal-only, not exposed publicly, and are only intended to be used to emulate deprecated functionality for the moment.
-
-
-
-
Commits on Apr 30, 2015
-
-
-
Merge branch 'master' into idempotent-rerender
Conflicts: packages/ember-views/lib/attr_nodes/legacy_bind.js packages/ember-views/lib/mixins/class_names_support.js packages/ember-views/lib/streams/should_display.js packages/ember-views/lib/views/collection_view.js packages/ember-views/lib/views/core_view.js packages/ember-views/lib/views/select.js
-
Merge pull request #10990 from krisselden/idempotent-rerender
Idempotent rerender
-
* `get` was unused in ember-routing-htmlbars/keywords/action * Indentation was incorrect in ember-htmlbars/tests/integration/mutable_binding_test
-
`typeOf` moved from `ember-metal/utils` to `ember-runtime/utils` as of #10988.
-
-
-
-
Commits on May 1, 2015
-
Mostly complete impl of mutable bindings
There are two failing tests related to timing and I want to investigate an alternate approach for mutable cells.
-
Don't leak the stream into user code
In the previous commit, mutable bindings had a value() method that was a live reflection of the underlying stream. Those semantics were inconsistent with immutable bindings, which only update during the rendering process and trigger lifecycle hooks. This commit snapshots the value and provides a new mutable cell each time through.
-
-
-
Merge pull request #10999 from mitchlloyd/fix-create-child-view-tests
Consistently use `parentView` over `_parentView`
-
Merge pull request #10991 from mitchlloyd/view-computed-controller
Fix a test for view controller property
-
Fallback to "-text-field" component name for unrecognized input type
Previously, using an input type not in the map (such as "email") would cause an exception. This renames the `classification` var to more expressive `componentNameMap`, and turns the map into a whitelist of non-default component names only. Any value of "type" not in that map (or no value for "type") will use the default "-text-field" component name.
-
Merge pull request #11004 from bantic/idempotent-rerender-fix-input-t…
…ypes Fallback to "-text-field" component name for unrecognized input type
Commits on May 2, 2015
-
-
The container view template uses `elementId` as the key for `{{each}}`. We need to ensure that even tagless views have an `elementId`.
-
Update remaining skipped
View.prototype.createElement
.* Avoid using `RenderBuffer` * assert the output HTML
-
Prevent clobbering attrs with an attr named attrs.
When invoking a component like: ```javascript {{foo-bar attrs="blah"}} ``` We cannot set `this.attrs` to be equal to `"blah"`. This is potentially breaking for folks that have used `attrs` as a single attribute value in the root of a component.
-
Merge pull request #10958 from mixonic/idempotent-rerender-assert-rer…
…ender Throw when rerender called after rendering
-
Use
indexOf
from EnumerableUtils.It properly defers to the object or polyfil as needed.
-
-
-
-
-
If a stream value results in a proxy, the stream will begin to observe the proxy's content and notify itself if the content changes.
-
-
Merge pull request #11008 from krisselden/idempotent-rerender
Merge master into idempotent rerender
-
Commits on May 3, 2015
-
-
-
-
-
Adds a way to reliably read from DOM
The readDOMAttr method on views makes it possible to read an attribute from DOM and update the internal lastValue at the same time. This effectively fixes the fact that some attribute sets are not idempotent, which causes problems for the write-only pure-function rendering model used by Glimmer and React.
-
Use readDOMAttr + attributeBinding for <textarea>.
The new `readDOMAttr` API allows us to remove this manual `value` property binding in `Ember.TextArea`.
-
* Remove 'value' attribute hacks. * Add `AttrMorph.prototype.getContent`.
-
-
Merge pull request #10977 from fivetanley/bower-idemptotent-rerender
publish idemptotent rerender to bower
-
-
-
-
-
-
Merge pull request #11012 from mixonic/idempotent-rerender-buffer
Bring back the render hook with a pushable buffer
-
Commits on May 4, 2015
-
-
-
-
-
-
-
Remove deprecation on accessing
attrs
in component root.We have not fully fleshed out the transition plan for this. Remove the deprecation until we have...
-
-
Don't warn when for-compat stream is not a path
The `(mut foo)` construction is designed to throw an error if you try to do `(mut "foo")`, for obvious reasons. When I wrote that error, I missed an alternative scenario: ```hbs {{!-- component-one: --}} {{!-- bar is not a path here --}} <component-two foo="bat" /> {{!-- component-two: --}} {{!-- attrs.foo is a path here --}} <component-three baz={{mut attrs.foo}} /> ``` In this case, `attrs.foo` is a path, but it directly refers to a string, which is itself not mutable. With angle-bracket components, when `{{mut}}` is explicit, the error still makes sense: `<component-three>` should not try to mutate `attrs.foo` and we should warn as soon as we can. Unfortunately, that logic does not apply to the compatibility work we are doing: ```hbs {{!-- component-one: --}} {{component-two foo="bat"}} {{!-- component-two: --}} {{component-three baz=attrs.foo}} ``` In this case, we can't know ahead of time that `attrs.foo` refers to a non-mutator, so we have to allow for the possibility that this is a two-way binding. For what it's worth, scenarios like this, which are clearly bugs (`component-three` settting `baz`), help to explain the motivation for the change in the first place. This commit adds a private `@mut` that can support the looser semantics of Ember 1.x curly components, while retaining the stricter errors for explicit calls to `mut` used with angle bracket components.
-
Intercept property changes instead of sets
(cherry picked from commit b4d53bfd2d2769c4133f5f55e5551c6cc2dc87f8)
-
-
-
Bring Ember._Metamorph and Ember._MetamorphView back and deprecate.
ember-test-helpers still attempts to register `Ember._Metamorph` as `view:default` which causes an error. We will need to update ember-test-helpers to check for its existence first and remove the globals at a later date.
-
Revert "Allow publishing of idempotent-rerender PR to S3."
This reverts commit 12b2496. This was accidentally pushing the glimmer builds to `canary` URL's. Removed for now. Lets just merge this PR....
Commits on May 5, 2015
-
outlet keywords must pass the template to render as template
Previously, they were passing it as layout which smashed a layout that may have existed on the view being rendered.
-
Merge pull request #11022 from mixonic/idempotent-rerender-layout
outlet keywords must pass the template to render as template
-
-
-
-
-
Add test controller propagation from route driven views.
(cherry picked from commit 035545ed2c47b84f1c104d3e22bded6f72db1a37)