Add pagination to travel advice #357
Merged
Conversation
* Shim summary into parts array as first part * Summary doesn’t have a slug, the first part of a guide _does_, however that content is a duplication of what’s shown on the base_path * For the first part: link to the base path
Rather than manipulating the part path when generating navigation links, decorate the parts upstream. This will allow previous/next nav to follow the same rules (eg link to base_path for first part) Can’t place directly on `parts` because of the way travel advice overrides the parts method.
* Pull shared logic from guides into parts module * Use decorated parts so that links to the first part point at base path rather than the part slug. Update guide presenter test to reflect this.
* Try to avoid concept of parts and decorated_parts * Add raw_parts method which gets decorated by parts method, by splitting the two it allows raw_parts to be overwritten by formats like travel advice – to coerce summary into a part.
LGTM |
I built a local branch the navigations look fine by me |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Screenshots