Skip to content

Commit 6a6ab37

Browse files
Merge branch 'main' into dev
2 parents 9216e32 + 4ce967d commit 6a6ab37

File tree

6 files changed

+43
-79
lines changed

6 files changed

+43
-79
lines changed

frontend-nextjs/src/components/EventsTimeline/EventsTimelineLegend.tsx

Lines changed: 12 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -21,43 +21,43 @@ const placeholderOrganisations: LegendOrganisation[] = [
2121
{
2222
slug: 'fridays-for-future' as EventOrganizerSlugType,
2323
name: 'Fridays for Future',
24-
color: 'var(--categorical-color-1)',
24+
color: 'var(--categorical-color-6)',
2525
isMain: true,
2626
},
2727
{
2828
slug: 'last-generation' as EventOrganizerSlugType,
2929
name: 'Last Generation',
30-
color: 'var(--categorical-color-2)',
30+
color: 'var(--categorical-color-5)',
3131
isMain: true,
3232
},
3333
{
3434
slug: 'extinction-rebellion' as EventOrganizerSlugType,
3535
name: 'Extinction Rebellion',
36-
color: 'var(--categorical-color-3)',
36+
color: 'var(--categorical-color-7)',
3737
isMain: true,
3838
},
3939
{
4040
slug: 'bund' as EventOrganizerSlugType,
4141
name: 'BUND',
42-
color: 'var(--categorical-color-4)',
42+
color: 'var(--categorical-color-14)',
4343
isMain: true,
4444
},
4545
{
46-
slug: 'greenpeace' as EventOrganizerSlugType,
47-
name: 'Greenpeace',
48-
color: 'var(--categorical-color-5)',
46+
slug: 'nabu' as EventOrganizerSlugType,
47+
name: 'NABU',
48+
color: 'var(--categorical-color-2)',
4949
isMain: true,
5050
},
5151
{
52-
slug: 'verdi-united-services-union' as EventOrganizerSlugType,
53-
name: 'Ver.di: United Services Union',
54-
color: 'var(--categorical-color-6)',
52+
slug: 'greenpeace' as EventOrganizerSlugType,
53+
name: 'Greenpeace',
54+
color: 'var(--categorical-color-3)',
5555
isMain: true,
5656
},
5757
{
5858
slug: 'ende-gelaende' as EventOrganizerSlugType,
5959
name: 'Ende Gelaende',
60-
color: 'var(--categorical-color-7)',
60+
color: 'var(--categorical-color-4)',
6161
isMain: true,
6262
},
6363
{
@@ -66,28 +66,10 @@ const placeholderOrganisations: LegendOrganisation[] = [
6666
color: 'var(--categorical-color-8)',
6767
isMain: true,
6868
},
69-
{
70-
slug: 'mlpd-marxist-leninist-party-of-germany' as EventOrganizerSlugType,
71-
name: 'MLPD: Marxist-Leninist Party of Germany',
72-
color: 'var(--categorical-color-9)',
73-
isMain: true,
74-
},
7569
{
7670
slug: 'the-left' as EventOrganizerSlugType,
7771
name: 'The Left',
78-
color: 'var(--categorical-color-10)',
79-
isMain: true,
80-
},
81-
{
82-
slug: 'government-of-germany' as EventOrganizerSlugType,
83-
name: 'Government of Germany',
84-
color: 'var(--grayDark)',
85-
isMain: false,
86-
},
87-
{
88-
slug: 'adfc-german-bicycle-club' as EventOrganizerSlugType,
89-
name: 'ADFC: German Bicycle Club',
90-
color: 'var(--categorical-color-11)',
72+
color: 'var(--categorical-color-1)',
9173
isMain: true,
9274
},
9375
{
@@ -96,12 +78,6 @@ const placeholderOrganisations: LegendOrganisation[] = [
9678
color: 'var(--categorical-color-12)',
9779
isMain: true,
9880
},
99-
{
100-
slug: 'rebell-youth-league-rebel' as EventOrganizerSlugType,
101-
name: 'REBELL: Youth League Rebel',
102-
color: 'var(--categorical-color-14)',
103-
isMain: true,
104-
},
10581
]
10682

10783
function EventsTimelineLegend({
Lines changed: 30 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,53 @@
1-
import { cn } from "@/utility/classNames";
2-
import type { ComparableDateItemType } from "@/utility/comparableDateItemSchema";
3-
import { format } from "@/utility/dateUtil";
4-
import { texts, titleCase } from "@/utility/textUtil";
5-
import { getTopicIcon } from "@/utility/topicsUtil";
6-
import { memo } from "react";
1+
import { cn } from '@/utility/classNames'
2+
import type { ComparableDateItemType } from '@/utility/comparableDateItemSchema'
3+
import { format } from '@/utility/dateUtil'
4+
import { texts, titleCase } from '@/utility/textUtil'
5+
import { getTopicIcon } from '@/utility/topicsUtil'
6+
import { memo } from 'react'
77
import {
88
type AggregationUnitType,
99
formatDateByAggregationUnit,
10-
} from "./EventsTimeline/useAggregationUnit";
11-
import { ImpactKeywordLabel } from "./ImpactChart/ImpactKeywordLabel";
10+
} from './EventsTimeline/useAggregationUnit'
11+
import { ImpactKeywordLabel } from './ImpactChart/ImpactKeywordLabel'
1212

1313
function TopicChartTooltip({
1414
aggregationUnit,
1515
topics,
1616
item,
1717
}: {
18-
aggregationUnit: AggregationUnitType;
18+
aggregationUnit: AggregationUnitType
1919
topics: {
20-
topic: string;
21-
color: string;
22-
sum: number;
23-
}[];
20+
topic: string
21+
color: string
22+
sum: number
23+
}[]
2424
item: Record<string, number> & {
25-
comparableDateObject: ComparableDateItemType;
26-
};
25+
comparableDateObject: ComparableDateItemType
26+
}
2727
}) {
28-
const { date } = item.comparableDateObject;
28+
const { date } = item.comparableDateObject
2929
return (
3030
<div
3131
className={cn(
32-
"bg-pattern-soft border border-grayMed p-4 flex flex-col gap-1",
33-
"shadow-lg shadow-black/5 dark:shadow-black/50",
32+
'bg-pattern-soft border border-grayMed p-4 flex flex-col gap-1',
33+
'shadow-lg shadow-black/5 dark:shadow-black/50',
3434
)}
3535
>
3636
<strong className="font-bold font-headlines text-base leading-tight pb-2 mb-2 border-b border-grayLight min-w-56">
37-
{aggregationUnit !== "day" &&
37+
{aggregationUnit !== 'day' &&
3838
`${aggregationUnit.charAt(0).toUpperCase()}${aggregationUnit.slice(
3939
1,
4040
)} of `}
41-
{aggregationUnit === "day" && format(date, "EEEE d MMMM yyyy")}
42-
{aggregationUnit === "month" && format(date, "MMMM yyyy")}
43-
{aggregationUnit !== "day" &&
44-
aggregationUnit !== "month" &&
41+
{aggregationUnit === 'day' && format(date, 'EEEE d MMMM yyyy')}
42+
{aggregationUnit === 'month' && format(date, 'MMMM yyyy')}
43+
{aggregationUnit !== 'day' &&
44+
aggregationUnit !== 'month' &&
4545
formatDateByAggregationUnit(date, aggregationUnit)}
4646
</strong>
4747
{topics
4848
.map((t) => ({ ...t, value: item[t.topic] ?? 0 }))
4949
.map(({ topic, value, color }) => {
50-
const Icon = getTopicIcon(topic);
50+
const Icon = getTopicIcon(topic)
5151
return (
5252
<div
5353
key={topic}
@@ -67,16 +67,18 @@ function TopicChartTooltip({
6767
{(+value)?.toLocaleString(texts.language) ?? 0}
6868
</span>
6969
</div>
70-
);
70+
)
7171
})}
7272
<div className="border-t border-grayLight pt-1 mt-1 flex gap-4 justify-between items-center">
7373
<strong className="font-bold ">{texts.charts.common.total}:</strong>
7474
<span className="font-mono text-xs text-grayDark">
75-
{topics.reduce((acc, { topic }) => acc + (item[topic] || 0), 0)}
75+
{topics
76+
.reduce((acc, { topic }) => acc + (item[topic] || 0), 0)
77+
.toLocaleString(texts.language)}
7678
</span>
7779
</div>
7880
</div>
79-
);
81+
)
8082
}
8183

82-
export default memo(TopicChartTooltip);
84+
export default memo(TopicChartTooltip)

frontend-nextjs/src/components/TrendWithImpactChartWrapper.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ function TrendWithImpactChartWrapper({
118118
{impactHeadline}
119119
</h3>
120120
<p className="text-sm text-grayDark">{impactDescription}</p>
121-
<Alert className="mt-2 px-2 py-1 flex-row flex items-baseline gap-4 xl:w-[calc(100%-12rem)]">
121+
<Alert className="mt-2 px-2 py-1 flex-row flex items-baseline gap-4 xl:w-fit xl:max-w-[calc(100%-12rem)]">
122122
<AlertTitle className="inline-flex items-baseline gap-2 text-nowrap">
123123
<AlertTriangle className="w-4 h-4 translate-y-0.5" />
124124
{texts.charts.impact.disclaimer.title}

frontend-nextjs/src/content/docs/views/organisation_view/00-intro.mdx

Lines changed: 0 additions & 8 deletions
This file was deleted.

frontend-nextjs/src/content/docs/views/single_protest_view/00-intro.mdx

Lines changed: 0 additions & 6 deletions
This file was deleted.
26.4 KB
Loading

0 commit comments

Comments
 (0)