-
Notifications
You must be signed in to change notification settings - Fork 193
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
Use edition links for worldwide organisations #8734
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
94b7149
to
5068755
Compare
7913e3a
to
8adb462
Compare
081be05
to
5d7166c
Compare
5d7166c
to
2feb562
Compare
callumknights
approved these changes
Jan 24, 2024
We are working to make Worldwide Organisation editionable. Therefore we need to be able to link the links to editions, rather than documents, to prevent draft updates becoming live before publication. Depends on alphagov/publishing-api#2601.
We are now using edition links for editionable worldwide organisations. This makes the same change for non-editionable worldwide organisations. There will be no user impact as a result of this change, but it will allow us to compare the output of the two presenters to make sure they are identical when migrating data from the non-editionable worldwide organisation to be editionable. The existing links must be set as an empty array to clear them (as an nil value does not unset the existing values). Another PR will be raised to remove the non-edition links from the presenter once all worldwide organisations have been republished. Depends on alphagov/publishing-api#2601.
We are currently including all corporate information pages (including draft and withdrawn) in worldwide organisation content items. This is incorrect as we only want to include those that are actually published.
As edition links do not support multi-level or recursive link expansion, we need to explicitly include all the sub-links that we require to render this page. Whilst most of this code is the same as used in the Worldwide Organisation presenter, it has not been DRY-ed up as that will make it more difficult to delete the non-editionable version of the presenter when we've fully migrated Worldwide Organisations to be editionable.
As edition links do not support multi-level or recursive link expansion, we need to explicitly include all the sub-links that we require to render this page.
2feb562
to
35e5891
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We are working to make Worldwide Organisation editionable.
Therefore we need to be able to link the links to editions, rather than documents, to prevent draft updates becoming live before publication.
There are multiple steps to deploying the switch to edition links:
Depends on alphagov/publishing-api#2601.
Trello card