Skip to content
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

[CLEANUP] Remove DEPRECATE_TEMPLATE_ACTION #20882

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

tcjr
Copy link

@tcjr tcjr commented Mar 22, 2025

Related to #20816.

The cleanup for this deprecation is pretty substantial, as it completely deletes two longstanding pieces of code from the resolver: the action modifier and the action helper. One consequence of this is that action is no longer a built-in keyword and can presumably be used now like any other helper and modifier.

@tcjr
Copy link
Author

tcjr commented Mar 24, 2025

@NullVoxPopuli @kategengler I restored the non-modifer parts of the modifier source file. All lints and tests and checks pass locally.

I am not sure how much of that very old event dispatcher code is in use anymore. Maybe "send" or some other old event mechanism still hits that code path.

@kategengler
Copy link
Member

While we deprecated and remove the action modifier and helper we didn't deprecate or remove the actions hash or the TargetActionSupport stuff https://github.com/emberjs/rfcs/blob/deprecate-target-action-support/text/0000-deprecate-target-action-support.md has some more info.

@tcjr
Copy link
Author

tcjr commented Mar 24, 2025

In a post-{{action}} modifier world, should we just remove this test?

  QUnit.test('Should not attempt to render element modifiers GH#14220', function (assert) {
    assert.expect(1);

    this.template('application', "<div {{action 'foo'}}></div>");

    return this.renderToHTML('/').then(function (html) {
      assert.htmlMatches(html, '<body><div></div></body>');
    });
  });

From app-boot-test.js

@NullVoxPopuli
Copy link
Contributor

In a post-{{action}} modifier world, should we just remove this test?

We could replace action with on

@tcjr
Copy link
Author

tcjr commented Mar 24, 2025

We could replace action with on

I believe this a FastBoot test that is verifying that a modifier that adds something to the DOM doesn't do it in the FastBoot context. For {{action}}, it adds a data- attribute. The on modifier doesn't modify the DOM (afaik), so I think we would need to create one for this test that changes the HTML.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants