Closed sukhbeersingh closed 4 years ago
All imports for my new PostNavigation.jsx
file are failing linting. So I looked into the import/no-resolved
lint error a bit. This has to do with the .eslintrc.js
file. May need to change some settings.
When Stickler CI runs ESLint it does not install any of your repository dependencies. Because of this, rules that operate on import checking or typechecking rules will likely not work.
The previous/next is the wrong way around however, let's switch it please. When clicking on previous you're actually directed to the next blog post and vice-versa.
It is actually because the blog data is being sorted descendingly in the graphql query. So if you have previous link, should it point to left (bringing the chronologically previous post)? And next pointing to right should bring chronologically next post? If you do this with the existing patter, one may get confused because even on the main blog post all blogs are listed in chronologically reverse order.
I would suggest keeping the next/prev point to next and previous of that list on blog page.
Rest, please let me know and I will make the changes.
Hey, sorry for the delay in getting back to you @sukhbeersingh, I needed the weekend off.
I tried to push a fix for the CI issue via #31. If you fetch the latest changes on master
into this branch the CI issues should be hopefully fixed.
If not: Make sure to run yarn run lint
(or npm run lint
) locally in the project root.
Good point with the descending order of the blog posts.
I would expect the previous
button to take me to the chronologically previous/earlier post and the next
button to take me to the chronologically later post.
Would you be able to change it this way?
Thanks again!!
Hi Flo, Sorry for not sending update to the patch. I will get to that soon.
@sukhbeersingh are you happy with my suggested changes? I don't have permission to accept them. Would love to get this merged soon.
@FWirtz made the said changes. The arrow icons are not aligned right now with the text. Maybe add it as a new issue, as I have already added the functionality needed in this PR. This CSS change would be more of an enhancement.
Thanks, @sukhbeersingh!
What changes were made?
Why were these changes made? Fix #6 to provide links to previous and next blogposts
Lint Test There is a current error for eslint in gatsby-node.js as this name conflicts with
path
variable deconstructed fromnode.frontmatter
. We should possibly change the former variable name.Visual
Suggestion We should possibly move the previous/next flex
div
into aconst function
of its own. Thoughts?This is a really exciting project. I really like the ideology and would like to contribute however possible.
Thanks