-
-
Notifications
You must be signed in to change notification settings - Fork 188
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
#673 Fix HBS Lint Errors #675
#673 Fix HBS Lint Errors #675
Conversation
Hi, @BradenLawrence. I noticed that the CI (some of the tests) didn't pass. Will you check this? Let's also work on updating your commit history. I looked at the 5 commits, and it seemed like it's the last commit that we want to keep and merge to the default branch? If so, try running the following commands: # Set upstream
git remote set upstream [email protected]:ember-learn/ember-website.git
# Check if upstream was set correctly (you will see 2 lines for origin, and another 2 lines for upstream)
git remote -v
# Get the latest code and branches from the master branch
git checkout master
git fetch upstream
git merge upstream/master
git push origin master
# Install packages
npm install
# Rebase your branch
git checkout 673-Fix-HBS-Lint-Errors
git reset --hard HEAD~5
git pull --rebase origin master
# Restore your 5th (last) commit
git cherry-pick d197f69 |
Thanks for taking a look at the commit history! I'll try running that and then take a look at the test issues. |
d197f69
to
f0fad3f
Compare
Hey @ijlee2! I took care of the Travis issues that came up. Thanks again for helping me manage my branches/commits! The only linter issues I wasn't sure how to fix were the "no-action" errors found on |
@BradenLawrence Thanks for addressing many of the HBS lint errors. They are not trivial to fix so I'm glad that I was able to get your help. I think it's okay that we merge this pull request without fixing From the number of changed files, I think it may take me a day or more to complete the review. I'll let you know if I need additional changes. Hope you have a good weekend! |
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.
Hey 👋 thanks for the contribution!
I've noted a few issues, but I ran out of time to review this whole PR so I had to quit half way through 🙈 Is there any chance that we can split this up into a few smaller PRs? This is so that a) it's easier to review and b) we don't miss some important things (such as the change to nofollow) in the large changeset
Let me know if you want any help splitting this up, I already see that @ijlee2 has given you some git help 👍
@@ -74,7 +74,7 @@ | |||
</h3> | |||
|
|||
<p> | |||
The Ember Core Team has a small stash of Ember stickers donated by the folks at <a href="https://www.tilde.io/" rel="nofollow noopener" target="_blank">Tilde</a>. These are distributed as requested while in stock. If you'd like to print your own Ember stickers, here are the files you'll need for the canonical ones. |
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.
why are we removing the nofollow from this link? changing anything that affects SEO should be a larger question and shouldn't be included in a "general fix" PR 👍
@@ -1,28 +1,28 @@ | |||
<div class="homepage-image-grid" ...attributes> | |||
<div class="homepage-image-grid__scroll-wrapper"> | |||
<figure class="homepage-image-grid__img-short"> | |||
<img class="homepage-image-grid__img" src="/images/community/tinified/EmberConf19-13.jpg" alt="Ember core team members gather around the Ember logo sign at EmberConf" loading="lazy"> | |||
<img class="homepage-image-grid__img" src="/images/community/tinified/EmberConf19-13.jpg" alt="" role="presentation" loading="lazy"> |
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.
why are we removing the alt and adding presentation here? are they not navigable using the screen reader?
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 image was flagged by Invalid alt attribute. Words such as
image,
photo,or
picture are already announced by screen readers. require-valid-alt-text
due to the word "logo", and I noticed it played a similar role to the other images that were marked as presentation
, i.e. being unrelated to the navigation of the page. I'm still pretty new to accessibility optimization though, so I'm happy to change it back (minus the word 'logo').
@BradenLawrence Sorry for a long wait. I'm starting reviewing now. |
{{#each model as |meetup|}} | ||
{{#marker-layer lat=meetup.lat lng=meetup.lng}} | ||
{{#popup-layer}} | ||
{{#each this.model as |meetup|}} |
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.
suggestion (blocking):
Here, model
came from the route's model hook so we want to use @model
. (We can also guess this because the controller file doesn't exist.)
{{#each this.model as |meetup|}} | |
{{#each @model as |meetup|}} |
@@ -99,7 +99,7 @@ | |||
<a href="#SS_Q104" id="SS_Q104" class="text-lg"> | |||
How long have you been working with Ember? | |||
</a> | |||
<HighCharts @chartOptions={{SS_Q104.options}} @content={{SS_Q104.data}} @theme={{theme}} /> | |||
<HighCharts @chartOptions={{SS_Q104.options}} @content={{SS_Q104.data}} @theme={{this.theme}} /> |
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.
suggestion (non-blocking):
In lines 102, 175, and 258, we can add this.
. (Not crucial since the code is commented out, but nice to do for consistency.)
<HighCharts @chartOptions={{SS_Q104.options}} @content={{SS_Q104.data}} @theme={{this.theme}} /> | |
<HighCharts @chartOptions={{this.SS_Q104.options}} @content={{this.SS_Q104.data}} @theme={{this.theme}} /> |
<title>{{this.model.title}}</title> |
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.
praise:
Nice job with using this.model
instead of @model
. (I had inadvertently used the latter and caused a production bug.)
app/templates/releases/beta.hbs
Outdated
@projects={{array this.model.ember this.model.emberData}} | ||
@description={{this.description}} |
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.
suggestion (blocking for line 6, soft-blocking for line 7):
In line 6, I think we want to pass @model
, the data returned from the route's model
hook.
I noticed that the <ProjectListing>
component doesn't use the argument @description
at all. Let's delete line 7.
@projects={{array this.model.ember this.model.emberData}} | |
@description={{this.description}} | |
@projects={{array @model.ember @model.emberData}} |
app/templates/releases/canary.hbs
Outdated
channel="canary"}} | ||
{{#terminal-code}} | ||
<EmberCliUsage | ||
@project={{this.model.ember}} |
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.
suggestion (blocking):
@project={{this.model.ember}} | |
@project={{@model.ember}} |
app/templates/releases/canary.hbs
Outdated
npm install --save-dev https://s3.amazonaws.com/builds.emberjs.com{{model.canaryInfo.assetPath}} | ||
{{/terminal-code}} | ||
{{/ember-cli-usage}} | ||
npm install --save-dev https://s3.amazonaws.com/builds.emberjs.com{{this.model.canaryInfo.assetPath}} |
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.
npm install --save-dev https://s3.amazonaws.com/builds.emberjs.com{{this.model.canaryInfo.assetPath}} | |
npm install --save-dev https://s3.amazonaws.com/builds.emberjs.com{{@model.canaryInfo.assetPath}} |
app/templates/releases/canary.hbs
Outdated
project=model.emberData | ||
channel="canary"}} | ||
<EmberCliUsage | ||
@project={{this.model.emberData}} |
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.
@project={{this.model.emberData}} | |
@project={{@model.emberData}} |
app/templates/releases/lts.hbs
Outdated
channelDescription="Long Term Support releases receive bugfixes and security updates for an extended period." | ||
}} | ||
<ProjectListing | ||
@projects={{array this.model}} |
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.
@projects={{array this.model}} | |
@projects={{array @model}} |
app/templates/releases/release.hbs
Outdated
channelDescription="Releases are production-ready versions of Ember and Ember Data that have been through a six-week beta cycle." | ||
}} | ||
<ProjectListing | ||
@projects={{array this.model.ember this.model.emberData}} |
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.
@projects={{array this.model.ember this.model.emberData}} | |
@projects={{array @model.ember @model.emberData}} |
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.
Hi, @BradenLawrence. I reviewed all files. Thank you again for working on fixing lint errors in templates.
✅ The vast majority of the changes looked great. I felt like you put in extra effort and care into improving accessibility (updating alt
and tabindex
), so I was glad and appreciative of your work. 💯
🙏🏼 It seemed to me like you (or a codemod) might have defaulted to using this.model
. In Octane, we can write @model
to indicate to a developer to look at the route file (versus the controller) if they ever need to know where model
comes from. I made a few suggestions for using @model
.
🙏🏼 With regards to removing nofollow
, I would have liked to see you do this in a separate pull request. (If I'm understanding correctly, the removal wasn't related to fixing lint errors?)
I don't know if nofollow
is relevant to SEO nowadays (SEO keeps changing so it's a mystery to me), but from a Search Console article from Google, it seemed like we do want to keep nofollow
if we don't want the Ember website to be associated with the link (e.g. amazon.com). We probably do want to be associated with other Ember-related sites (i.e. do remove nofollow
in such cases).
Because you made many removals of nofollow
, I think a good approach to addressing @mansona's concern may be to keep the removals in this pull request, then make a separate pull request to bring back nofollow
for links that we don't want to be associated with. Would this be okay with you?
I'm interested to hear why you removed nofollow
so please feel free to give us feedback. If you have questions about my review or what the next steps can be, feel free to ask as well!
Hi @ijlee2 and @mansona, thank you both so much for the review! The |
@BradenLawrence Ah, I see. Yeah, I think the linter may have wanted us to add If you have time to revert the |
Braden incorporated Chris' feedback by reverting changes related to nofollow.
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.
Awesome work, thank you! And congratulations on making your 1st contribution to the Ember website! 🎉
Addressing linter errors found in hbs files following the latest standards of ember-template-lint: #673