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 support for worldwide offices embedded in worldwide organisations #3095

Merged
merged 2 commits into from
Feb 20, 2024

Conversation

brucebolt
Copy link
Member

@brucebolt brucebolt commented Feb 15, 2024

As part of the switch to Worldwide Organisation content items containing the content for their offices, we need to switch the rendering of the Worldwide Organisation and Worldwide Office pages to use these parts.

This makes that switch in a backward compatible way, so we can continue rendering office pages under the existing content items until the office routes are updated to point to the organisation's content item.

In a later PR, we will remove WorldwideOfficePresenter and it's associated view, once all the routes for offices have been switched.

Trello card

Depends on alphagov/publishing-api#2638, alphagov/whitehall#8844 and all Worldwide Organisations being republished.

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

Follow these steps if you are doing a Rails upgrade.

We are changing the content item for Worldwide Organisations and
Worldwide Offices to be a single piece of content, with all sub-pages
included in a single Worldwide Organisation content item.

Therefore switching the Worldwide Organisation page to get the office
information from the `details`, rather than `links`.
@brucebolt brucebolt force-pushed the use-ww-office-multipart branch from d0134b7 to d8bb67c Compare February 15, 2024 14:39
@govuk-ci govuk-ci temporarily deployed to government-frontend-pr-3095 February 15, 2024 14:39 Inactive
@brucebolt brucebolt marked this pull request as ready for review February 15, 2024 14:40
@brucebolt brucebolt force-pushed the use-ww-office-multipart branch from d8bb67c to 6a61980 Compare February 15, 2024 14:48
@govuk-ci govuk-ci temporarily deployed to government-frontend-pr-3095 February 15, 2024 14:48 Inactive
Copy link
Contributor

@jkempster34 jkempster34 left a comment

Choose a reason for hiding this comment

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

How does this load the correct template? Don't you need to modify the content_item_template method?

@brucebolt brucebolt force-pushed the use-ww-office-multipart branch from 6a61980 to 7250a77 Compare February 15, 2024 16:48
@govuk-ci govuk-ci temporarily deployed to government-frontend-pr-3095 February 15, 2024 16:48 Inactive
@brucebolt
Copy link
Member Author

How does this load the correct template? Don't you need to modify the content_item_template method?

Looks like that got lost in a rebase 🤦‍♂️. Have added it back in.

As part of the switch to Worldwide Organisation content items containing
the content for their offices, we need to switch the rendering of the
office pages to use these parts.

This makes that switch in a backward compatible way, so we can continue
rendering office pages under the existing content items until the office
routes are updated to point to the organisation's content item.

In a later PR, we will remove `WorldwideOfficePresenter` and it's
associated view.
@brucebolt brucebolt force-pushed the use-ww-office-multipart branch from 7250a77 to 0c88e11 Compare February 19, 2024 11:23
@govuk-ci govuk-ci temporarily deployed to government-frontend-pr-3095 February 19, 2024 11:23 Inactive
Copy link
Contributor

@jkempster34 jkempster34 left a comment

Choose a reason for hiding this comment

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

All good from me! ✅

Copy link
Contributor

@hannako hannako left a comment

Choose a reason for hiding this comment

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

Thanks Bruce

@brucebolt brucebolt merged commit dd69bf5 into main Feb 20, 2024
12 checks passed
@brucebolt brucebolt deleted the use-ww-office-multipart branch February 20, 2024 14:14
brucebolt added a commit that referenced this pull request Feb 21, 2024
In #3095, we
introduced code that supports Worldwide Offices being included in the
Worldwide Organisation content item, whilst also supporting standalone
Worldwide Office content items.

We have now removed all the Worldwide Office content items and the code
that renders them, so can remove the rendering code from this
application.
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.

4 participants