govuk_publishing_components icon indicating copy to clipboard operation
govuk_publishing_components copied to clipboard

Add handling of for_static parameter

Open KludgeKML opened this issue 5 months ago • 0 comments

  • original behaviour was to always include wrapper class unless show_account_layout or custom_layout was present (custom layout is as of yet not used). Alter behaviour so that default is not to have the wrapper, and it's only included if for_static is true.

What

Why

layout_for_public does not behave like a standard layout - it's default is to include a wrapper element which is cut out by slimmer and replaced with the wrapper from the client app. If we try to use layout_for_public directly, this results in a double wrapper (or a single wrapper, but without the ability to add classes to it). Adding a parameter which maintains this behaviour (which can be added in Static: https://github.com/alphagov/static/pull/3440 ), but defaulting to not including the wrapper element allows other apps to use the layout component directly.

https://trello.com/c/COQYfYgn/347-allow-layoutforpublic-to-work-like-a-normal-layout

Visual Changes

None expected

KludgeKML avatar Sep 24 '24 13:09 KludgeKML