From 1683a7e73625fb8ffda20753b352514c4c4076b9 Mon Sep 17 00:00:00 2001 From: Godfrey Chan Date: Fri, 2 Oct 2020 13:11:13 -0700 Subject: [PATCH 1/3] Stop Leaking Implementation Details of Built-in Components --- text/0671-modernize-built-in-components-1.md | 386 +++++++++++++++++++ 1 file changed, 386 insertions(+) create mode 100644 text/0671-modernize-built-in-components-1.md diff --git a/text/0671-modernize-built-in-components-1.md b/text/0671-modernize-built-in-components-1.md new file mode 100644 index 0000000000..737c372515 --- /dev/null +++ b/text/0671-modernize-built-in-components-1.md @@ -0,0 +1,386 @@ +- Start Date: 2020-10-02 +- Relevant Team(s): Ember.js +- RFC PR: https://github.com/emberjs/rfcs/issues/671 +- Tracking: (leave this empty) + +# Stop Leaking Implementation Details of Built-in Components + +## Summary + +In order to stop leaking implementation details of built-in components, we +propose to: + +1. Deprecate importing the following modules + 1. `@ember/component/checkbox` + 2. `@ember/component/text-area` + 3. `@ember/component/text-field` + 4. `@ember/routing/link-component` +2. Deprecate accessing the following properties on the `Ember` global + 1. `Ember.Checkbox` + 2. `Ember.LinkComponent` + 3. `Ember.TextArea` + 4. `Ember.TextField` + 5. `Ember.TextSupport` (already private, no import path available) +3. Deprecate calling `reopen` or `reopenClass` on the classes and mixins listed + above, whether they were obtained through an import or the `Ember` global +4. Deprecate calling `reopen` or `reopenClass` on the `Ember.Component` super + class (which is also the default export of `@ember/component`), but not when + called on a subclass of `Ember.Component` other than those listed above +5. Deprecate calling `lookup` or `factoryFor` on an `Owner` with the following + specifiers + 1. `component:input` + 2. `component:link-to` + 3. `component:textarea` + 4. `component:-checkbox` (already considered private) + 5. `component:-text-field` (already considered private) + 6. `template:component/input` + 7. `template:component/link-to` + 8. `template:component/textarea` + 9. `template:component/-checkbox` (already considered private) + 10. `template:component/-text-field` (already considered private) +6. Deprecate overriding the following factories on an `Owner`, through placing + files the corresponding locations in the `app` tree or through any other + means such as runtime registrations or using a custom `Resolver` + 1. `component:-checkbox` + 2. `component:-text-field` + 3. `template:component/input` + 4. `template:component/link-to` + 5. `template:component/textarea` + 6. `template:component/-checkbox` (already considered private) + 7. `template:component/-text-field` (already considered private) + +## Motivation + +The ultimate goal is to stop leaking implementation details of built-in +components and be able to move away from subclassing `Ember.Component` in their +internal implementations. + +This RFC is part of a bigger plan to accomplish this goal, which requires at +least one other follow-up RFC. This section will attempt to provide context for +this overall plan. Please note that this RFC does not attempt to address every +problem mentioned here and should ultimately be evaluated on its own merits. + +### The Problems + +Ember's built-in components, that is ``, `