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

saber-plugin-query-posts: Pagination 'next' and 'prev' links seems to be incorrect #559

Open
aerrata opened this issue Nov 8, 2019 · 5 comments
Labels
bug Something isn't working

Comments

@aerrata
Copy link

aerrata commented Nov 8, 2019

Bug report

Steps to reproduce

Fresh install Saber, install and followed saber-plugin-query-posts readme to make a blog post with pagination.

What is expected?

On the first paginated page, hasNext should be true, hasPrev should be false, same for nextLink and prevLink

Screenshot from 2019-11-08 14-24-58

What is actually happening?

hasNext and hasPrev seems to be reversed

Screenshot from 2019-11-08 14-36-15
First page

Screenshot from 2019-11-08 14-36-39
Second page

Other relevant information

  • Result of running saber -v: latest
  • Browser version (optional): Chromium version 78.0.3904.87 (Official Build) Arch Linux (64-bit)
  • Is Saber a global or local install? Local
  • Which package manager did you use for the install? NPM
  • Does this issue occur when all plugins are disabled? No

Awesome Saber! ⚡

@issue-label-bot issue-label-bot bot added the bug Something isn't working label Nov 8, 2019
@issue-label-bot
Copy link

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.86. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@aerrata aerrata changed the title saber-plugin-query-posts: Pagination 'next' and 'prev' links seems incorrect saber-plugin-query-posts: Pagination 'next' and 'prev' links seems to be incorrect Nov 8, 2019
@andreasvirkus
Copy link
Contributor

I think it's showing the latest posts first, therefore hasPrev would mean has previous posts? As you can see, The order of the posts is

My Example Post 4
My Example Post 3
My Example Post 2

Therefore it's a question of semantics and not really a bug. You could rename the Prev Page link to read Older posts instead, and the behaviour would be correct, right?

@egoist
Copy link
Collaborator

egoist commented Nov 8, 2019

Maybe we should reverse that, it seems everyone else is using next for older stuff 😅

@aerrata
Copy link
Author

aerrata commented Nov 8, 2019

@andreasvirkus Okay that make sense, yes you're right, I am using that for workaround now. Thanks!

@andreasvirkus
Copy link
Contributor

@egoist would you want to switch the wording? Should we keep this backwards compatible? Or is it a suitable breaking change for v1?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants