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

[www/starters] filter out invalid entries and set max number to show #8763

Merged
merged 4 commits into from
Oct 19, 2018

Conversation

amberleyromo
Copy link
Contributor

Closes #8757

@amberleyromo amberleyromo requested a review from a team as a code owner October 3, 2018 17:00
Copy link
Contributor

@DSchau DSchau 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! Left a few comments.=

www/src/views/starter-library/filtered-starters.js Outdated Show resolved Hide resolved
@amberleyromo
Copy link
Contributor Author

@pieh review?

  • panicOnBuild used appropriately?
  • Also checking for the github key using process.env.gatsby_executing_command === "build"

Copy link
Contributor

@pieh pieh left a comment

Choose a reason for hiding this comment

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

LGTM!

@chmac
Copy link
Contributor

chmac commented Oct 19, 2018

I wonder if aborting the entire build because an HTTP request failed is a good idea. Instinctively, I'd guess not, but I don't have enough context to put any weight behind my instincts! I guess if GitHub is down, or the request simply fails for some reason, the current logic of setting some default data makes sense. Why that logic sometimes fails, well that's a whole different story... :-)

let starters = data.allStartersYaml.edges
// stopgap for missing gh data (#8763)
let starters = data.allStartersYaml.edges.filter(({ node: starter }) => {
return starter.fields && starter.fields.starterShowcase
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems like an ingeniously hacky solution to me. ❤️ It's an ugly fix, but should solve the current issues we're seeing with the UI breaking because this field is sometimes missing.

@pieh pieh merged commit 3fb6d82 into gatsbyjs:master Oct 19, 2018
gpetrioli pushed a commit to gpetrioli/gatsby that referenced this pull request Jan 22, 2019
…atsbyjs#8763)

* [www/starters] filter out invalid entries and set max number to show

* [www/starters] move load more onclick method

* [www] panic on build if error fetching starter repo data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants