Skip to content

Commit 860b4a7

Browse files
authored
Merge pull request #4580 from serlo/deactivate-donation-temporarily
chore(web): deactivate donation feature for now
2 parents 8f14e6a + 45d8973 commit 860b4a7

File tree

11 files changed

+16
-52
lines changed

11 files changed

+16
-52
lines changed

apps/web/src/components/entity/entity-base.tsx

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import { Breadcrumbs } from '../navigation/breadcrumbs'
1111
import { MaxWidthDiv } from '../navigation/max-width-div'
1212
import { SecondaryMenu } from '../navigation/secondary-menu'
1313
import { NewsletterPopup } from '../scripts/newsletter-popup'
14-
import type { DonationsBannerProps } from '@/components/content/donations-banner-experiment/donations-banner'
1514
import {
1615
type EntityPageBase,
1716
type SingleEntityPage,
@@ -31,12 +30,6 @@ const CommentAreaEntity = dynamic<CommentAreaEntityProps>(() =>
3130
)
3231
)
3332

34-
const DonationsBanner = dynamic<DonationsBannerProps>(() =>
35-
import(
36-
'@/components/content/donations-banner-experiment/donations-banner'
37-
).then((mod) => mod.DonationsBanner)
38-
)
39-
4033
export function EntityBase({ children, page, entityId }: EntityBaseProps) {
4134
const noComments =
4235
page.kind === 'single-entity' &&
@@ -70,11 +63,6 @@ export function EntityBase({ children, page, entityId }: EntityBaseProps) {
7063
/>
7164
<main id="content">{children}</main>
7265

73-
{/* Temporary donations banner trial */}
74-
{page.kind === 'single-entity' ? (
75-
<DonationsBanner id={entityId} entityData={page.entityData} />
76-
) : null}
77-
7866
<div id="comment-area-begin-scrollpoint" />
7967
{!noComments && (
8068
<>

apps/web/src/components/landing/rework/footer-nav-new.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ export function FooterNavNew() {
2626
>
2727
Mitmachen
2828
</Link>
29-
<Link
29+
{/* <Link
3030
className="serlo-new-landing-button !text-white md:mx-0"
3131
href="/spenden"
3232
>
3333
Spenden
34-
</Link>
34+
</Link> */}
3535
</div>
3636
</div>
3737
<Separator className="md:hidden" />

apps/web/src/components/navigation/footer.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import {
44
} from '@fortawesome/free-solid-svg-icons'
55

66
import { FaIcon } from '../fa-icon'
7-
import DonateIcon from '@/assets-webkit/img/footer-donate.svg'
87
import ParticipateIcon from '@/assets-webkit/img/footer-participate.svg'
98
import { Link } from '@/components/content/link'
109
import { FooterNav } from '@/components/navigation/footer-nav'
@@ -64,15 +63,15 @@ function About() {
6463
{strings.footer.participate}
6564
</div>
6665
</Link>
67-
<Link
66+
{/* <Link
6867
href={footerData.donationHref}
6968
className="group flex flex-col items-center hover:no-underline"
7069
>
7170
<DonateIcon className="w-14" />
7271
<div className="serlo-button-learner mt-2 py-0.5 text-white hover:bg-brand group-hover:bg-brand">
7372
{strings.footer.donate}
7473
</div>
75-
</Link>
74+
</Link> */}
7675
</div>
7776
</div>
7877
</div>

apps/web/src/components/navigation/header/menu/item.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import { useNavMenuTriggerFix } from './use-nav-menu-trigger-fix'
1212
import { FaIcon } from '@/components/fa-icon'
1313
import type { HeaderLinkData } from '@/data-types'
1414
import { cn } from '@/helper/cn'
15-
import { submitEvent } from '@/helper/submit-event'
1615

1716
const styledLinkCls = cn(`
1817
navtrigger block flex w-full
@@ -60,10 +59,10 @@ export function Item({ link, elementAsIcon, className }: ItemProps) {
6059
<Link
6160
className={cn('group', styledLinkCls)}
6261
// temporarily track spenden button use
63-
onClick={() => {
64-
if (link.url === '/spenden')
65-
submitEvent('spenden-header-menu-click')
66-
}}
62+
// onClick={() => {
63+
// if (link.url === '/spenden')
64+
// submitEvent('spenden-header-menu-click')
65+
// }}
6766
>
6867
{textAndIcon}
6968
</Link>

apps/web/src/components/pages/donations.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { faPaypal } from '@fortawesome/free-brands-svg-icons'
22
import Image from 'next/image'
33

4-
import { TestimonialDonationsPage } from '../content/donations-banner-experiment/testimonial-donations-page'
54
import { FaIcon } from '../fa-icon'
65
import { HeadTags } from '../head-tags'
76
import { PrivacyWrapper } from '@/components/content/privacy-wrapper'
@@ -172,7 +171,6 @@ export function Donations() {
172171
</p>
173172
</section>
174173
</div>
175-
<TestimonialDonationsPage />
176174
</div>
177175

178176
<footer>

apps/web/src/components/taxonomy/topic.tsx

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { EditorPluginType, SerloRenderer } from '@editor/package'
22
import { faFile, faTrash } from '@fortawesome/free-solid-svg-icons'
3-
import dynamic from 'next/dynamic'
43
import { Fragment } from 'react'
54

65
import { SubTopic } from './sub-topic'
@@ -9,7 +8,6 @@ import { ExerciseNumbering } from '../content/exercises/exercise-numbering'
98
import { ExamsInfoBox } from '../exams-info-box'
109
import { FaIcon } from '../fa-icon'
1110
import { InfoPanel } from '../info-panel'
12-
import type { DonationsBannerProps } from '@/components/content/donations-banner-experiment/donations-banner'
1311
import { LicenseNotice } from '@/components/content/license/license-notice'
1412
import { UserTools } from '@/components/user-tools/user-tools'
1513
import { EntityMetaProvider } from '@/contexts/entity-meta-context'
@@ -30,12 +28,6 @@ export interface TopicProps {
3028
breadcrumbs?: BreadcrumbsData
3129
}
3230

33-
const DonationsBanner = dynamic<DonationsBannerProps>(() =>
34-
import(
35-
'@/components/content/donations-banner-experiment/donations-banner'
36-
).then((mod) => mod.DonationsBanner)
37-
)
38-
3931
export function Topic({ data, breadcrumbs }: TopicProps) {
4032
const { strings } = useInstanceData()
4133

@@ -82,18 +74,6 @@ export function Topic({ data, breadcrumbs }: TopicProps) {
8274
{/* Default license notice */}
8375
<LicenseNotice />
8476

85-
{/* Temporary donations banner trial */}
86-
{isExerciseFolder ? (
87-
<DonationsBanner
88-
id={data.id}
89-
entityData={{
90-
...data,
91-
typename: UuidType.TaxonomyTerm,
92-
isUnrevised: false,
93-
}}
94-
/>
95-
) : null}
96-
9777
{renderUserTools()}
9878
</>
9979
)

apps/web/src/data/de/menu-data.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export const headerData: InstanceData['headerData'] = [
6161
{ title: 'Kontakt & Standorte', url: '/21657/kontakt-und-standorte' },
6262
],
6363
},
64-
{ url: '/spenden', title: 'Spenden', icon: 'donate' },
64+
// { url: '/spenden', title: 'Spenden', icon: 'donate' },
6565
{
6666
url: '',
6767
title: 'Mitmachen',

apps/web/src/pages/sitemap.xml.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ const nextStaticPages: SitemapEntry[] = [
5858
{ url: '/metadata' },
5959
{ url: '/nachhaltigkeit' },
6060
{ url: '/privacy' },
61-
{ url: '/spenden' },
61+
// { url: '/spenden' },
6262
{ url: '/mathe-pruefungen' },
6363
{ url: '/mathe-pruefungen/bayern' },
6464
{ url: '/mathe-pruefungen/berlin' },

apps/web/src/pages/spenden.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { FrontendClientBase } from '@/components/frontend-client-base/frontend-client-base'
2-
import { Donations } from '@/components/pages/donations'
32
import { renderedPageNoHooks } from '@/helper/rendered-page'
43

54
export default renderedPageNoHooks(() => (
6-
<FrontendClientBase noHeaderFooter noContainers>
7-
<Donations />
5+
<FrontendClientBase showNav>
6+
<h1 className="serlo-h1">Spenden</h1>
7+
<p className="serlo-p">Zur Zeit sind Spenden leider nicht möglich.</p>
88
</FrontendClientBase>
99
))

e2e-tests/tests/000-general.mobile.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ Scenario('Legal Pages @mobile', async ({ I }) => {
142142
I.see('Privacy Policy')
143143
144144
})
145-
Scenario('Consent @mobile', async ({ I }) => {
145+
Scenario.skip('Consent @mobile', async ({ I }) => {
146146
I.amOnPage('/spenden')
147147

148148
// Make sure that twingle is activated

e2e-tests/tests/000-general.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ Scenario('Languages', ({ I }) => {
167167
})
168168
*/
169169

170-
Scenario('Donation', ({ I }) => {
170+
Scenario.skip('Donation', ({ I }) => {
171171
I.amOnPage('/spenden')
172172
I.see('Deine Spende macht einen Unterschied')
173173
I.see('Mit PayPal spenden')
@@ -210,7 +210,7 @@ Scenario('Legal Pages', async ({ I }) => {
210210
211211
})
212212

213-
Scenario('Consent', async ({ I }) => {
213+
Scenario.skip('Consent', async ({ I }) => {
214214
I.amOnPage('/spenden')
215215

216216
// Make sure that twingle is activated

0 commit comments

Comments
 (0)