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: [FR 4X] Update wrapping logic for inline and none logo types (DTCRCMERC-2667) #1011

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
49 changes: 42 additions & 7 deletions src/server/locale/FR/mutations/gpl.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ export default {
styles: [
textWrap(textSize * 43, textSize, 'FR'),
messageLogoWidth(false, textSize * 4, textSize * 1.25),
setLogoTop(textSize * 20)
setLogoTop(textSize * 20),
`@media screen and (min-width: ${textSize * 11.5}px) {
.message__messaging span.br {
white-space: normal;
}
}`
],
logo: Logo.PP_PAYPAL.COLOR,
headline: [
Expand All @@ -25,7 +30,16 @@ export default {
[
'logo.type:primary && logo.position:right',
({ textSize }) => ({
styles: [setLogoTop(textSize * 40), messageLogoWidth(textSize * 6, textSize * 4, textSize * 1.25)],
styles: [
textWrap(textSize * 43, textSize, 'FR'),
setLogoTop(textSize * 40),
messageLogoWidth(textSize * 6, textSize * 4, textSize * 1.25),
`@media screen and (min-width: ${textSize * 11.5}px) {
.message__messaging span.br {
white-space: normal;
}
}`
],
headline: [
{
tag: 'default',
Expand All @@ -37,7 +51,15 @@ export default {
[
'logo.type:primary && logo.position:top',
({ textSize }) => ({
styles: [messageLogoWidth(textSize * 6, textSize * 4, textSize * 1.25)],
styles: [
// textWrap(textSize * 43, textSize, 'FR'),
messageLogoWidth(textSize * 6, textSize * 4, textSize * 1.25),
`@media screen and (min-width: ${textSize * 11.5}px) {
.message__messaging span.br {
white-space: normal;
}
}`
],
headline: [
{
tag: 'default',
Expand All @@ -50,11 +72,17 @@ export default {
'logo.type:alternative',
({ textSize }) => ({
styles: [
textWrap(textSize * 34, textSize, 'FR'),
textWrap(textSize * 39, textSize, 'FR'),
altNoWrap(textSize * 10.6),
messageLogoWidth(textSize * 1.75, textSize * 4, textSize * 1.25)
],
logo: Logo.PP_PAYPAL.COLOR[0]
logo: Logo.PP_PAYPAL.COLOR[0],
headline: [
{
tag: 'default',
br: ['€']
}
]
})
],
[
Expand All @@ -71,7 +99,7 @@ export default {
headline: [
{
tag: 'default',
br: ['frais', 'achats'],
br: ['frais', 'achats', '€'],
replace: [
['€.', '€'],
['éligibles.', 'éligibles']
Expand All @@ -83,7 +111,14 @@ export default {
[
'logo.type:inline',
({ textSize }) => ({
styles: [`.message__logo { width: ${textSize * 4}px }`],
styles: [
`.message__logo { width: ${textSize * 4}px }`,
`@media screen and (min-width: ${textSize * 11.5}px) {
.message__messaging span.br {
white-space: normal;
}
}`
],
logo: Logo.NO_PP_MONOGRAM.COLOR,
headline: [
{
Expand Down
34 changes: 29 additions & 5 deletions src/server/locale/FR/mutations/gplq.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,24 @@ export default {
[
'logo.type:primary && logo.position:right',
({ textSize }) => ({
styles: [setLogoTop(textSize * 24), messageLogoWidth(textSize * 6, textSize * 4, textSize * 1.25)]
styles: [
textWrap(textSize * 31, textSize, 'FR'),
setLogoTop(textSize * 24),
messageLogoWidth(textSize * 6, textSize * 4, textSize * 1.25)
]
})
],
[
'logo.type:primary && logo.position:top',
({ textSize }) => ({
styles: [messageLogoWidth(textSize * 6, textSize * 4, textSize * 1.25)]
styles: [
messageLogoWidth(textSize * 6, textSize * 4, textSize * 1.25),
`@media screen and (min-width: ${textSize * 11.5}px) {
.message__messaging span.br {
white-space: normal;
}
}`
]
})
],
[
Expand All @@ -50,8 +61,14 @@ export default {
],
[
'logo.type:none',
() => ({
styles: [],
({ textSize }) => ({
styles: [
`@media screen and (min-width: ${textSize * 11.5}px) {
.message__messaging span.br {
white-space: normal;
}
}`
],
logo: false,
headline: [
{
Expand All @@ -65,7 +82,14 @@ export default {
[
'logo.type:inline',
({ textSize }) => ({
styles: [`.message__logo { width: ${textSize * 4}px }`],
styles: [
`.message__logo { width: ${textSize * 4}px }`,
`@media screen and (min-width: ${textSize * 11.5}px) {
.message__messaging span.br {
white-space: normal;
}
}`
],
logo: Logo.NO_PP_MONOGRAM.COLOR,
headline: [
{
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.