bolt
bolt copied to clipboard
[DO NOT MERGE] Ds-602 Remove pattern template function
Jira
https://pegadigitalit.atlassian.net/browse/DS-602
Summary
Pattern_template function usage was rewritten in the Bolt repository.
Details
All the examples of the pattern_template
function (for example pattern: 'image' )used in the Bolt repository (components and pattern lab) are rewritten.
How to test
Pull the branch. Search for examples of pattern_template
usage, and confirm that there is no regression due to updating it.
Release notes
Pattern_template function is deprecated.
A list of where pattern_template()
function will be no longer in use in the future:
- buton-group (
@bolt-components-button-group/button-group.twig
) - button (
@bolt-components-button/button.twig
) - card (
@bolt-components-card-replacement/card-replacement.twig
) - card-w-teaser (
@bolt-components-card-w-teaser/card-w-teaser.twig
) - eyebrow (
@bolt-components-headline/eyebrow.twig
) - flag (
@bolt/flag.twig
) (this is an object) - headline (
@bolt-components-headline/headline.twig
) - image (
@bolt-components-image/image.twig
) - link (
@bolt-components-link/link.twig
) - teaser (
@bolt-components-teaser/teaser.twig
) - text (
@bolt-components-text/text.twig
)
pattern
prop (pattern: $name
) will no longer be used. Please use the bolt-components whenever you want to utilize card, headline, image, etc.
There is no need to use the pattern: image
when utilizing bolt-background
component.
@colbytcook @remydenton
These examples you mentioned above have been corrected. Yarn build
doesn't throw any errors on my side.
There were a lot of usage pattern: 'image'
that I missed last time. I rewrite a little bit the background-item
template to get rid of the item.pattern = 'image'
statement and the all usage in the docs. I'm not sure if it's done correctly. I created a test page to see if it still works /?p=tests-background-image
. It seems that for these two scenarios(passing image attributes as an object and pass the whole image as a variable) everything is fine. Let me know what do you think.
https://gitlab.com/pegadigital/bolt/design-system/-/merge_requests/3