-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Deprecate views in 1.13, Addonize and remove from core in 2.0 #11377
Comments
viewName? |
…ing on init * Use underscored env variable _ENABLE_LEGACY_VIEW_SUPPORT to remove deprecation. * Change tests that used the Ember.View global directly to import View from "ember-views/views/view" instead Refs emberjs#11377
* change env value RAISE_ON_DEPRECATION to false * change tests for Ember.deprecate that relied on RAISE_ON_DEPRECATION being true refs emberjs#11377
Why is Ember.Select not being converted into a component also like Ember.Checkbox? Why will it be packaged as a separate addon? It seems to me that an HTML select element is something pretty much all projects will use. |
not all of them, so I would prefer an addon for these things. But I also wonder, why not make Ember.Select a component as well (in the addon)? |
I would like to keep this ticket fairly tactical, but would happily discuss this in detail on discuss.emberjs.com if we can take the discussion there. I know some of the items here may be controversial. The select view has terrible performance. Robert was showing me one of his versions the other day that was easily an order of magnitude faster. It has been pathological and we were not able to improve it within semver constraints. These constraints also limit us from just making it a component. The select view also relies heavily on two way binding. This will not be an idiomatic development style in Ember 2.x, and the select view would quickly become an exception to the entire programming model of data-down actions-up we are excited about. Even if it we could just make it a component, it would be unlike what we expect components to be. For these two reasons, it needs to go in 2.0. We do not have a viable component version that uses modern idiomatic style, so we will instead be pushing the select implementation back to addon-land where it can be iterated upon. There are already a few decent options, and I'm sure we will have a few more arise using the new 1.13 APIs and angle components when they land. In time, perhaps one of these could become official. The select view will be part of the ember-legacy-views add-on, which will be supported until Ember 2.4. This should provide plenty of time for a well performing and modern option to mature. |
…lect"}} Use a template-compiler plugin to detect `{{view "string"}}` at compile-time and issue a deprecation with location information. Has a special case deprecation when the string === "select". Removes a test from the view helper tests that was checking for the deprecation at runtime (and removes the associated code in the ember-htmlbars package's `keywords/view`). Note: This does not catch a deprecation when the path is not a string, e.g., `{{view view.someProperty}}`, however emberjs#11401 would catch and issue a deprecation message for that case (at runtime). Also a few changes to deprecations: * document `id` param to `Ember.deprecate` * include deprecation id in log/error message * Use dot-namespaced deprecation ids (more similar to how `instrument` works and paves the way to in the future changing deprecation log levels by paths ie `"view.*"`) * globally silence view-related deprecations in tests to avoid overflowing travis ci's log * update ember-dev dep in bower (pr: emberjs/ember-dev#153) to `a064f0cd2f4c225ffd023b63d4cb31a79db04aaf` * change the view-and-controller-path template compiler plugin to always deprecate `{{controller}}` * change the view-and-controller-path template compiler plugin to skip deprecating `{{view}}` when `Ember.ENV._ENABLE_LEGACY_VIW_SUPPORT` is true refs emberjs#11377
…lect"}} Use a template-compiler plugin to detect `{{view "string"}}` at compile-time and issue a deprecation with location information. Has a special case deprecation when the string === "select". Removes a test from the view helper tests that was checking for the deprecation at runtime (and removes the associated code in the ember-htmlbars package's `keywords/view`). Note: This does not catch a deprecation when the path is not a string, e.g., `{{view view.someProperty}}`, however #11401 would catch and issue a deprecation message for that case (at runtime). Also a few changes to deprecations: * document `id` param to `Ember.deprecate` * include deprecation id in log/error message * Use dot-namespaced deprecation ids (more similar to how `instrument` works and paves the way to in the future changing deprecation log levels by paths ie `"view.*"`) * globally silence view-related deprecations in tests to avoid overflowing travis ci's log * update ember-dev dep in bower (pr: emberjs/ember-dev#153) to `a064f0cd2f4c225ffd023b63d4cb31a79db04aaf` * change the view-and-controller-path template compiler plugin to always deprecate `{{controller}}` * change the view-and-controller-path template compiler plugin to skip deprecating `{{view}}` when `Ember.ENV._ENABLE_LEGACY_VIW_SUPPORT` is true refs #11377 (cherry picked from commit c2bcc86)
There is no upgrade path for this scenario now that
What is useful about the above pattern is:
Edit: Reference to other people with the same issue |
2.0.0 has shipped. Closing... |
This is a quest issue tracking the process of removing views from Ember 2.0.
{{view 'some-view'}}
{{view.someProp}}
Ember.Select
(which is a view) and{{view "select"}}
Ember.View
(except for internals)Ember.Checkbox
will warn (once) that it will become a component in 2.0{{view 'some-view'}}
{{view.someProp}}
Ember.Select
(which is a view) and{{view "select"}}
Ember.Checkbox
will become a component instead of a viewember-legacy-views
with 2.0 (at the latest)Ember.View
{{view.someProp}}
{{view "some-view"}}
{{view "select"}}
Documentation updates will need to happen:
The text was updated successfully, but these errors were encountered: