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

Plugin Library build fixes #3906

Merged
merged 284 commits into from
Mar 6, 2018
Merged

Plugin Library build fixes #3906

merged 284 commits into from
Mar 6, 2018

Conversation

gillkyle
Copy link
Contributor

@gillkyle gillkyle commented Feb 8, 2018

This is a continuation of #3456

A new dependency release and a few files (www/gatsby_node.js and yarn.lock) caused issues with the Travis CI build. I forked the most recent branch from jastack and resolved those issues and removed the package-lock.json file.

There are still some things from the original thread (#3456 <-- that PR # is conveniently easy to type) that need to be resolved like some UI issues - mobile support, etc. - that I thought could be included later or summed up here and then worked on. I could also make a project board with all the remaining notes that need to be addressed if that would be helpful.

If there are other changes I should add before this moves forward I'd be happy to keep working on them!

danoc and others added 30 commits January 24, 2018 13:45
* page path defaults to '/'

* Add test
* Check for graymatter excerpt

Checks to see if there is a gray-matter excerpt before returning a
pruned character count

* Fix test

Remove a variable that wasn't being used

* Create page to describe excerpts

* Update using-remark example

* Remove package-lock.json

* Remove console.log statements

* Update copy

Updates copy to be a bit more descriptive

* Update header for example page

* Begin stubbing out extend-node.js tests

Created a basic framework for creating a markdown node via the
onCreateNode function. This should be expanded to factor in the changes
that occur in the setFieldsOnGraphQLNodeType function.

* Add query test

Adds a test that uses graphql to query a node with its excerpt

* Regroup tests

Regroups tests so that graphql queries and node tests are in their own
groups

* Fix linting errors

Fixes linting errors that were causing issues on travisCI

* Format
* Upgrade style-loader to 0.19.0 to fix webpack-contrib/style-loader#182

* Update to last version
 - gatsby-link@1.6.34
 - gatsby-source-faker@1.0.0
 - gatsby-transformer-remark@1.7.27
 - gatsby@1.9.151
* Updated links for Glamor and Styled Components

* Update index.md
* Don't generate pages for test files

* Use parsedPath.base instead of path
 - gatsby-plugin-netlify@1.0.13
 - gatsby-transformer-remark@1.7.28
 - gatsby@1.9.152
This reverts commit 834dcb8.

A number of people were reporting that this broke the default starter in
node 8 e.g. https://twitter.com/Lehanism/status/951397594953076737
 - gatsby@1.9.153
* Fix Links Redirection

* Fix Glamor Link Redirection
* Cleanup Glamor / Styled Component mini-tutorials

* Tweaks
* Update Deploy Gatsby page - Gitlab Pages

Have made a few edits, mainly to include the Path Prefix plugin, which is needed when using Gitlab pages without a custom domain. This has basically been shamelessly copied from the Github pages example...
Also did a bit of formatting.

* fix typo
* correct key behavior

* remove trailing slash logic

* remove adding new variable
 - gatsby-plugin-create-client-paths@1.0.2
 - gatsby-react-router-scroll@1.0.8
 - gatsby@1.9.154
Add Strata starter to the list.
 - gatsby-source-wordpress@2.0.43
* update styled-jsx dep in gatsby-plugin-styled-jsx

* move styled-jsx to peerDependencies in gatsby-plugin-styled-jsx
@gillkyle
Copy link
Contributor Author

gillkyle commented Feb 28, 2018

@calcsam I added two missing dependencies but looks like building the static html is still failing. Looks like not all the data some of the packages needs is making it's way down after querying, trying to make that a little safer.

This error: Error: Could not find function loadNodeContent for plugin gatsby-source-npm-pa ckage-search is one I don't see locally so I'm not sure what issue is causing it. Looking into both...

hitsPerPage: 1000,
})

// TODO: Currently the gatsby-transformer-remark plugin
Copy link
Contributor

Choose a reason for hiding this comment

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

This needs fixed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@KyleAMathews I pulled this out and found the problem packages, in terms of fixing is something like a little regular expression that replaces the badges and images with empty strings in the readme's content (so the markdown can still function) good?

internal: {
type: `NPMPackageReadme`,
mediaType: `text/markdown`,
content: hit.readme,
Copy link
Contributor

Choose a reason for hiding this comment

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

To fix the loadNodeContent error — check that hit.readme is always defined as a string — so check if it's not defined and if it isn't, set it as any empty string.

@shannonbux shannonbux added this to Done in UX Project Feb 28, 2018
…nditional rendering of specific metadata not pulled by every package
@KyleAMathews
Copy link
Contributor

It's alive!!! https://deploy-preview-3906--gatsbyjs.netlify.com/packages/ :-D

@gillkyle
Copy link
Contributor Author

gillkyle commented Mar 2, 2018

A couple of those little badges look a little wonky after I took out the snippet that was skipping the readmes with images:

But they seem to work?..

@KyleAMathews
Copy link
Contributor

Yeah, we should be skipping any READMEs.

The badges seemed affected by our default underline CSS for links — we could override that for these pages.

@calcsam
Copy link
Contributor

calcsam commented Mar 2, 2018 via email

@shannonbux
Copy link
Contributor

shannonbux commented Mar 2, 2018 via email

@calcsam
Copy link
Contributor

calcsam commented Mar 3, 2018

It doesn't seem to load all the examples? Eg https://deploy-preview-3906--gatsbyjs.netlify.com/packages?=source doesn't show 51 results, it shows only 20 or so. Should we be adding pagination?

@gillkyle
Copy link
Contributor Author

gillkyle commented Mar 4, 2018

@calcsam yeah I had noticed that. I switched out the widget we were using for one that allows infinite scroll via a load more button (so it's basically paginated for every 20 results now). However, changing that added some issues to how the selected item in the search list works that I'm trying to sort out, fixing one thing just adds another issue 😅

@calcsam
Copy link
Contributor

calcsam commented Mar 5, 2018 via email

@gillkyle
Copy link
Contributor Author

gillkyle commented Mar 6, 2018

@calcsam @KyleAMathews I fixed the highlighting issue, I refactored how the pages for each package were created too because a few pages (I think it was 4) were getting skipped over and instead added in some default not found data.

I think it's about there! 🤞

@calcsam
Copy link
Contributor

calcsam commented Mar 6, 2018

Cool! Merging.

@calcsam calcsam merged commit 652e677 into gatsbyjs:master Mar 6, 2018
UX Project automation moved this from In progress to Done Mar 6, 2018
@ghost ghost removed the review label Mar 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
UX Project
  
Done
Development

Successfully merging this pull request may close these issues.

None yet