Skip to content

Commit

Permalink
Remove DateFormatNotice
Browse files Browse the repository at this point in the history
  • Loading branch information
mgascam committed Jan 10, 2025
1 parent 82ac1b9 commit a51f31e
Show file tree
Hide file tree
Showing 17 changed files with 4 additions and 332 deletions.
2 changes: 0 additions & 2 deletions client/capital/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import { useLoans } from 'wcpay/data';
import { getAdminUrl } from 'wcpay/utils';
import './style.scss';
import { formatDateTimeFromString } from 'wcpay/utils/date-time';
import DateFormatNotice from 'wcpay/components/date-format-notice';

const columns = [
{
Expand Down Expand Up @@ -210,7 +209,6 @@ const CapitalPage = (): JSX.Element => {

return (
<Page>
<DateFormatNotice />
<TestModeNotice currentPage="loans" />

{ wcpaySettings.accountLoans.has_active_loan && (
Expand Down
48 changes: 0 additions & 48 deletions client/capital/test/__snapshots__/index.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -5,54 +5,6 @@ exports[`CapitalPage renders the TableCard component with loan data 1`] = `
<div
class=" woocommerce-payments-page"
>
<div
class="date-format-notice wcpay-banner-notice is-info"
>
<svg
aria-hidden="true"
class="wcpay-banner-notice__icon"
focusable="false"
height="24"
viewBox="0 0 24 24"
width="24"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"
/>
</svg>
<div
class="wcpay-banner-notice__content"
>
The date and time formats now match your preferences. You can update them anytime in the
<a
data-link-type="external"
href="/wp-admin/options-general.php"
>
settings
</a>
.
</div>
<button
aria-label="Dismiss this notice"
class="components-button wcpay-banner-notice__dismiss has-icon"
type="button"
>
<svg
class="gridicon gridicons-cross-small"
height="24"
viewBox="0 0 24 24"
width="24"
xmlns="http://www.w3.org/2000/svg"
>
<g>
<path
d="M17.705 7.705l-1.41-1.41L12 10.59 7.705 6.295l-1.41 1.41L10.59 12l-4.295 4.295 1.41 1.41L12 13.41l4.295 4.295 1.41-1.41L13.41 12l4.295-4.295z"
/>
</g>
</svg>
</button>
</div>
<div
class="wcpay-banner-notice is-warning"
>
Expand Down
67 changes: 0 additions & 67 deletions client/components/date-format-notice/index.tsx

This file was deleted.

5 changes: 0 additions & 5 deletions client/components/date-format-notice/style.scss

This file was deleted.

2 changes: 0 additions & 2 deletions client/deposits/details/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ import {
import { depositStatusLabels } from '../strings';
import './style.scss';
import { formatDateTimeFromString } from 'wcpay/utils/date-time';
import DateFormatNotice from 'wcpay/components/date-format-notice';

/**
* Renders the deposit status indicator UI, re-purposing the OrderStatus component from @woocommerce/components.
Expand Down Expand Up @@ -242,7 +241,6 @@ export const DepositDetails: React.FC< DepositDetailsProps > = ( {

return (
<Page>
<DateFormatNotice />
<TestModeNotice currentPage="deposits" isDetailsView={ true } />
<ErrorBoundary>
{ isLoading ? (
Expand Down
2 changes: 0 additions & 2 deletions client/deposits/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import { useSettings } from 'wcpay/data';
import DepositsList from './list';
import { hasAutomaticScheduledDeposits } from 'wcpay/deposits/utils';
import { recordEvent } from 'wcpay/tracks';
import DateFormatNotice from 'wcpay/components/date-format-notice';

const useNextDepositNoticeState = () => {
const { updateOptions } = useDispatch( 'wc/admin/options' );
Expand Down Expand Up @@ -149,7 +148,6 @@ const DepositsPage: React.FC = () => {

return (
<Page>
<DateFormatNotice />
<TestModeNotice currentPage="deposits" />
<NextDepositNotice />
<DepositFailureNotice />
Expand Down
2 changes: 0 additions & 2 deletions client/disputes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ import { useSettings } from 'wcpay/data';
import { isAwaitingResponse } from 'wcpay/disputes/utils';
import CSVExportModal from 'components/csv-export-modal';
import { ReportingExportLanguageHook } from 'wcpay/settings/reporting-settings/interfaces';
import DateFormatNotice from 'wcpay/components/date-format-notice';
import './style.scss';
import { formatDateTimeFromString } from 'wcpay/utils/date-time';

Expand Down Expand Up @@ -555,7 +554,6 @@ export const DisputesList = (): JSX.Element => {

return (
<Page>
<DateFormatNotice />
<TestModeNotice currentPage="disputes" />
<DisputesFilters storeCurrencies={ storeCurrencies } />
<TableCard
Expand Down
48 changes: 0 additions & 48 deletions client/disputes/test/__snapshots__/index.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -5,54 +5,6 @@ exports[`Disputes list renders correctly 1`] = `
<div
class=" woocommerce-payments-page"
>
<div
class="date-format-notice wcpay-banner-notice is-info"
>
<svg
aria-hidden="true"
class="wcpay-banner-notice__icon"
focusable="false"
height="24"
viewBox="0 0 24 24"
width="24"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"
/>
</svg>
<div
class="wcpay-banner-notice__content"
>
The date and time formats now match your preferences. You can update them anytime in the
<a
data-link-type="external"
href="/wp-admin/options-general.php"
>
settings
</a>
.
</div>
<button
aria-label="Dismiss this notice"
class="components-button wcpay-banner-notice__dismiss has-icon"
type="button"
>
<svg
class="gridicon gridicons-cross-small"
height="24"
viewBox="0 0 24 24"
width="24"
xmlns="http://www.w3.org/2000/svg"
>
<g>
<path
d="M17.705 7.705l-1.41-1.41L12 10.59 7.705 6.295l-1.41 1.41L10.59 12l-4.295 4.295 1.41 1.41L12 13.41l4.295 4.295 1.41-1.41L13.41 12l4.295-4.295z"
/>
</g>
</svg>
</button>
</div>
<div
class="woocommerce-filters-disputes"
>
Expand Down
3 changes: 1 addition & 2 deletions client/documents/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@ import React from 'react';
import Page from 'components/page';
import DocumentsList from './list';
import { TestModeNotice } from 'components/test-mode-notice';
import DateFormatNotice from 'wcpay/components/date-format-notice';

export const DocumentsPage = (): JSX.Element => {
return (
<Page>
<DateFormatNotice />
<TestModeNotice currentPage="documents" />
<DocumentsList />
</Page>
Expand Down
1 change: 0 additions & 1 deletion client/globals.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ declare global {
storeName: string;
isNextDepositNoticeDismissed: boolean;
isInstantDepositNoticeDismissed: boolean;
isDateFormatNoticeDismissed: boolean;
reporting: {
exportModalDismissed?: boolean;
};
Expand Down
2 changes: 0 additions & 2 deletions client/overview/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import { useDisputes, useGetSettings, useSettings } from 'data';
import SandboxModeSwitchToLiveNotice from 'wcpay/components/sandbox-mode-switch-to-live-notice';
import './style.scss';
import BannerNotice from 'wcpay/components/banner-notice';
import DateFormatNotice from 'wcpay/components/date-format-notice';

const OverviewPageError = () => {
const queryParams = getQuery();
Expand Down Expand Up @@ -152,7 +151,6 @@ const OverviewPage = () => {
<Page isNarrow className="wcpay-overview">
<OverviewPageError />
<JetpackIdcNotice />
<DateFormatNotice />
{ showLoanOfferError && (
<Notice status="error" isDismissible={ false }>
{ __(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,54 +6,6 @@ exports[`Order details page should match the snapshot - Charge without payment i
class="wcpay-payment-details woocommerce-payments-page"
style="max-width: 1032px;"
>
<div
class="date-format-notice wcpay-banner-notice is-info"
>
<svg
aria-hidden="true"
class="wcpay-banner-notice__icon"
focusable="false"
height="24"
viewBox="0 0 24 24"
width="24"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"
/>
</svg>
<div
class="wcpay-banner-notice__content"
>
The date and time formats now match your preferences. You can update them anytime in the
<a
data-link-type="external"
href="/wp-admin/options-general.php"
>
settings
</a>
.
</div>
<button
aria-label="Dismiss this notice"
class="components-button wcpay-banner-notice__dismiss has-icon"
type="button"
>
<svg
class="gridicon gridicons-cross-small"
height="24"
viewBox="0 0 24 24"
width="24"
xmlns="http://www.w3.org/2000/svg"
>
<g>
<path
d="M17.705 7.705l-1.41-1.41L12 10.59 7.705 6.295l-1.41 1.41L10.59 12l-4.295 4.295 1.41 1.41L12 13.41l4.295 4.295 1.41-1.41L13.41 12l4.295-4.295z"
/>
</g>
</svg>
</button>
</div>
<div
class="components-surface components-card css-nsno0f-View-Surface-getBorders-primary-Card-rounded em57xhy0"
data-wp-c16t="true"
Expand Down
3 changes: 1 addition & 2 deletions client/payment-details/payment-details/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import PaymentDetailsPaymentMethod from '../payment-method';
import { ApiError } from '../../types/errors';
import { Charge } from '../../types/charges';
import { PaymentIntent } from '../../types/payment-intents';
import DateFormatNotice from 'wcpay/components/date-format-notice';

interface PaymentDetailsProps {
id: string;
isLoading: boolean;
Expand Down Expand Up @@ -56,7 +56,6 @@ const PaymentDetails: React.FC< PaymentDetailsProps > = ( {

return (
<Page maxWidth={ 1032 } className="wcpay-payment-details">
<DateFormatNotice />
<TestModeNotice currentPage="payments" isDetailsView={ true } />
<ErrorBoundary>
<PaymentDetailsSummary
Expand Down
3 changes: 1 addition & 2 deletions client/payment-details/readers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {
formatExplicitCurrency,
formatExportAmount,
} from 'multi-currency/interface/functions';
import DateFormatNotice from 'wcpay/components/date-format-notice';

const PaymentCardReaderChargeDetails = ( props ) => {
const { readers, chargeError, isLoading } = useCardReaderStats(
props.chargeId,
Expand All @@ -34,7 +34,6 @@ const PaymentCardReaderChargeDetails = ( props ) => {
if ( ! isLoading && chargeError instanceof Error ) {
return (
<Page maxWidth={ 1032 } className="wcpay-payment-details">
<DateFormatNotice />
<TestModeNotice currentPage="payments" isDetailsView={ true } />
<Card>
<CardBody>
Expand Down
Loading

0 comments on commit a51f31e

Please sign in to comment.