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

Present worldwide corporate information pages #7789

Merged
merged 3 commits into from
Jun 28, 2023
Merged

Present worldwide corporate information pages #7789

merged 3 commits into from
Jun 28, 2023

Conversation

jkempster34
Copy link
Contributor

@jkempster34 jkempster34 commented Jun 9, 2023

https://trello.com/c/ATDZQXqq

Add presenter for worldwide corporate information pages

We have decided to publish the Corporate Information Pages associated with
Worldwide Organisations as a separate content item
(alphagov/publishing-api#2399) for the following
reasons:

  • We require a link to the associated worldwide_organisation. Having a new
    content item means that we don't have to attach multiple optional links to the
    corporate information page content item.
  • We will need a new template for this page in government-frontend as the
    worldwide organisation corporate information pages are quite different when
    compared to the organisation corporate information pages. Because
    government_frontend maps content items to templates through their
    schema_name (except for a few exceptions), it would make sense to follow this
    pattern.
  • Many of the attributes of the corporate information page schema are not
    needed in order to render the worldwide organisation corporate informaiton
    pages.

This adds a presenter for the new content item. Any shared attributes are DRYed
up through a shared PayloadBuilder.

Publish worldwide corporate information pages via their own presenter

We have added a new WorldwideCorporateInformationPagePresenter.

Present the worldwide corporate information pages via this new presenter unless
they are "about us" pages.

"about us" worldwide corporate information pages are a special case. We want to
publish these as placeholder content items with a unique base path (see
#7844).

Republish Worldwide Organisation on Corporate Information Pages changes

Currently, Organisations are republished when a related Corporate Information
Pages changes, but Worldwide Organisations are not. Now that we publish
Worldwide Corporate Information Pages, we want to change this.

This is important because the Worldwide Organisation content item surfaces
information about related Corporate Information Pages on it's details rather
than it's links (though the links are present as well, they aren't used. This
is consistent with the Organisation content item).


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

Follow these steps if you are doing a Rails upgrade.

We have decided to publish the Corporate Information Pages associated with
Worldwide Organisations as a separate content item
(alphagov/publishing-api#2399) for the following
reasons:
- We require a link to the associated worldwide_organisation. Having a new
  content item means that we don't have to attach multiple optional links to the
  corporate information page content item.
- We will need a new template for this page in government-frontend as the
  worldwide organisation corporate information pages are quite different when
  compared to the organisation corporate information pages. Because
  government_frontend maps content items to templates through their
  schema_name (except for a few exceptions), it would make sense to follow this
  pattern.
- Many of the attributes of the corporate information page schema are not
  needed in order to render the worldwide organisation corporate informaiton
  pages.

This adds a presenter for the new content item. Any shared attributes are DRYed
up through a shared PayloadBuilder.
We have added a new WorldwideCorporateInformationPagePresenter.

Present the worldwide corporate information pages via this new presenter unless
they are "about us" pages.

"about us" worldwide corporate information pages are a special case. We want to
publish these as `placeholder` content items with a unique base path (see
#7844).
Currently, Organisations are republished when a related Corporate Information
Pages changes, but Worldwide Organisations are not. Now that we publish
Worldwide Corporate Information Pages, we want to change this.

This is important because the Worldwide Organisation content item surfaces
information about related Corporate Information Pages on it's `details` rather
than it's `links` (though the links are present as well, they aren't used. This
is consistent with the Organisation content item).
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.

🎉

@jkempster34 jkempster34 merged commit 7a5e7d5 into main Jun 28, 2023
8 checks passed
@jkempster34 jkempster34 deleted the ww-org-cips branch June 28, 2023 09:29
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.

2 participants