Skip to content

Commit 2277016

Browse files
author
Mercado Pago
committed
Release v7.8.0
1 parent ef3d1a4 commit 2277016

File tree

84 files changed

+7175
-3425
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+7175
-3425
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.DS_Store
2-
.phpunit.result.cache
2+
*.cache
33

44
clover.xml
55
coverage

.php-cs-fixer.php

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
3+
return (new PhpCsFixer\Config())
4+
->setRules(array_fill_keys([
5+
'nullable_type_declaration_for_default_null_value',
6+
], true))
7+
->setFinder(PhpCsFixer\Finder::create()->in(__DIR__));

CHANGELOG.md

+11
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [7.8.0] - 2024-09-23
9+
10+
### Changed
11+
- **Rebranded and revamped the CreditsGateway**, improving overall user experience and aligning the visual identity with our updated brand guidelines, making it more intuitive and modern.
12+
- **Compressed several images without losing quality**, which reduces the plugin bundle size and leads to faster download and installation times, improving performance without sacrificing visual fidelity.
13+
- **Removed implicit nullable parameter marking** and replaced it with explicit nullable types, enhancing code clarity and reducing potential bugs related to type handling, thus improving code reliability.
14+
15+
### Fixed
16+
- **Corrected the support component's link URL**, ensuring users are directed to the appropriate help resources without encountering broken or incorrect links, improving support accessibility.
17+
18+
819
## [7.7.0] - 2024-09-11
920

1021
### Added

Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
build:
44
./bin/create-release-zip.sh
55

6+
watch:
7+
npm run watch:release
8+
69
release:
710
./bin/setup-release.sh
8-
9-
sync:
10-
./bin/sync-sdk.sh $(tag)

assets/css/checkouts/mp-plugins-components.min.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/css/products/credits-modal.css

+20-1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,15 @@
6565
justify-content: center;
6666
}
6767

68+
.mp-credits-modal-brand-title {
69+
display: flex;
70+
justify-content: center;
71+
}
72+
73+
.mp-credits-modal-brand-title > span {
74+
width: 300px !important;
75+
}
76+
6877
.mp-credits-modal-step-circle {
6978
width: 26px;
7079
height: 26px;
@@ -97,7 +106,13 @@
97106
line-height: 18px;
98107
}
99108

