-
Notifications
You must be signed in to change notification settings - Fork 9
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 layouts that use the gem layout component #2411
Conversation
39cbfd0
to
1d94589
Compare
8e9f8bc
to
75f1af7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚢
@@ -48,7 +50,7 @@ Restarting the app should pick up the changes. | |||
For example, to see changes made to static templates which | |||
are wrapped around feedback pages, run `bowl feedback |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not-related to this change, but I'm not sure bowl is still a thing 😬
Uses the public layout component[1] to add a constrained width and a full width layout template. Dependent on Slimmer having compatibility added [2]. [1]: https://components.publishing.service.gov.uk/component-guide/layout_for_public [2]: alphagov/slimmer#265
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The above 🚢 was meant to be an approved review
What
Adds
gem_layout
andgem_layout_full_width
as optional templates that can be requested by Slimmer. The plan is to swap the use ofcore_layout
forgem_layout
in each frontend app - and that both templates will be running side by side until this is complete.Don't use this layout until the frontend app you're using has Slimmer v15.5.0 or later.
This can be viewed when running static locally at http://static.dev.gov.uk/templates/gem_layout.html.erb
Why
The current
core_layout
usesgovuk_template
, which is deprecated.govuk_template
relies ongovuk_frontend_toolkit
for styles, which is also deprecated.The
gem_layout
template uses the public layout component from the GOV.UK Publishing Components gem, which is maintained and regularly updated. The gem relies on the GOV.UK Design System, which is maintained and regularly updated.Core layout contains styles that can interfere with components, for which hacks have to be written; for example focus link overrides and specific overrides in the cookie banner. These can be removed when the
core_layout
template stops being used.Removing the use of
govuk_template
will mean that the compatibility mode ($govuk-compatibility-govuktemplate
) can be turned off.Because the
gem_layout
template only uses components which follow the component principles and component conventions there are no side effects - the styles and JavaScript won't affect anything outside of the components used in the template itself.Appearance
Note - both the menu and the search appear at the same time. Inside each app Slimmer takes care of showing and hiding those parts of the header, so only one or none of those will appear.
On desktop / large screens:
and with emergency banner:
On mobile / smaller screens:
and with emergency banner: