This repository has been archived by the owner on Apr 24, 2024. It is now read-only.
Add our thinking and our work as extra optional sections on the proposition page #551
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.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Link to Ticket
Description of Changes Made
This is an alternative approach to #550
Instead of allowing the work and thinking to be added as sub-blocks within the existing section, they get added at the end of the page in their own streamfield blocks. This allows us to add them to the anchor nav as discrete sections, and avoids weird issues with the titles being nested. In order to keep the anchor nav sensible, multiple work and thinking blocks are not allowed.
To accommodate the styling of these blocks on the proposition page, we display the title as per the other anchor titles, and hide the title within the block template. The 'thinking' block now has a 'wide' option that removes the left and right padding (needed for the sub-proposition page) if present.
How to Test
On your local build, edit a proposition page and add a work block and a thinking block to test.
Note that when the page scrolls to each section, the title seems to be hidden - but that appears to be an existing issue on the live proposition page, so would be a separate item to look into.
Screenshots
Expand to see more
Thinking
Work
MR Checklist