109+
.mp-credits-modal-info {
110+
display: flex;
111+
justify-content: center;
112+
}
113+
100114
.mp-credits-modal-how-to-use {
115+
width: 85%;
101116
display: flex;
102117
flex-direction: column;
103118
padding-top: 24px;
@@ -112,7 +127,7 @@
112127

113128
.mp-credits-modal-container-content {
114129
display: flex;
115-
width: 480px;
130+
width: 450px;
116131
padding: 32px;
117132
flex-direction: column;
118133
align-items: flex-end;
@@ -251,6 +266,10 @@
251266
height: 122px !important;
252267
}
253268

269+
.mp-credits-modal-how-to-use {
270+
width: 75%;
271+
}
272+
254273
.mp-credits-modal-container-content {
255274
width: fit-content;
256275
}

assets/css/products/credits-modal.min.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading

assets/images/checkouts/pix/pix.png

-35.7 KB
Loading
-326 KB
Loading

assets/images/icons/icon-mp-nobg.png

1.33 KB
Loading

assets/images/settings/header.png

-241 KB
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const CheckoutBenefits = ({ title, items, titleAlign = 'left'}) => (
2+
<checkout-benefits-list title={title} title-align={titleAlign} items={items}/>
3+
);
4+
5+
export default CheckoutBenefits;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const CheckoutRedirectV3 = ({ title, description, src, alt }) => (
2+
<checkout-redirect-v3 title={title} description={description} src={src} alt={alt} />
3+
);
4+
5+
export default CheckoutRedirectV3;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
const RowImageSelect = ({text, imgSrc}) => {
2+
return (
3+
<div style={
4+
{
5+
height: "18px",
6+
display: "flex",
7+
justifyContent: "space-between",
8+
alignContent: "center",
9+
alignItems: "center",
10+
flexDirection: "row"
11+
}
12+
}>
13+
<img
14+
style={
15+
{
16+
marginRight: "8px",
17+
height: "25px",
18+
width: "30px",
19+
padding: 0
20+
}
21+
}
22+
src={imgSrc}
23+
/>
24+
<p style={
25+
{
26+
fontFamily: '"Proxima Nova", -apple-system, "Helvetica Neue", Helvetica, "Roboto", Arial, sans-serif',
27+
fontSize: "18px",
28+
padding: 0
29+
}
30+
}>{text}</p>
31+
</div>
32+
);
33+
}
34+
35+
export default RowImageSelect;

assets/js/blocks/credits.block.js

+22-18
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,17 @@ import { getSetting } from '@woocommerce/settings';
77
import { addDiscountAndCommission, removeDiscountAndCommission } from './helpers/cart-update.helper';
88

99
import TestMode from './components/TestMode';
10-
import ChoRedirectV2 from './components/ChoRedirectV2';
11-
import CheckoutBenefits from './components/CheckoutBenefits';
10+
import CheckoutRedirectV3 from './components/CheckoutRedirectV3';
11+
import CheckoutBenefitsList from './components/CheckoutBenefitsList';
1212
import TermsAndConditions from './components/TermsAndConditions';
13+
import RowImageSelect from './components/RowImageSelect';
1314
import sendMetric from "./helpers/metrics.helper";
1415

1516
const targetName = "mp_checkout_blocks";
1617
const paymentMethodName = 'woo-mercado-pago-credits';
1718

1819
const settings = getSetting(`woo-mercado-pago-credits_data`, {});
19-
const defaultLabel = decodeEntities(settings.title) || 'Checkout Creditss';
20+
const defaultLabel = decodeEntities(settings.title) || 'Checkout Credits';
2021

2122
const updateCart = (props) => {
2223
const { extensionCartUpdate } = wc.blocksCheckout;
@@ -62,13 +63,15 @@ const updateCart = (props) => {
6263

6364
};
6465

65-
const Label = (props) => {
66-
const { PaymentMethodLabel } = props.components;
67-
66+
const Label = () => {
6867
const feeTitle = decodeEntities(settings?.params?.fee_title || '');
6968
const text = `${defaultLabel} ${feeTitle}`;
7069

71-
return <PaymentMethodLabel text={text} />;
70+
return (
71+
<RowImageSelect
72+
text={text}
73+
imgSrc={settings.params.checkout_blocks_row_image_src}/>
74+
);
7275
};
7376

7477
const Content = (props) => {
@@ -81,8 +84,8 @@ const Content = (props) => {
8184
test_mode_link_src,
8285
checkout_benefits_title,
8386
checkout_benefits_items,
84-
checkout_benefits_tip,
85-
checkout_redirect_text,
87+
checkout_redirect_title,
88+
checkout_redirect_description,
8689
checkout_redirect_src,
8790
checkout_redirect_alt,
8891
terms_and_conditions_description,
@@ -99,8 +102,8 @@ const Content = (props) => {
99102

100103
return (
101104
<div className="mp-checkout-container">
102-
<div className="mp-checkout-pro-container">
103-
<div className="mp-checkout-pro-content">
105+
<div className="mp-checkout-credits-container">
106+
<div className="mp-checkout-credits-content">
104107
{test_mode ? (
105108
<TestMode
106109
title={test_mode_title}
@@ -111,19 +114,20 @@ const Content = (props) => {
111114
) : null}
112115

113116
<div class="mp-credits-checkout-benefits">
114-
<CheckoutBenefits
117+
<CheckoutBenefitsList
115118
title={checkout_benefits_title}
116119
items={checkout_benefits_items}
117-
titleAlign="center"
118-
listMode="image"
120+
titleAlign="left"
119121
/>
120122
</div>
121123

122-
<div class="mp-checkout-pro-tip">
123-
<p>{checkout_benefits_tip}</p>
124+
<div class="mp-checkout-credits-redirect">
125+
<CheckoutRedirectV3
126+
title={checkout_redirect_title}
127+
description={checkout_redirect_description}
128+
src={checkout_redirect_src}
129+
alt={checkout_redirect_alt} />
124130
</div>
125-
126-
<ChoRedirectV2 text={checkout_redirect_text} src={checkout_redirect_src} alt={checkout_redirect_alt} />
127131
</div>
128132
</div>
129133

assets/js/checkouts/mp-plugins-components.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/credits.block.asset.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php return array('dependencies' => array('react', 'wc-blocks-registry', 'wc-settings', 'wp-element', 'wp-html-entities'), 'version' => '5c9b681e20f4f7456c7e');
1+
<?php return array('dependencies' => array('react', 'wc-blocks-registry', 'wc-settings', 'wp-element', 'wp-html-entities'), 'version' => 'b12dad067a3c500c4037');

0 commit comments

Comments
 (0)