Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Added og:image and alt text checks to linter for Stories #755

Merged
merged 6 commits into from
May 12, 2020

Conversation

Dbrown910
Copy link
Contributor

@Dbrown910 Dbrown910 commented May 7, 2020

Initial updates to linter as apart of Linter UI project

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@googlebot
Copy link

A Googler has manually verified that the CLAs look good.

(Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.)

ℹ️ Googlers: Go here for more info.

Copy link
Collaborator

@sebastianbenz sebastianbenz left a comment

Choose a reason for hiding this comment

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

Thanks! Looks good. Left a few comments (mostly nits). Can you please add tests as well.

packages/linter/src/rules/ImagesHaveAltText.ts Outdated Show resolved Hide resolved
packages/linter/src/rules/MetadataIncludesOGImageSrc.ts Outdated Show resolved Hide resolved
packages/linter/src/rules/MetadataIncludesOGImageSrc.ts Outdated Show resolved Hide resolved
@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

Copy link
Collaborator

@sebastianbenz sebastianbenz left a comment

Choose a reason for hiding this comment

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

Looks good! Few nits.

? this.warn(`Missing og:image property or content source`)
: this.pass();
}
meta() {
return {
url:
"https://html.spec.whatwg.org/multipage/parsing.html#determining-the-character-encoding",
url: "https://ogp.me/",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would it besser to link to a stories specific documentation page?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can swap it for the SEO for Stories post

@@ -102,5 +104,31 @@ assertWarn(
runLocalTest(BookendExists, "local/BookendExists-3/source.html")
);

assertPass(
`${MetadataIncludesOGImageSrc.name} - <meta property="og:image"> is presentt`,
Copy link
Collaborator

Choose a reason for hiding this comment

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

typo: s/presentt/present

<meta property="og:image:height" content="1920">
<meta name="twitter:card" content="summary_large_image">
<link rel="canonical" href="https://onl.st/linter-tester">
<style amp-custom>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you clean up this file and remove everything that is not relevant for the test (e.g. CSS)

<meta name="twitter:card" content="summary_large_image">
<link rel="canonical" href="https://onl.st/linter-tester">
<style amp-custom>
.pbvnsupp amp-img.pbvnsup>img {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same as above, cleanup. the file

@googlebot
Copy link

A Googler has manually verified that the CLAs look good.

(Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.)

ℹ️ Googlers: Go here for more info.

@sebastianbenz
Copy link
Collaborator

I've manually verified the CLA (@Dbrown910 is a Googler)

Copy link
Collaborator

@sebastianbenz sebastianbenz left a comment

Choose a reason for hiding this comment

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

Great - thanks!

@sebastianbenz sebastianbenz merged commit b262d7c into ampproject:master May 12, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants