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

Deprecate this.element and this.args on class-based modifiers #221

Merged
merged 1 commit into from
Mar 24, 2022

Conversation

chriskrycho
Copy link
Contributor

The introduction of the modify hook on class-based modifiers allows users to use the element and both positional and named arguments directly, as arguments to modify, rather than having them as the class properties this.element and this.args (see #217). Accordingly, deprecate access to both this.element and this.args.

(Users who want to stash the element on their modifier class can continue to do so directly, by assigning it from the modify call.)

@chriskrycho chriskrycho mentioned this pull request Mar 23, 2022
19 tasks
addon/-private/class/modifier.ts Outdated Show resolved Hide resolved
addon/-private/class/modifier.ts Outdated Show resolved Hide resolved
addon/-private/class/modifier.ts Outdated Show resolved Hide resolved
@chriskrycho
Copy link
Contributor Author

For the sake of keeping merges clean and easy, this is now based on #220 and should land right after it does.

Copy link
Member

@rwjblue rwjblue left a comment

Choose a reason for hiding this comment

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

I think this needs a rebase now?

The introduction of the `modify` hook on class-based modifiers allows
users to use the `element` and both `positional` and `named` arguments
directly, as arguments to `modify`, rather than having them as the
class properties `this.element` and `this.args` (see #217).
Accordingly, deprecate access to both `this.element` and `this.args`.

(Users who want to stash the `element` on their modifier class can
continue to do so directly, by assigning it from the `modify` call.)
addon/-private/class/modifier.ts Show resolved Hide resolved
addon/-private/class/modifier.ts Show resolved Hide resolved
@rwjblue rwjblue merged commit 36879ab into master Mar 24, 2022
@rwjblue rwjblue deleted the deprecate-element-field branch March 24, 2022 22:20
evoactivity added a commit to evoactivity/ember-autoresize-modifier that referenced this pull request Oct 12, 2022
jelhan pushed a commit to jelhan/ember-autoresize-modifier that referenced this pull request Oct 15, 2022
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.

None yet

2 participants