There were three issues occurring in our build that were sometimes causing errors or warnings. This is to fix those things.
Issues Resolved
partials/sidebar/index.js
Remember the Failed exporting HTML for URL gallery/area-hover-styles (/Users/brittanyfee nstra/repos/victory-docs/src/pages/gallery-item-template): Cannot read property 'filte r' of undefined error I mentioned in PR #658 (it's ok if not) - this is getting caused by filteredEdges coming back as undefined for the some URLs. By checking that filteredEdges exists before returning its categories the build issue resolves. I'm sure this is something that I refactored and accidentally removed - i was wondering why there were so many ternaries all over the sidenav, now I know why.
static-config-helpers/md-data-transforms
linter was whining about arrow functions not explicitly returning, no more whining.
static.config.js
Also back in PR #658 we decided to axe the generic 'guides' (victory-guides) page since it's redundant and you can't get to it unless you manually type it in or go straight from the home page link. What I did not know then and the ci pipeline did not catch is that you cannot simply delete the markdown and call it a day if that route still has children to attend to.
By updating the template of guides to the 404 it's no longer trying to get guide data that doesn't exist and it still allows the children to have the proper url path. the getData is updated to trueDocs so that the proper generic data on the 'docs' template is OK for the children (this is my loose understanding?) - I mostly have just come to the realization that this line is important for things to work and errors to not flash on the screen. Would love to learn more on this or be corrected.
To Test
pull and run code locally, see that everything still works
Overview
There were three issues occurring in our build that were sometimes causing errors or warnings. This is to fix those things.
Issues Resolved
partials/sidebar/index.js
Remember the Failed exporting HTML for URL gallery/area-hover-styles (/Users/brittanyfee nstra/repos/victory-docs/src/pages/gallery-item-template): Cannot read property 'filte r' of undefined error I mentioned in PR #658 (it's ok if not) - this is getting caused by filteredEdges coming back as undefined for the some URLs. By checking that filteredEdges exists before returning its categories the build issue resolves. I'm sure this is something that I refactored and accidentally removed - i was wondering why there were so many ternaries all over the sidenav, now I know why.
static-config-helpers/md-data-transforms
linter was whining about arrow functions not explicitly returning, no more whining.
static.config.js
Also back in PR #658 we decided to axe the generic 'guides' (victory-guides) page since it's redundant and you can't get to it unless you manually type it in or go straight from the home page link. What I did not know then and the ci pipeline did not catch is that you cannot simply delete the markdown and call it a day if that route still has children to attend to. By updating the template of guides to the 404 it's no longer trying to get guide data that doesn't exist and it still allows the children to have the proper url path. the getData is updated to trueDocs so that the proper generic data on the 'docs' template is OK for the children (this is my loose understanding?) - I mostly have just come to the realization that this line is important for things to work and errors to not flash on the screen. Would love to learn more on this or be corrected.
To Test