Update to new modifier apis (modify) instead of lifecycles #57
Open
betocantu93 wants to merge 3 commits intololmaus:gen-4from
Open
Update to new modifier apis (modify) instead of lifecycles #57betocantu93 wants to merge 3 commits intololmaus:gen-4from
betocantu93 wants to merge 3 commits intololmaus:gen-4from
Conversation
ember-modifers deprecates lifecycles methods, such as didInstall, didUpdate... replaced by modify. here are some migration guides https://github.com/ember-modifier/ember-modifier/blob/main/MIGRATIONS.md
lolmaus
requested changes
Oct 23, 2023
Owner
lolmaus
left a comment
There was a problem hiding this comment.
Wow, thanks! This is awesome!
Please fix two very minor comments and add a CHANGELOG.md entry (in this project it's maintained by hand).
Note: Node version bump is a breaking change, so bump the major version in the changelog.
| sizesRatioDefault: Sizes = SIZES_RATIO_DEFAULT; | ||
|
|
||
| _element?: HTMLElement; // For some reason, this.element is not always available | ||
| _element?: HTMLElement; // For some reason, this._element is not always available |
| this._didResizeHandlerSync(); | ||
|
|
||
| this.didResizeHandler(); | ||
| registerDestructor(this, () => this.cleanup()); |
Owner
There was a problem hiding this comment.
Why this change (arrow function)? In order to remove the lint exception? But we have this exact lint exception used all over the file, so I don't see a point in fixing just one instance.
The linter should serve to the developer, not vice versa. :)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ember-modifers deprecates lifecycles methods, such as didInstall, didUpdate... replaced by modify.
here are some migration guides
https://github.com/ember-modifier/ember-modifier/blob/main/MIGRATIONS.md