Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Conversation

@ahmadawais
Copy link
Member

@ahmadawais ahmadawais commented Feb 19, 2019

Hey, folks! 🙌

Would love to be involved in the project. First PR here, closed the #67 since I have refactored the app and included a better reusable SEO component.

This PR does a couple of related things:

  • Adds an SEO component
  • Adds SEO: OGG, Twitter, Facebook, and general metadata
  • Adds featured image metadata for future usage with social sites
  • Refactors entire Layout file with SEO component to keep things civil
  • Adds auto-generating canonical-urls for the sake of SEO with a plugin
  • Refactors Header (alt tag for this site will always be static === more performant)
  • Refactors the learn & 404 pages to include title, description, and author.

Tests ran

  • npm start — without errors
  • npm run build — without errors

Looking forward, peace! ✌️

CC: @MylesBorins kindly check this PR instead.

@ahmadawais ahmadawais mentioned this pull request Feb 19, 2019
3 tasks
@MylesBorins
Copy link
Contributor

/gcbrun

eventual staging example will be on https://storage.googleapis.com/staging.nodejs.dev/b3322e4/index.html

@ahmadawais
Copy link
Member Author

ahmadawais commented Feb 20, 2019

✅ Staging example site looks fine to me. Let me know if there's anything to be done here.

Looking forward, peace! ✌️

Copy link
Contributor

@LaRuaNa LaRuaNa left a comment

Choose a reason for hiding this comment

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

All in all LGTM though wanna point out few things:

  • I see couple of hard coded strings in SEO component. IMO it doesn't make sense to have the same string couple of times hard coded. It's quite error-prone if we wanna change something. Maybe would be a better approach to create a 'metaConfig' file to store all these infos or move them into 'gatsby-config'.
  • Another thing I noticed is: we can actually save all the extra GraphQL requests we are doing right now in SEO component for every page. That ofc wouldn't have an impact on performance of the webpage but (if even it isn't probably noticeable) on build time. We can just import the 'metaConfig' in SEO component and request the variable infos like title in 'learn.ts' to pass them via props to SEO or at least request all the needed infos in 'learn.ts' and pass them via props to SEO so that we don't need to make a extra request. In short I'd like to keep SEO dumb :]
  • I see lots of semicolons are removed again we should fix ASAP the prettierconf :]

CMIIW :]

@ahmadawais
Copy link
Member Author

@LaRuaNa That's true. In my projects, I have a base config file which avoids all the repetition and extra GraphQL queries (which are negligible). I can do a second pass on this if that's the direction we want to go in.

@ahmadawais
Copy link
Member Author

@LaRuaNa I've just added a config file and changed all the instances of information inside the seo and gatsby-config file to use that config file instead of extra GraphQL queries.

Also, resolved several merge conflicts. This is a big PR. Can you kindly look into this and merge it timely, so we can avoid more conflicts. Here if you need any help or have any questions.

Looking forward, peace! ✌️

@LaRuaNa
Copy link
Contributor

LaRuaNa commented Feb 20, 2019

@ahmadawais nice, but fails to build can you check that please :]

@ahmadawais
Copy link
Member Author

ahmadawais commented Feb 20, 2019

@LaRuaNa Everything was fine at my end until I saw the yarn.lock file needed to be updated. And then an old test was failing so I rewrote the test since the header is now different. Also updated the snapshots ./node_modules/.bin/jest --updateSnapshot

All checks passed now. Please, check!

@ollelauribostrom
Copy link
Contributor

Looks good to me 👍

@ahmadawais
Copy link
Member Author

Fixed two new merge conflicts. 😭

@amiller-gh
Copy link
Member

Taking a look now @ahmadawais 🙂 Sorry for the delay!

Copy link
Member

@amiller-gh amiller-gh left a comment

Choose a reason for hiding this comment

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

Content looks good to me! However, let's make a choice on semicolons in the meeting next week and enforce it with prettier – this PR removes all of them from some files (ex: learn.tsx), but leaves them in others (ex: layout.tsx). My personal preference is to leave them in.

@amiller-gh amiller-gh merged commit 3d6d5ae into nodejs:master Feb 20, 2019
@ahmadawais
Copy link
Member Author

@amiller-gh I'm looking forward to the meeting next week would love to take responsibility for choosing formatting standards and apply that formatting everywhere.

Currently, my VSCode is set up to follow the present .prettierrc file which is why all the formatting changes.

My personal preference is the settings below but will discuss that in the next meeting:

{
	"semi": true,
	"singleQuote": true,
	"trailingComma": "es5",
	"useTabs": true,
	"bracketSpacing": true,
	"printWidth": 120,
	"tabWidth": 4
}

Thanks for merging the PR. Wohoo! 🎉

@LaRuaNa
Copy link
Contributor

LaRuaNa commented Feb 21, 2019

Fixed two new merge conflicts. 😭

@ahmadawais I'm really sorry for that mate. My bad :[ Thanks for working on this 🙏

@ahmadawais
Copy link
Member Author

@LaRuaNa no worries at all. ☝👍👌
Thank you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants