-
Notifications
You must be signed in to change notification settings - Fork 2k
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
UI: convert to angle bracket invocation #8075
Conversation
This is the result of running the codemod and manually inserting line breaks where there were previously multiline invocations. I used file line length as a guide, aiming to keep them the same, with one exception: app/templates/components/gutter-menu.hbs, where I made the LinkTo @route instances be on their own lines which added two lines to the file. There was an error processing one file, as in ember-codemods/ember-angle-brackets-codemod#185 Uses of link-to with standalone data attributes were also missed ember-codemods/ember-angle-brackets-codemod#237
Ember Asset Size actionAs of 8fe0dff Files that got Smaller 🎉:
Files that stayed the same size 🤷:
|
Ember Test Audit comparison
|
This is the result of running the codemod with this config: { "includeValuelessDataTestAttributes": true } I applied the same line-length-preserving manual formatting as in the previous commit. Thanks to @steventsao for ember-codemods/ember-angle-brackets-codemod#241
This fixes errors such as these: https://app.circleci.com/pipelines/github/hashicorp/nomad/9595/workflows/69183c14-c50d-4076-a1f7-da5a36fb8b24/jobs/71633/tests It seems that there’s now a shadowing situation where {{task}} is being interpreted as an Ember Concurrency helper…? Since this is actually a task state anyway, easier to just rename it.
3ae3f75
to
2078c2a
Compare
This is a manual fix for this instance missed because of ember-codemods/ember-angle-brackets-codemod#185
# Conflicts: # ui/app/routes/allocations/allocation/task/fs.js # ui/app/templates/allocations/allocation/task/fs.hbs # ui/app/templates/components/fs-breadcrumbs.hbs # ui/app/templates/components/fs/directory-entry.hbs
This is a repetition of 2078c2a post-merge.
Jobs | ||
{{/link-to}} | ||
</LinkTo> |
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.
This is an example of the pattern where the invocation becomes one line longer because @route
is not a positional argument like it was with curly bracket invocation and it seemed to me to be more consistent to have it on a separate line as with other named arguments.
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 agree with this. Consistency over line count every time.
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.
It's beautiful 😍
This includes fixes for newer template lint rules that came along with updating that dependency, which was necessary to be able to use the no-curly-component-invocation rule. It also updates some curly invocations that I missed in #8075.
I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions. |
This is mostly a direct application of the ember-angle-brackets-codemod.
I manually restored newlines in multi-line component invocations, mostly
preserving file line length except as noted.
I needed to rename task to taskState in some cases to avoid Ember
Concurrency naming conflicts like this:
https://app.circleci.com/pipelines/github/hashicorp/nomad/9595/workflows/69183c14-c50d-4076-a1f7-da5a36fb8b24/jobs/71633/tests