-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Remove layout/layoutName from classic Component #21284
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,7 +20,7 @@ import { | |
| import { guidFor } from '@ember/-internals/utils'; | ||
| import { assert } from '@ember/debug'; | ||
| import { DEBUG } from '@glimmer/env'; | ||
| import type { Environment, Template, TemplateFactory } from '@glimmer/interfaces'; | ||
| import type { Environment } from '@glimmer/interfaces'; | ||
| import { setInternalComponentManager } from '@glimmer/manager'; | ||
| import { isUpdatableRef, updateRef } from '@glimmer/reference'; | ||
| import { normalizeProperty } from '@glimmer/runtime'; | ||
|
|
@@ -202,7 +202,6 @@ interface ComponentMethods { | |
| @type String | ||
| @public | ||
| */ | ||
| layoutName?: string; | ||
| } | ||
|
|
||
| // A zero-runtime-overhead private symbol to use in branding the component to | ||
|
|
@@ -1268,25 +1267,6 @@ class Component<S = unknown> | |
| */ | ||
| declare static positionalParams: string | string[]; | ||
|
|
||
| /** | ||
| Layout can be used to wrap content in a component. | ||
| @property layout | ||
| @type Function | ||
| @public | ||
| */ | ||
| declare layout?: TemplateFactory | Template; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Did we ever deprecate this?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've been treating it like a shadow-deprecation from https://deprecations.emberjs.com/id/component-template-resolving testing a new app tho with layout doesn't work as I expect: https://github.com/NullVoxPopuli/my-app-trying-to-use-layout-pls-dont-no-one-look-please-use-gjs
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I suppose I should try Ember 5.12 tho, cause the deprecation was probably removed
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 5.12 with vite has the same behavior as 6.11+ with vite -- not working (good)
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 5.8 classic also doesn't have or something since 5.8 prevents hbs files from being imported "as templates" |
||
|
|
||
| /** | ||
| The name of the layout to lookup if no layout is provided. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. any form of looking up was deprecated during 5.x |
||
| By default `Component` will lookup a template with this name in | ||
| `Ember.TEMPLATES` (a shared global object). | ||
| @property layoutName | ||
| @type String | ||
| @default undefined | ||
| @private | ||
| */ | ||
| declare layoutName?: string; | ||
|
|
||
| /** | ||
| The WAI-ARIA role of the control represented by this view. For example, a | ||
| button may have a role of type 'button', or a pane may have a role of | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm currently exploring if I can get rid of templateFor, but will save that for a separate PR