Skip to content

Document legacy action modifier interaction with component event handlers#21408

Open
olenderhub wants to merge 1 commit into
emberjs:mainfrom
olenderhub:docs/legacy-action-note
Open

Document legacy action modifier interaction with component event handlers#21408
olenderhub wants to merge 1 commit into
emberjs:mainfrom
olenderhub:docs/legacy-action-note

Conversation

@olenderhub
Copy link
Copy Markdown
Contributor

This adds a legacy note to the @ember/component API docs under the "Event Handler Methods" section.

Issue #17877 asked about documenting ordering semantics between classic component event handler methods, legacy {{action}}, and actions forwarded through ...attributes. Since {{action}} is no longer available in current Ember, this note avoids documenting it as current API and instead points readers to {{on}}.

The note links to the template-action deprecation guide for migration details.

I intentionally avoided stating a specific same-element ordering because I could not find an existing test covering classic component event handlers and {{action}} on the same element. The note only calls out that this combination relied on legacy event dispatching and had subtle ordering semantics.

Refs #17877

> current Ember. See the
> [template-action deprecation guide](https://deprecations.emberjs.com/id/template-action/)
> for migration details. Use the `{{on}}` modifier instead.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since {{action}} is no longer available, is this comment still relevant? is there code we can cleanup around this behavior instead?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@NullVoxPopuli I see what you mean. I picked this up because #17877 and #17877 (comment) seemed to ask for documentation around this legacy interaction.

Given that {{action}} is no longer available in current Ember, does it make sense to close #17877? If so, I can close this PR too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants