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

refactor: optimize image source concatenation for payment method icons #2508

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fix GH build action & added package version and short commit hash to artifact names in GitHub Actions workflow for improved traceability and uniqueness. ([#2494](https://github.com/bigcommerce/cornerstone/pull/2494))
- Bump stencil-utils to 6.18.0 ([#2493](https://github.com/bigcommerce/cornerstone/pull/2493))
- Bump other GH actions to fix warnings related to old versions. ([#2495](https://github.com/bigcommerce/cornerstone/pull/2495))
- Refactored complex `concat` logic to use `multiConcat` handlebar helper. ([2507](https://github.com/bigcommerce/cornerstone/pull/2507))

## 6.15.0 (10-18-2024)
- Cornerstone changes to support inc/ex tax price lists on PDP [#2486](https://github.com/bigcommerce/cornerstone/pull/2486)
Expand Down
2 changes: 1 addition & 1 deletion templates/components/account/payment-methods-list.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ <h4 class="paymentMethodsTitle">
{{!-- If credit card STARTS --}}
{{#if brand}}
{{#inArray ../../theme_settings.supported_card_type_icons brand }}
<img class="methodHeader-icon" src="{{cdn (concat (concat 'img/payment-methods/' brand) '.svg')}}" alt="{{lang (concat 'account.payment_methods.card_types.' brand)}}" title="{{lang (concat 'account.payment_methods.card_types.' brand)}}">
<img class="methodHeader-icon" src="{{cdn (multiConcat 'img/payment-methods/' brand '.svg')}}" alt="{{lang (concat 'account.payment_methods.card_types.' brand)}}" title="{{lang (concat 'account.payment_methods.card_types.' brand)}}">
{{/inArray}}
<span class="methodHeader-brand">{{lang (concat 'account.payment_methods.card_types.' brand)}} {{lang 'account.payment_methods.card_ending_in' last_four=last_4}}</span>
{{else}}
Expand Down
2 changes: 1 addition & 1 deletion templates/pages/account/add-payment-method.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ <h3 class="paymentMethodForm-heading">{{lang 'account.payment_methods.payment_me
{{forms.payment_method.provider_name}}
<span class="paymentMethodForm-cards">
{{#each ../theme_settings.supported_card_type_icons}}
<img class="paymentMethodForm-cards-icon" src="{{cdn (concat (concat 'img/payment-methods/' this) '.svg')}}" alt="{{lang (concat 'account.payment_methods.card_types.' this)}}" title="{{lang (concat 'account.payment_methods.card_types.' this)}}">
<img class="paymentMethodForm-cards-icon" src="{{cdn (multiConcat 'img/payment-methods/' this '.svg')}}" alt="{{lang (concat 'account.payment_methods.card_types.' this)}}" title="{{lang (concat 'account.payment_methods.card_types.' this)}}">
{{/each}}
</span>
</p>
Expand Down