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

Remove unused layouts and govuk_template #2663

Merged
merged 2 commits into from
Jan 18, 2022
Merged

Conversation

alex-ju
Copy link
Contributor

@alex-ju alex-ju commented Nov 29, 2021

What

As all frontend applications are now using gem_layout or a variation of this, we can now remove unused layouts (core_layout and header_footer_only) and 'non-layout templates' (campaign and proposition_menu) and make the gem_layout default.

This also means we can remove all the assets that are only being used within these templates – and more importantly drop the dependency on govuk_template. However, a few assets from govuk_template (apple-touch-icon*) need to be ported.

I have also tested this change manually in integration by accessing a range of pages rendered by various frontend applications while keeping an eye on logs.

Why

To keep our codebase clean and prevent deprecated layouts from being used.

@govuk-ci govuk-ci temporarily deployed to govuk-static-remove-gov-fyhjsq November 29, 2021 22:11 Inactive
@alex-ju alex-ju marked this pull request as ready for review November 30, 2021 13:16
@govuk-ci govuk-ci temporarily deployed to govuk-static-remove-gov-fyhjsq November 30, 2021 13:23 Inactive
@alex-ju
Copy link
Contributor Author

alex-ju commented Nov 30, 2021

Rebased to resolve a doc conflict after #2662

@alex-ju alex-ju changed the title Remove govuk_template Remove unused layouts and govuk_template Jan 7, 2022
@@ -1,6 +1,6 @@
# Slimmer Templates

## `gem_layout`
## `gem_layout` (default)
Copy link
Contributor

Choose a reason for hiding this comment

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

🎉

Copy link
Contributor

@injms injms left a comment

Choose a reason for hiding this comment

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

Super work - thank you!

@alex-ju alex-ju merged commit 604ffad into main Jan 18, 2022
@alex-ju alex-ju deleted the remove-govuk-template branch January 18, 2022 16:02
kevindew added a commit that referenced this pull request Mar 24, 2022
This post-processor doesn't seem to work with Sprockets 4. On
investigation this was added for compatibility with govuk_template -
which was removed in Jan 2022 [1]. Therefore this code can be removed.

[1]: #2663
kevindew added a commit that referenced this pull request Mar 30, 2022
This code causes an error with Sprockets 4. Once I started looking into
it I realised it was no longer needed as it was added for css.erb files
that were a part of govuk_template [1].

Since January 2022 [2] we no longer use govuk_template and thus no
longer have css.erb files.

[1]: 7436c5e
[2]: #2663
hannako added a commit that referenced this pull request Jul 20, 2023
This asset was missed from #2663
Travel advice publisher requests the print.html layout from static, which
requires this asset[1]

[1] https://github.com/alphagov/static/blob/main/app/views/root/print.html.erb#L15
hannako added a commit that referenced this pull request Jul 20, 2023
This asset was missed from #2663
Asset imported from [1]
Travel advice publisher requests the print.html layout from static, which
requires this asset[2]

[1] https://github.com/alphagov/govuk_template/blob/master/source/assets/images/gov.uk_logotype_crown_invert.png
[2] https://github.com/alphagov/static/blob/main/app/views/root/print.html.erb#L15
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