hlxsites / vg-volvotrucks-us

Franklin site for https://www.volvotrucks.us/
https://www.volvotrucks.us/
Apache License 2.0
2 stars 5 forks source link

NFR: Refactoring Buttons for Helix 5 Upgrade #625

Closed mollyaljenkins closed 1 month ago

mollyaljenkins commented 2 months ago

Context/Description

Currently some buttons on the Volvo Trucks sites are hardcoded. Following the Helix 5 upgrade buttons will be effected because the upgrade will allow for configuration and behaviour of the buttons to be customized.

Blocks with hardcoded buttons will need to be updated. Button variations will need to be defined in a clear and standardized way.

Acceptance Criteria

Editor AC:

Out of scope

No response

Note

Some blocks can maintain hardcoded buttons (using tertiary button only)

Button Options

Button block collection from AEM: (https://www.aem.live/developer/block-collection/buttons)

Current hardcode buttons to be replaced https://docs.google.com/spreadsheets/d/13yqPktBPlojezO7enJjKG0n0rXxggl3SMutwEk_pe9o/edit?usp=sharing

Attachment / link to Figma

No response

amglebihan commented 1 month ago

I updated the decorateButtons function that is handling how classes are added to buttons, and removed the hardcoded code that was in the JS of some blocks to determine the buttons' classes in some cases. Content editors are now able to choose the button variant that they want to use when creating content:

When this ticket is merged, some content editing will be needed to give the buttons the correct styling.

cogniSyb commented 1 month ago

Kamino cloned this issue to hlxsites/vg-macktrucks-com