Commit 28c6a331 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch '239291-new-purchase-flow-does-not-support-dark-theme' into 'master'

Resolve "New purchase flow does not support dark theme"

See merge request gitlab-org/gitlab!40114
parents 03857a62 30a376fa
<script> <script>
import { mapActions, mapGetters } from 'vuex'; import { mapActions, mapGetters } from 'vuex';
import { GlFormGroup, GlDeprecatedButton } from '@gitlab/ui'; import { GlFormGroup, GlDeprecatedButton } from '@gitlab/ui';
import { convertToSnakeCase, dasherize } from '~/lib/utils/text_utility';
import StepHeader from './step_header.vue'; import StepHeader from './step_header.vue';
import StepSummary from './step_summary.vue'; import StepSummary from './step_summary.vue';
...@@ -40,6 +41,9 @@ export default { ...@@ -40,6 +41,9 @@ export default {
isEditable() { isEditable() {
return this.isFinished && this.stepIndex(this.step) < this.currentStepIndex; return this.isFinished && this.stepIndex(this.step) < this.currentStepIndex;
}, },
snakeCasedStep() {
return dasherize(convertToSnakeCase(this.step));
},
...mapGetters(['currentStep', 'stepIndex', 'currentStepIndex']), ...mapGetters(['currentStep', 'stepIndex', 'currentStepIndex']),
}, },
methods: { methods: {
...@@ -58,7 +62,7 @@ export default { ...@@ -58,7 +62,7 @@ export default {
<template> <template>
<div class="mb-3 mb-lg-5"> <div class="mb-3 mb-lg-5">
<step-header :title="title" :is-finished="isFinished" /> <step-header :title="title" :is-finished="isFinished" />
<div class="card"> <div :class="['card', snakeCasedStep]">
<div v-show="isActive" @keyup.enter="nextStep"> <div v-show="isActive" @keyup.enter="nextStep">
<slot name="body" :active="isActive"></slot> <slot name="body" :active="isActive"></slot>
<gl-form-group v-if="nextStepButtonText" class="gl-mt-3 gl-mb-0"> <gl-form-group v-if="nextStepButtonText" class="gl-mt-3 gl-mb-0">
......
...@@ -120,9 +120,13 @@ export const fetchPaymentFormParams = ({ dispatch }) => ...@@ -120,9 +120,13 @@ export const fetchPaymentFormParams = ({ dispatch }) =>
export const fetchPaymentFormParamsSuccess = ({ commit }, data) => { export const fetchPaymentFormParamsSuccess = ({ commit }, data) => {
if (data.errors) { if (data.errors) {
createFlash( createFlash(
sprintf(s__('Checkout|Credit card form failed to load: %{message}'), { sprintf(
message: data.errors, s__('Checkout|Credit card form failed to load: %{message}'),
}), {
message: data.errors,
},
false,
),
); );
} else { } else {
commit(types.UPDATE_PAYMENT_FORM_PARAMS, data); commit(types.UPDATE_PAYMENT_FORM_PARAMS, data);
...@@ -159,6 +163,7 @@ export const paymentFormSubmittedError = (_, response) => { ...@@ -159,6 +163,7 @@ export const paymentFormSubmittedError = (_, response) => {
'Checkout|Submitting the credit card form failed with code %{errorCode}: %{errorMessage}', 'Checkout|Submitting the credit card form failed with code %{errorCode}: %{errorMessage}',
), ),
response, response,
false,
), ),
); );
}; };
......
...@@ -79,6 +79,13 @@ $subscriptions-full-width-lg: 541px; ...@@ -79,6 +79,13 @@ $subscriptions-full-width-lg: 541px;
@media(min-width: map-get($grid-breakpoints, lg)) { @media(min-width: map-get($grid-breakpoints, lg)) {
width: $subscriptions-full-width-lg; width: $subscriptions-full-width-lg;
} }
&.payment-method {
// Use literal to avoid dark theme from changing the color
// scss-lint:disable ColorVariable
background-color: #fff;
// scss-lint:enable ColorVariable
}
} }
.gl-form-group, .gl-form-group,
...@@ -144,7 +151,10 @@ $subscriptions-full-width-lg: 541px; ...@@ -144,7 +151,10 @@ $subscriptions-full-width-lg: 541px;
} }
iframe { iframe {
background-color: $white; // Use literal to avoid dark theme from changing the color
// scss-lint:disable ColorVariable
background-color: #fff;
// scss-lint:enable ColorVariable
margin: -4px; margin: -4px;
width: 100% !important; width: 100% !important;
} }
......
---
title: Display contents of Zuora iframe for the new purchase flow in Dark Mode
merge_request: 40114
author:
type: fixed
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment