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 pages array to worldwide organisations #2637

Merged
merged 4 commits into from
Feb 20, 2024

Conversation

jkempster34
Copy link
Contributor

@jkempster34 jkempster34 commented Feb 14, 2024

https://trello.com/c/npYpoK31

Add optional summary property to parts

As part of a larger piece of work to make worldwide organisations editionable,
we want to implement a type of "multi-part" content for worldwide organisation
corporate information pages.

These pages require a summary in addition to the properties already defined.

Add pages array to worldwide organisations

As part of a larger piece of work to make worldwide organisations editionable,
we want to implement a type of "multi-part" content for worldwide organisation
corporate information pages.

This means that corporate information pages associated with worldwide
organisations will no longer have their own content items, they will instead be
part of the worldwide organisation itself.

This benefits us as we will not have to keep the state of worldwide
organisations and corporate information pages in sync, allowing us to simplify
worldwide organisations in Whitehall.

As part of our migration plan from worldwide organisations to editionable
worldwide organisations, we intend to compare content items to ensure parity.
Therefore, this updates the worldwide organisation to add the required pages
array.

Add path attribute to ordered corporate information pages

Some corporate information pages are shown as a list.

Currently, we link to these by retrieving the path from the corporate
information page links.

Now that we are removing links, we need another way to associate the ordered
corporate information pages with each page.

Update worldwide organisation example

These examples are used for testing in Government Frontend.

This:

  • Adds page_parts array to enable multi-part content for worldwide
    organisation pages.
  • Removes personal information charter from
    ordered_corporate_information_pages as this is a secondary corporate
    information page

⚠️ This repo is Continuously Deployed: make sure you follow the guidance ⚠️

This application is owned by the publishing platform team. Please let us know in #govuk-publishing-platform when you raise any PRs.

Follow these steps if you are doing a Rails upgrade.

@jkempster34 jkempster34 force-pushed the add-pages-to-worldwide-organisations branch from 3755319 to 82b560d Compare February 14, 2024 13:53
brucebolt
brucebolt previously approved these changes Feb 14, 2024
As part of a larger piece of work to make worldwide organisations editionable,
we want to implement a type of "multi-part" content for worldwide organisation
corporate information pages.

These pages require a summary in addition to the properties already defined.
As part of a larger piece of work to make worldwide organisations editionable,
we want to implement a type of "multi-part" content for worldwide organisation
corporate information pages.

This means that corporate information pages associated with worldwide
organisations will no longer have their own content items, they will instead be
part of the worldwide organisation itself.

This benefits us as we will not have to keep the state of worldwide
organisations and corporate information pages in sync, allowing us to simplify
worldwide organisations in Whitehall.

As part of our migration plan from worldwide organisations to editionable
worldwide organisations, we intend to compare content items to ensure parity.
Therefore, this updates the worldwide organisation to add the required pages
array.
@jkempster34 jkempster34 force-pushed the add-pages-to-worldwide-organisations branch from 82b560d to ad62c11 Compare February 19, 2024 15:17
Some corporate information pages are shown as a list.

Currently, we link to these by retrieving the path from the corporate
information page links.

Now that we are removing links, we need another way to associate the ordered
corporate information pages with each page.
@jkempster34 jkempster34 force-pushed the add-pages-to-worldwide-organisations branch from ad62c11 to 373428e Compare February 20, 2024 10:50
These examples are used for testing in Government Frontend.

This:
- Adds `page_parts` array to enable multi-part content for worldwide
  organisation pages.
- Removes personal information charter from
  `ordered_corporate_information_pages` as this is a secondary corporate
  information page
@jkempster34 jkempster34 force-pushed the add-pages-to-worldwide-organisations branch from 373428e to 5eca0bc Compare February 20, 2024 10:51
@jkempster34 jkempster34 dismissed brucebolt’s stale review February 20, 2024 10:57

Made changes since

jkempster34 added a commit to alphagov/government-frontend that referenced this pull request Feb 20, 2024
Currently, the worldwide organisation example JSON is incorrect; it contains:
- The link to "Personal information charter" as a corporate information page
  with a full URL
- A secondary corporate information page with a relative URL.

The former shouldn't be present, and this test relies on it's existence.

This updates the test so that the corporate information page link can be
removed in alphagov/publishing-api#2637
Copy link
Contributor

@JonathanHallam JonathanHallam left a comment

Choose a reason for hiding this comment

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

nice one, thanks

@jkempster34 jkempster34 merged commit 45d8996 into main Feb 20, 2024
43 checks passed
@jkempster34 jkempster34 deleted the add-pages-to-worldwide-organisations branch February 20, 2024 13:38
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.

3 participants