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

Add Information Page #21

Merged
merged 30 commits into from
Nov 19, 2024
Merged

Add Information Page #21

merged 30 commits into from
Nov 19, 2024

Conversation

sanjeevz3009
Copy link
Contributor

@sanjeevz3009 sanjeevz3009 commented Nov 7, 2024

What is the context of this PR?

JIRA Ticket: https://jira.ons.gov.uk/browse/CMS-179

Create an Information Page model in Wagtail CMS to allow content editors to manage structured information pages.

Changes and Additions

  • HTML template created for the information page.
  • Django Model created for Information Page

How to review

  • Spin up the project in your local machine
  • Run the linters, code formatters and run the tests locally to make sure it's passing

Create an information page

  • Go to localhost:8000
  • Navigate to the Wagtail admin site localhost:8000/admin
  • Within Wagtail Admin -> Pages -> Home -> Add Child Page
  • Then you should be able to fill in the content of the information page and publish.

Untitled design

Screenshot 2024-11-07 at 17 30 10 Screenshot 2024-11-07 at 17 30 20

Information Page Example

Screenshot 2024-11-07 at 18 31 48

Follow-up Actions

List any follow-up actions (if applicable), like needed documentation updates or additional testing.

Copy link
Contributor

@zerolab zerolab left a comment

Choose a reason for hiding this comment

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

Great start!

Added a few notes and suggestions as a first pass.

@sanjeevz3009 sanjeevz3009 marked this pull request as ready for review November 7, 2024 17:38
@sanjeevz3009 sanjeevz3009 requested a review from a team as a code owner November 7, 2024 17:38
Copy link
Contributor

@zerolab zerolab left a comment

Choose a reason for hiding this comment

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

LGTM.

Copy link
Contributor

@MebinAbraham MebinAbraham left a comment

Choose a reason for hiding this comment

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

Nice work both 👍

Copy link
Contributor

@zerolab zerolab left a comment

Choose a reason for hiding this comment

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

A couple of small changes needed (but lovely first feature 💪🏼 )

Copy link
Contributor

@MebinAbraham MebinAbraham left a comment

Choose a reason for hiding this comment

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

Nothing else that's not already been raised.

👍

nehakerung and others added 12 commits November 18, 2024 15:10
Addition of InformationPage class in models

Changes to InformationPage class models

Front end creation

Addition of template location and minor changes on information_page template for testing

Added cms.standard_pages to installed_apps

Updated apps.py for standard_pages to be similar to pre-existing apps

Modified InformationPage in models

Updated template for informationPage

Modified models for standard_pages

Modified front end

working branch
* Replace `pytest` with Django's built-in runner

* Drop whitenoise public directory

* Correctly collect coverage for parallel test runs

* Note why certain fixtures are created with each test
sanjeevz3009 and others added 15 commits November 18, 2024 15:10
…d to reflect the InformationPage model changes
* Add the Contact Details snippet
   https://jira.ons.gov.uk/browse/CMS-80
* Add a basic table block
* Add the release calendar app with models
* Programmatically create the release calendar index
* Add the basic templates
* Add a base form class for easier validation
* Add icons to the various panels
* Add validation logic
* Update templates
* Add tests
* Expand core tests
* Expand coverage configuration
  adds a few extra files to the ignore.
  and explicitly filters the RemovedInDjango60Warning

* Tidy up based on code review
  * Prevent release calendar page deletion through the UI
  * Move the changes to the release date below contact details
    e.g. https://www.ons.gov.uk/releases/disabilitypaygapsintheuk2014to2023
* Fail if under 90% test coverage
Moved parent_page code

Removed extra blank lines for lint.py
* Comment out the scheduler image

* Remove scheduler from Procfile
* Add skeleton models for Theme / Topic pages
* Add base analysis series and page models
* Use a custom icon for the contact detail snippet
* Update the StreamField block template to pass the block ID to its children
* Set parent/subpage types for the new page models
* Wire in the analysis page template
* Add series functionality (latest/previous releases)
* Add tests and fail if coverage under 90%
* Tidy up based on code review
  * Make the accredited / census blocks separate includes
  * Include changes to release dates when status is confirmed
  * Allow setting the release date when switching to confirmed
  * Only allow release date or text, not both
  * Prevent release calendar page deletion through the UI
  * Move the changes to the release date below contact details
    e.g. https://www.ons.gov.uk/releases/disabilitypaygapsintheuk2014to2023
  * Switch to using a StreamField for the release page related links
  * Disable the "too-few-public-methods" pylint check globally
  * Make the equation/ONS embed check reusable

Addition of equation partials

Deleted media files and made lint, format test pass

Repeated code remove, /media added to .gitignore, media file removed

Check tests pass

Custom sign commit
* Fix `KeyError 'changes_to_release_date'`
  Cannot quite reproduce in tests nor locally
* Fix typo in Analysis series help text
* Further tidy ups
@nehakerung nehakerung force-pushed the feature/information-page-CMS-179 branch from 034f54b to 5017772 Compare November 18, 2024 15:12
@nehakerung nehakerung merged commit 0fee2f4 into main Nov 19, 2024
7 checks passed
@nehakerung nehakerung deleted the feature/information-page-CMS-179 branch November 19, 2024 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants