Skip to content

chore: Angle Brackets Codemod on app/template/accounts/ #4301

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

Merged
merged 3 commits into from
Apr 16, 2020

Conversation

jaydgruber
Copy link
Contributor

@jaydgruber jaydgruber commented Apr 6, 2020

What

  • removes ember-cli-template-lint in favor of using ember-template-lint directly
    • ref: ember-cli-linter deprecations, which moves to simplify lint calling styles and make them more similar across js & hbs lint
    • a major bump of ember-template-lint is required to use the overrides configuration, which will be helpful to make incremental progress on codemods
  • runs the ember-angle-brackets-codemod on app/template/accounts/
  • enables the template-lint rule no-curly-component-invocation on the same directory to prevent backsliding

Why

Suggestions for a path forward

  • ask for help earlier before getting frustrated! Join the community over in Discord
    • #topic-octane-migration #e-template-lint channels may be of interest
  • leverage existing tools!
  • find ways to break the work down into smaller chunks. pull request recommendations suggest ~250 lines of code for the average code review to reduce burden on the reviewer. 250 files is too much!
    • Personally, I have found that codemods are ok to be a bit bigger in size than your normal code review, since they are just making a repetitive change over and over. Feedback from my team tells me ~50 files changed is a reasonable limit for codemod PRs, to resepect their time
    • Help your reviewers out with good PR descriptions. 95% of a codemod PR is going to be the same change. If you have to make any additional manual changes, call them out clearly in the PR description so that reviewers can pay extra attention to those. If you find yourself writing more than ~5-10 types of manual change in a codemod PR description... maybe a good time to split off into the next incremental PR
  • momentum is important. find ways to keep making progress each day. If you find yourself stuck, instead of going in circles on the same problem:
    • find a way to isolate it to a smaller set of files. hopefully you can isolate to a single test, and filter your test page so that you can get faster feedback
    • again, ask for help in the Discord. if you think the problem is with another OSS library, open an issue
    • normally I would suggest also looking for addon version bumps, but it seems like this repo has dependabot set up, so that's great!
    • keep moving. if you spend more than a few hours stuck on the same problem, draw as small a box around it as you can with glob patterns and a lint rule, but don't let it stop you from converting all of its neighboring files

lint cli changes

  • if you choose to make the switch to using ember-template-lint directly, I'd suggest making a few changes to your local dev & CI setup for linting:

Checklist

  • I have read the Contribution & Best practices Guide.
  • My branch is up-to-date with the Upstream development branch.
  • The acceptance, integration, unit tests and linter pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

@vercel
Copy link

vercel bot commented Apr 6, 2020

This pull request is being automatically deployed with ZEIT Now (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://zeit.co/eventyay/open-event-frontend/2mwmb9kyo
✅ Preview: https://open-event-frontend-git-fork-jaydgruber-angle-brackets-upgrade.eventyay.now.sh

@codecov
Copy link

codecov bot commented Apr 6, 2020

Codecov Report

Merging #4301 into development will increase coverage by 0.06%.
The diff coverage is n/a.

Impacted file tree graph

@@               Coverage Diff               @@
##           development    #4301      +/-   ##
===============================================
+ Coverage        22.72%   22.78%   +0.06%     
===============================================
  Files              468      468              
  Lines             4932     4932              
  Branches             5        5              
===============================================
+ Hits              1121     1124       +3     
+ Misses            3809     3806       -3     
  Partials             2        2              
Impacted Files Coverage Δ
app/components/tabbed-navigation.js 53.33% <0.00%> (+20.00%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 222b0ec...22f6b62. Read the comment docs.

@iamareebjamal iamareebjamal force-pushed the angle-brackets-upgrade branch from fcfd458 to e0b201f Compare April 16, 2020 03:08
@iamareebjamal iamareebjamal changed the title WIP: Angle Brackets Codemod on app/template/accounts/ chore: Angle Brackets Codemod on app/template/accounts/ Apr 16, 2020
@auto-label auto-label bot added the chore label Apr 16, 2020
iamareebjamal
iamareebjamal previously approved these changes Apr 16, 2020
@iamareebjamal
Copy link
Member

Thanks again @jaydgruber for your suggestions and help <3

@filterOptions={{filterOptions}}
@widthConstraint="eq-container"
@resizeMode="fluid"
@fillMode="equal-column" />
Copy link
Member

Choose a reason for hiding this comment

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

This is broken. Same case as #4298

iamareebjamal added a commit to iamareebjamal/open-event-frontend that referenced this pull request Apr 16, 2020
{{sort_by}} was being treated as a composable helper
and thus all builds like fossasia#4301 and mainly fossasia#4298 were breaking
Some changes were reverted in fossasia#4322, but changing to
{{this.sort_by}} makes it unambiguous and also octane
compatible
iamareebjamal added a commit that referenced this pull request Apr 16, 2020
{{sort_by}} was being treated as a composable helper
and thus all builds like #4301 and mainly #4298 were breaking
Some changes were reverted in #4322, but changing to
{{this.sort_by}} makes it unambiguous and also octane
compatible
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants