From 2b6dc577f6d6112dc32e8d58689dca0bec3ce1ac Mon Sep 17 00:00:00 2001 From: Godfrey Chan Date: Wed, 6 Jan 2021 23:13:20 -0800 Subject: [PATCH] Clarify and amend import paths in RFC #496 and #671 This resolves a small confusion between the two RFCs. --- text/0496-handlebars-strict-mode.md | 2 +- text/0671-modernize-built-in-components-1.md | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/text/0496-handlebars-strict-mode.md b/text/0496-handlebars-strict-mode.md index eede88c1f7..4ca6a99b28 100644 --- a/text/0496-handlebars-strict-mode.md +++ b/text/0496-handlebars-strict-mode.md @@ -479,7 +479,7 @@ On the other hand, the following built-in constructs will need to be imported * `on` (`import { on } from '@ember/modifier'`) * `Input` (`import { Input } from '@ember/component`) * `LinkTo` (`import { LinkTo } from '@ember/routing`) -* `TextArea` (`import { TextArea } from '@ember/component'`) +* `Textarea` (`import { Textarea } from '@ember/component'`) In general, built-ins that can be made importable should be imported. The main difference are that some of the keywords uses internal language features (e.g. diff --git a/text/0671-modernize-built-in-components-1.md b/text/0671-modernize-built-in-components-1.md index d726526223..eb4029a4ac 100644 --- a/text/0671-modernize-built-in-components-1.md +++ b/text/0671-modernize-built-in-components-1.md @@ -310,6 +310,18 @@ the built-in components on these legacy implementaitons, but custom subclasses will continue to work. The deprecation message should provide information about this legacy addon, or link to the deprecation details page that does. +Note that in accordance with [RFC #496](0496-handlebars-strict-mode.md), the +following import paths will be made available for use in strict mode: + +* `Input` (`import { Input } from '@ember/component`) +* `LinkTo` (`import { LinkTo } from '@ember/routing`) +* `Textarea` (`import { Textarea } from '@ember/component'`) + +However, unlike the deprecated import paths in group 1, these modules provide +opaque values that are intended for use in templates only. Since they do not +expose the implementation details of the built-in components, these new import +paths do not have the same issue described in this RFC. + The third and forth prevents globally modifiying the behavior of built-in components. Users are encouraged to create wrapper components for use in their apps or create custom subclasses using the legacy addon.