-
Notifications
You must be signed in to change notification settings - Fork 20
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
Landing pages backend scaffold #4247
Commits on Oct 2, 2024
-
Update ContentItem factory to handle different subclasses of ContentItem
Co-authored-by: Leena Gupte <leena.gupte@digital.cabinet-office.gov.uk>
Configuration menu - View commit details
-
Copy full SHA for c85c2ab - Browse repository at this point
Copy the full SHA c85c2abView commit details
Commits on Oct 7, 2024
-
Add landing_page controller, routes, and basic view
A new flexible content type called a landing page is being created. The content type will allow publishers to pick the "blocks" that should be included on the page, e.g. govspeak, tabs, image, video, and decide on the order of these "blocks". As a content schema doesn't exist for the landing_page type yet, a fake content item has been added to the controller. This will be removed in a later PR once a content schema exists. The additional content data path has been created as a constant to allow it to be overwritten with fixtures in the tests, otherwise we'd be testing with live content.
Configuration menu - View commit details
-
Copy full SHA for 440298e - Browse repository at this point
Copy the full SHA 440298eView commit details -
Add Dummy landing page content
This adds fake data for two content items. These will be replaced with real data in a later PR. Each of the types of "blocks" will be created in the following commits. Co-authored-by: Keith Lawrence <Keith.Lawrence@digital.cabinet-office.gov.uk>
Configuration menu - View commit details
-
Copy full SHA for cec72de - Browse repository at this point
Copy the full SHA cec72deView commit details -
It is likely that the different types of blocks will need their own models for their specific data requirements that builds on the base block. A "factory" is being used to determine which model to use in a similar way to that used to build the content item. However general ancestors are used to check that the block model is of the correct type rather than a direct ancestor as it will be necessary to have blocks within blocks to be able to handled different types of column blocks in later commits. Co-authored-by: Keith Lawrence <Keith.Lawrence@digital.cabinet-office.gov.uk>
Configuration menu - View commit details
-
Copy full SHA for a6aa3f2 - Browse repository at this point
Copy the full SHA a6aa3f2View commit details -
Configuration menu - View commit details
-
Copy full SHA for c52a6f6 - Browse repository at this point
Copy the full SHA c52a6f6View commit details -
This block doesn't not require any extra data so a new model does not need to be created for it. Co-authored-by: Keith Lawrence <Keith.Lawrence@digital.cabinet-office.gov.uk>
Configuration menu - View commit details
-
Copy full SHA for 0612ecb - Browse repository at this point
Copy the full SHA 0612ecbView commit details -
Add a tabs block and block helper
A block helper is being used rather than creating a tab model as all that is changing is how the block data is presented in the tab. Nothing new is being modelled. Co-authored-by: Keith Lawrence <Keith.Lawrence@digital.cabinet-office.gov.uk>
Configuration menu - View commit details
-
Copy full SHA for c6e5c16 - Browse repository at this point
Copy the full SHA c6e5c16View commit details -
This block doesn't not require any extra data so a new model does not need to be created for it. Co-authored-by: Keith Lawrence <Keith.Lawrence@digital.cabinet-office.gov.uk>
Configuration menu - View commit details
-
Copy full SHA for b2beefd - Browse repository at this point
Copy the full SHA b2beefdView commit details -
This will form the foundation for adding blocks containing columns Co-authored-by: Keith Lawrence <Keith.Lawrence@digital.cabinet-office.gov.uk>
Configuration menu - View commit details
-
Copy full SHA for b3ae923 - Browse repository at this point
Copy the full SHA b3ae923View commit details -
Add a block for equal size columns
Co-authored-by: Keith Lawrence <Keith.Lawrence@digital.cabinet-office.gov.uk>
Configuration menu - View commit details
-
Copy full SHA for 698a8ca - Browse repository at this point
Copy the full SHA 698a8caView commit details -
Add a block for uneven size columns
This block renders block content in the usual 2/3 and 1/3 proportions. It uses a theme to control classes on left and right side of blocks. Co-authored-by: Keith Lawrence <Keith.Lawrence@digital.cabinet-office.gov.uk>
Configuration menu - View commit details
-
Copy full SHA for 4eba8b5 - Browse repository at this point
Copy the full SHA 4eba8b5View commit details -
Fall back to fake data if no data in content item
Don't always override with fake data - try getting the content from the content store first, _then_ fallback to fake if not found.
Configuration menu - View commit details
-
Copy full SHA for bfa1089 - Browse repository at this point
Copy the full SHA bfa1089View commit details -
Show a blank page if there aren't any blocks
Allows a blank page with a warning if there isn't a YAML file or blocks specified in the content item
Configuration menu - View commit details
-
Copy full SHA for 28057b8 - Browse repository at this point
Copy the full SHA 28057b8View commit details -
Add routing constraint as backup
The routing constraint has been added below account routes otherwise it causes the account session tests to fail. I think this is due to how the account content items are stubbed. It seems as though it hits the first matching route irrespective of document_type.
Configuration menu - View commit details
-
Copy full SHA for 575dd7f - Browse repository at this point
Copy the full SHA 575dd7fView commit details -
Ignores the cache-control test for now as this setting comes from the content item. Had to convert the response from content store into a hash so that extra items from YAML files could be merged into it. Also copies the dummy landing page yaml into a fixture for testing
Configuration menu - View commit details
-
Copy full SHA for 735359a - Browse repository at this point
Copy the full SHA 735359aView commit details -
These tests don't do much as the actual rendering code hasn't been added yet, so it's difficult to know what should be on the page to check for.
Configuration menu - View commit details
-
Copy full SHA for 9b58e10 - Browse repository at this point
Copy the full SHA 9b58e10View commit details
Commits on Oct 8, 2024
-
Configuration menu - View commit details
-
Copy full SHA for f194508 - Browse repository at this point
Copy the full SHA f194508View commit details