-
Notifications
You must be signed in to change notification settings - Fork 0
Add next/previous navigation #31
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
Conversation
|
This is working for me locally, but is failing tests - I'm at a loss as to why it is failing https://github.com/localgovdrupal/localgov_blogs/actions/runs/8401705613/job/23010407547?pr=31 |
|
@andybroomfield to take a look. Feelings at merge Tuesday is that this should be optional so sites can opt in. There isn't explicit ordering for blogs so the assumption is this will be ordered by date, but this isn't guaranteed. |
They are initially ordered by creation date - however this can be manipulated on the channel node: |
|
I've managed to do a quick test and get it working. However I'm actully not sure this is the right approach here, trying to use the same method as guides which is a hierarchical content type with explicit ordering, and blog posts that are primarlly in date order, with some being pulled out to be featured. This is making the feature a little complicated to implement as I see that we are tracking new blog posts that are being added just so they can be re-ordered. However sometimes blog posts can be added with different published dates so this would result with them being out of order so having to be reorded each time (On our news pages, often our comms team will have several draft stories being worked on, and they will adjust the date before publishing). Instead, I belive the better approach is to lean into this being date based content, and make the next / previous links behave as a way of moving to the next / previous blog post based on the date, using the same method as wordpress. I feel this would also be closer to how blog authors would expect it and would like to hear from them on their user needs.
If there is a need to re-order a post, the current established pattern in news where we change the post date. Maybe its worth looking at Nextpre module module? Things to consider
|
|
Discussing with @ekes and @andybroomfield at Merge Tuesday:
@AWearring what do you think? Is this something you want to re-work or do you want someone else to dive in a give it a go? |
|
@finnlewis I'll have a crack at it (time allowing), if I get stuck I will happily pass on to someone else to have a go at it |
|
This is ready for review again @AWearring and @ekes. I've also tried to account for blog posts being on the same day. The issue here is that there is insufficent granularity for the If we would rarther skip this and try to change |
|
Bumping as this could do with a review and a release to also cover #37 |
|
I've retested this today and it all seems OK to me - not sure what the failing tests are |
millnut
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @AWearring could you merge the latest changes from 1.x into your branch to see if this resolves the workflow failures
@millnut Looks like it was already merged |
millnut
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @AWearring just added some comments around the linting failures
|
@millnut All tests now pass |
|
@millnut @andybroomfield @ekes @finnlewis |
|
This LGTM. What where the blockers? |
Changes actioned dismissing pending request
|
I've dismissed my changes request, they have been actioned not sure why github thinks they have not |
|
@AWearring I'm just kicking off another workflow run as a couple of other projects had pagination test failures recently, hopefully this one will be fine |
@andybroomfield there were two change requests that were still open |
Tests all good for the re-run 👍 |

Added next/previous navigation based upon localgov_guides