Skip to content
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

Fixed #1508: Ported SEO component to NextJS #1566

Merged
merged 1 commit into from
Jan 30, 2021

Conversation

tonyvugithub
Copy link
Contributor

Issue This PR Addresses

Fixed #1508

Type of Change

  • Bugfix: Change which fixes an issue
  • New Feature: Change which adds functionality
  • Documentation Update: Change which improves documentation
  • UI: Change which improves UI

Description

I modified SEO component to be written in TS

Checklist

  • Quality: This PR builds and passes our npm test and works locally
  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Screenshots: This PR includes screenshots or GIFs of the changes made or an explanation of why it does not (if applicable)
  • Documentation: This PR includes updated/added documentation to user exposed functionality or configuration variables are added/changed or an explanation of why it does not(if applicable)

chrispinkney
chrispinkney previously approved these changes Jan 20, 2021
Copy link
Contributor

@PedroFonsecaDEV PedroFonsecaDEV left a comment

Choose a reason for hiding this comment

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

@tonyvugithub
Copy link
Contributor Author

@PedroFonsecaDEV :Great! I make some modification later today. Thanks. Actually never dug into Seo with NextJS

Copy link
Contributor

@humphd humphd left a comment

Choose a reason for hiding this comment

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

Some of what you're doing here should be moved to _document.tsx instead of being used here.

I had to do this recently with next.js, and researched it a bunch. You can see an example:

src/frontend/next/src/components/SEO.tsx Outdated Show resolved Hide resolved
src/frontend/next/src/components/SEO.tsx Outdated Show resolved Hide resolved
@humphd
Copy link
Contributor

humphd commented Jan 22, 2021

Moving out to 1.6.

@humphd
Copy link
Contributor

humphd commented Jan 26, 2021

See also #1607

@tonyvugithub
Copy link
Contributor Author

src/frontend/next/src/components/SEO.tsx Outdated Show resolved Hide resolved
src/frontend/next/src/components/SEO.tsx Outdated Show resolved Hide resolved
chrispinkney
chrispinkney previously approved these changes Jan 29, 2021
@chrispinkney
Copy link
Contributor

Awesome. SEO seems really neat.

src/frontend/next/src/pages/_document.tsx Outdated Show resolved Hide resolved
src/frontend/next/src/pages/_document.tsx Outdated Show resolved Hide resolved
src/frontend/next/src/pages/_document.tsx Outdated Show resolved Hide resolved
src/frontend/next/src/components/SEO.tsx Outdated Show resolved Hide resolved
Copy link
Contributor

@humphd humphd 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, just a few small things.

src/frontend/next/src/components/SEO.tsx Outdated Show resolved Hide resolved
src/frontend/next/src/pages/_document.tsx Show resolved Hide resolved
Copy link
Contributor

@birtony birtony left a comment

Choose a reason for hiding this comment

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

I think we might want to add some additional tags. It should probably be addressed in a separate pr, which would fix (at least partially) #1607. But one thing that caught be attention is the image meta tag. Since we provide one for twitter, shouldn't we also specify one for og? (og:image).

@humphd
Copy link
Contributor

humphd commented Jan 29, 2021

Yes, can you file a follow up for the image/alt issues?

@birtony
Copy link
Contributor

birtony commented Jan 29, 2021

Yes, can you file a follow up for the image/alt issues?

This image seem to fall under 'Decorative' category, and according to WCAG, alt should be alt="". If we were talking about the logo imagine on the actual website page, which was also a link, then it would be functional, for example. But for social sharing links, not so much, I think.

src/frontend/next/src/components/SEO.tsx Outdated Show resolved Hide resolved
src/frontend/next/src/pages/_document.tsx Show resolved Hide resolved
@birtony
Copy link
Contributor

birtony commented Jan 29, 2021

We actually looked into the twitter:image:alt thing during our meeting and figured that image is actually clickable (a link), so it would need the alternate. It should not block this pr from merging!

@tonyvugithub
Copy link
Contributor Author

@birtony : Does it mean I can go ahead with it?

@birtony
Copy link
Contributor

birtony commented Jan 30, 2021

@birtony : Does it mean I can go ahead with it?

Sure, your pr looks good to me. Just waiting for you to address the changes reuqested by @humphd and I'll approve it then

Copy link
Contributor

@birtony birtony left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@HyperTHD HyperTHD left a comment

Choose a reason for hiding this comment

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

Gonna second that

@tonyvugithub tonyvugithub merged commit 2f7960a into Seneca-CDOT:master Jan 30, 2021
@tonyvugithub tonyvugithub deleted the next-issue1508 branch January 30, 2021 00:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: nextjs Nextjs related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Port SEO from Gatsby to Nextjs
7 participants