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

[v2] The blog posts order is wrong #2698

Closed
jk-gan opened this issue Apr 30, 2020 · 7 comments · Fixed by #3029
Closed

[v2] The blog posts order is wrong #2698

jk-gan opened this issue Apr 30, 2020 · 7 comments · Fixed by #3029
Labels
bug An error in the Docusaurus core causing instability or issues with its execution difficulty: starter Issues that are starter difficulty level, e.g. minimal tweaking with a clear test plan. mlh Major League Hacking Fellowship

Comments

@jk-gan
Copy link

jk-gan commented Apr 30, 2020

🐛 Bug Report

In blog, there is a suggestion button for previous post and next post. However, the order is wrong. It will suggest the previous blog post in the "Next Post" button and vice versa.

Have you read the Contributing Guidelines on issues?

yes.

To Reproduce

  1. create a new docusaurus v2 project
  2. create few blog posts

or

  1. go to docusaurus v2 blog page. For example, this

Expected behavior

The newer post should be showed on the "Next post" button and vice versa.

Actual Behavior

The older post is showed on the "Next post" button and vice versa.

Your Environment

  • Docusaurus version used: v2.0.0-alpha.54
  • Environment name and version (e.g. Chrome 78.0.3904.108, Node.js 10.17.0): Firefox developer edition 76.0b7, Node v13.5.0
  • Operating system and version (desktop or mobile): macOS 10.15.4

Reproducible Demo

go to docusaurus v2 blog page. For example, this

@jk-gan jk-gan added bug An error in the Docusaurus core causing instability or issues with its execution status: needs triage This issue has not been triaged by maintainers labels Apr 30, 2020
@jk-gan jk-gan changed the title The blog order is wrong in v2 The blog posts order is wrong in v2 Apr 30, 2020
@jk-gan jk-gan changed the title The blog posts order is wrong in v2 [v2] The blog posts order is wrong Apr 30, 2020
@lex111
Copy link
Contributor

lex111 commented Apr 30, 2020

I think it was done on purpose. @yangshun isn't that right?

@yangshun
Copy link
Contributor

Yes it's on purpose. It depends on perspective. If you view the posts as a list of entries in reverse chronological order (newest first, on the left), then the next post is an older post. Seems like Gatsby does the reverse of us. IMO we should just do what makes the most sense and what most blogs do. If someone is interested in researching and coming up with a conclusion, we could change it.

@yangshun yangshun added status: needs more information There is not enough information to take action on the issue. and removed status: needs triage This issue has not been triaged by maintainers labels Apr 30, 2020
@lex111
Copy link
Contributor

lex111 commented May 17, 2020

I think we can close this issue due to a long lack of response from the author.

@lex111 lex111 closed this as completed May 17, 2020
@yangshun
Copy link
Contributor

We can leave it open in case someone else wants to research and recommend something.

@yangshun yangshun reopened this May 18, 2020
@yangshun yangshun added difficulty: starter Issues that are starter difficulty level, e.g. minimal tweaking with a clear test plan. mlh Major League Hacking Fellowship and removed status: needs more information There is not enough information to take action on the issue. labels Jun 5, 2020
@teikjun
Copy link
Contributor

teikjun commented Jul 7, 2020

Discussion: Should the next button lead to (A) an older post or (B) a newer post?

Which behavior makes more sense?

I think this depends on how the user interacts with the blog.

Scenario 1: User finishes reading the newest blog post and looks for another blog post

Let's scroll to the bottom of the newest post in Docusaurus and Gatsby as an example.

Having the right button lead to the next oldest post seems more intuitive. This is probably because we associate the right button with proceeding forward, and left button with proceeding backwards (like the front and back buttons in your browser). In this scenario, option A seems more sensible.

Scenario 2: User finishes a random blog post and looks for an older blog post

Again, we can scroll to the bottom of a random post in Docusaurus and Gatsby as example.

When the user tries to look for an older post, it is likely that the user will think that the "previous" button will lead to an older post. After all, "previous" implies that something is older. In this scenario, I think that option B is more sensible to avoid confusion.

Which behavior is more common?

I couldn't find any statistics on this, so I looked through blog sites at random. Here are some examples:

Sites using Option A

Sites using Option B

Option B seems to be more common than Option A.

Other options

  • Some blog sites preferred to use "Older"/"Newer" explicitly, e.g. Stripe.
  • Many blog sites recommend blog articles without bothering about the chronological ordering, e.g. Medium

Recommendation

I think both options are equally sensible, but Option B is more common compared to Option A.
So, I would recommend Option B, i.e. having the next button lead to a newer post instead of an older one.

Please let me know what you think! I'll make the changes to the blog (if needed).

@yangshun
Copy link
Contributor

yangshun commented Jul 7, 2020

Thanks for doing the research! Let's go with the more popular option together with the terminology change :)

@teikjun
Copy link
Contributor

teikjun commented Jul 7, 2020

Roger that, I'll make a PR soon! :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error in the Docusaurus core causing instability or issues with its execution difficulty: starter Issues that are starter difficulty level, e.g. minimal tweaking with a clear test plan. mlh Major League Hacking Fellowship
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants