Skip to content
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

Merged
merged 6 commits into from
Nov 9, 2023

Conversation

helenb
Copy link
Member

@helenb helenb commented Nov 6, 2023

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

Screenshot 2023-11-07 at 11 43 01

Work

Screenshot 2023-11-07 at 11 42 50

MR Checklist

  • Add a description of your pull request and instructions for the reviewer to verify your work.
  • If your pull request is for a specific ticket, link to it in the description.
  • Stay on point and keep it small so the merge request can be easily reviewed.
  • Consider adding unit tests, especially for bug fixes. If you don't, tell us why.
  • Tests and linting passes.
  • Consider updating documentation. If you don't, tell us why.
  • If relevant, list the environments / browsers in which you tested your changes.

@helenb helenb changed the title Add our thinking and our work as extra optional sections on the proposition page Draft: Add our thinking and our work as extra optional sections on the proposition page Nov 6, 2023
@helenb helenb changed the title Draft: Add our thinking and our work as extra optional sections on the proposition page Add our thinking and our work as extra optional sections on the proposition page Nov 6, 2023
Copy link
Collaborator

@albinazs albinazs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All works great, just maybe check the horizontal alignment of the new blocks - similar to what we have currently on the Sub-proposition page

…sition-section div, and ensure the 'more' buttons align
@helenb
Copy link
Member Author

helenb commented Nov 8, 2023

All works great, just maybe check the horizontal alignment of the new blocks - similar to what we have currently on the Sub-proposition page

I've improved those now and the 'more' buttons line up.

Copy link
Member

@engineervix engineervix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me @helenb , thanks!

@helenb helenb merged commit dc894c2 into main Nov 9, 2023
@helenb helenb deleted the feature/add_thinking_and_work_to_proposition_page branch November 9, 2023 12:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants