Skip to content

Commit 6597c97

Browse files
authored
Merge pull request #860 from mapswipe/feature/information-pages
Feature/information pages
2 parents 9380369 + f8d162e commit 6597c97

File tree

87 files changed

+4619
-1249
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+4619
-1249
lines changed

docker-compose.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,10 @@ services:
138138
REACT_APP_SENTRY_DSN: ${MANAGER_DASHBOARD_SENTRY_DSN}
139139
REACT_APP_SENTRY_TRACES_SAMPLE_RATE: ${MANAGER_DASHBOARD_SENTRY_TRACES_SAMPLE_RATE}
140140
REACT_APP_COMMUNITY_DASHBOARD_URL: ${MANAGER_DASHBOARD_COMMUNITY_DASHBOARD_URL}
141+
REACT_APP_IMAGE_BING_API_KEY: ${IMAGE_BING_API_KEY}
142+
REACT_APP_IMAGE_MAPBOX_API_KEY: ${IMAGE_MAPBOX_API_KEY}
143+
REACT_APP_IMAGE_MAXAR_PREMIUM_API_KEY: ${IMAGE_MAXAR_PREMIUM_API_KEY}
144+
REACT_APP_IMAGE_MAXAR_STANDARD_API_KEY: ${IMAGE_MAXAR_STANDARD_API_KEY}
141145
volumes:
142146
- manager-dashboard-static:/code/build/
143147
command: bash -c 'yarn build'

manager-dashboard/.env.example

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,9 @@ REACT_APP_FIREBASE_STORAGE_BUCKET=
1010
REACT_APP_FIREBASE_MESSAGING_SENDER_ID=
1111
REACT_APP_FIREBASE_APP_ID=
1212
REACT_APP_COMMUNITY_DASHBOARD_URL=
13+
14+
REACT_APP_IMAGE_BING_API_KEY=
15+
REACT_APP_IMAGE_MAPBOX_API_KEY=
16+
REACT_APP_IMAGE_MAXAR_PREMIUM_API_KEY=
17+
# -- NOTE: not used and seems to be discontinued
18+
REACT_APP_IMAGE_MAXAR_STANDARD_API_KEY=

manager-dashboard/app/Base/components/Navbar/styles.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
box-shadow: 0 3px 5px -2px var(--color-shadow);
66
background-color: var(--color-primary);
77
padding: var(--spacing-medium) var(--spacing-large);
8-
color: var(--color-text-on-light);
8+
color: var(--color-text-on-dark);
99

1010
.container {
1111
display: flex;
@@ -42,7 +42,7 @@
4242

4343
.link {
4444
opacity: 0.7;
45-
color: var(--color-text-on-light);
45+
color: var(--color-text-on-dark);
4646

4747
&.active {
4848
opacity: 1;
@@ -58,7 +58,7 @@
5858
gap: var(--spacing-medium);
5959

6060
.logout-button {
61-
color: var(--color-text-on-light);
61+
color: var(--color-text-on-dark);
6262
}
6363
}
6464
}

manager-dashboard/app/Base/components/SmartLink/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Link, LinkProps } from 'react-router-dom';
33

44
import {
55
useButtonFeatures,
6-
Props as ButtonProps,
6+
ButtonProps,
77
} from '#components/Button';
88

99
import useRouteMatching, {

manager-dashboard/app/Base/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {
1212
ApolloProvider,
1313
} from '@apollo/client';
1414
import { initializeApp } from 'firebase/app';
15+
import 'react-mde/lib/styles/css/react-mde-all.css';
1516

1617
import Init from '#base/components/Init';
1718
import PreloadMessage from '#base/components/PreloadMessage';

manager-dashboard/app/Base/styles.css

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,18 +53,21 @@ p {
5353
--color-background-primary-hint: #0d194920;
5454
--color-background-accent-hint: #4746f610;
5555

56+
--color-black: #000000;
57+
5658
--color-scrollbar-foreground: rgba(0, 0, 0, .2);
5759
--color-scrollbar-background: rgba(0, 0, 0, .01);
5860
--color-hover-background: rgba(0, 0, 0, 0.03);
5961
--color-input-background: #4746f605;
6062

6163
--color-primary: #0d1949;
6264
--color-primary-light: #2d5989;
63-
--color-text-on-light: #ffffff;
65+
--color-text-on-dark: #ffffff;
6466
--color-text-watermark: rgba(0, 0, 0, .4);
6567
--color-text: rgba(0, 0, 0, 0.8);
6668
--color-text-dark: rgba(0, 0, 0, 1);
6769
--color-text-light: rgba(0, 0, 0, 0.6);
70+
--color-text-gray: #666666;
6871
--color-accent: #4746f6;
6972
--color-danger: #e04656;
7073
--color-success: #53b391;
@@ -83,24 +86,40 @@ p {
8386
--font-size-ultra-large: 4rem;
8487

8588
--font-weight-medium: 400;
89+
--font-weight-semibold: 600;
8690
--font-weight-bold: 700;
8791

8892
--opacity-disabled-element: 0.5;
8993

90-
--width-separator-thin: 1px;
94+
--width-separator-thin: 1pt;
95+
--width-separator-thick: 5pt;
96+
--width-separator-mobile-preview: 8pt;
9197
--width-scrollbar: 0.75rem;
9298
--width-page-content-max: 70rem;
9399
--width-navbar-content-max: 76rem;
94100

101+
--width-mobile-preview: 22rem;
102+
--height-mobile-preview: 40rem;
103+
--height-mobile-preview-builarea-content: 30rem;
104+
--height-mobile-preview-footprint-content: 22rem;
105+
--height-mobile-preview-change-detection-content: 14rem;
106+
95107
--radius-popup-border: 0.25rem;
96108
--radius-scrollbar-border: 0.25rem;
97109
--radius-blur-shadow: 5px;
98110
--radius-modal: 0.25rem;
99111
--radius-button-border: 0.25rem;
100112
--radius-input-border: 0.25rem;
101-
--radius-card-border: 0.25rem;
113+
--radius-card-border: 0.5rem;
102114
--radius-badge-border: 1rem;
103115

116+
--line-height-none: 1;
117+
--line-height-tight: 1.25;
118+
--line-height-snug: 1.375;
119+
--line-height-normal: 1.5;
120+
--line-height-relaxed: 1.625;
121+
--line-height-loose: 2;
122+
104123

105124
--shadow-card: 0 2px 4px -2px var(--color-shadow);
106125

manager-dashboard/app/Base/utils/errorTransform.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { internal } from '@togglecorp/toggle-form';
1+
import { nonFieldError } from '@togglecorp/toggle-form';
22
import { listToMap, isDefined, isNotDefined } from '@togglecorp/fujs';
33

44
interface Error {
5-
[internal]?: string | undefined;
5+
[nonFieldError]?: string | undefined;
66
[key: string]: string | Error | undefined;
77
}
88

@@ -53,7 +53,7 @@ function transformObject(errors: ObjectError[] | undefined): Error | undefined {
5353
);
5454

5555
return {
56-
[internal]: finalNonFieldErrors,
56+
[nonFieldError]: finalNonFieldErrors,
5757
...finalFieldErrors,
5858
};
5959
}
@@ -68,7 +68,7 @@ function transformArray(errors: (ArrayError | null)[] | undefined): Error | unde
6868
const memberErrors = filteredErrors.filter((error) => error.clientId !== 'nonMemberErrors');
6969

7070
return {
71-
[internal]: topLevelError?.messages,
71+
[nonFieldError]: topLevelError?.messages,
7272
...listToMap(
7373
memberErrors,
7474
(error) => error.clientId,

manager-dashboard/app/components/Button/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export type ButtonVariant = (
1313
| 'transparent'
1414
);
1515

16-
export interface Props<N> extends RawButtonProps<N> {
16+
export interface ButtonProps<N> extends RawButtonProps<N> {
1717
/**
1818
* Variant of the button
1919
*/
@@ -57,7 +57,7 @@ export interface Props<N> extends RawButtonProps<N> {
5757
type ButtonFeatureKeys = 'variant' | 'className' | 'actionsClassName' | 'iconsClassName' | 'childrenClassName' | 'children' | 'icons' | 'actions' | 'disabled';
5858

5959
export function useButtonFeatures(
60-
props: Pick<Props<string>, ButtonFeatureKeys>,
60+
props: Pick<ButtonProps<string>, ButtonFeatureKeys>,
6161
) {
6262
const {
6363
variant = 'default',
@@ -111,7 +111,7 @@ export function useButtonFeatures(
111111
/**
112112
* Basic button component
113113
*/
114-
function Button<N>(props: Props<N>) {
114+
function Button<N>(props: ButtonProps<N>) {
115115
const {
116116
variant,
117117
className,

manager-dashboard/app/components/Button/styles.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
border: var(--width-separator-thin) solid rgba(0, 0, 0, 0.3);
55
border-radius: var(--radius-button-border);
66
padding: var(--spacing-small) var(--spacing-medium);
7+
width: fit-content;
78
color: rgba(0, 0, 0, 0.8);
89
gap: var(--spacing-small);
910

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import React from 'react';
2+
3+
import styles from './styles.css';
4+
5+
interface Props {
6+
title: string;
7+
description: string;
8+
}
9+
10+
function EmptyMessage(props: Props) {
11+
const {
12+
title,
13+
description,
14+
} = props;
15+
16+
return (
17+
<div className={styles.emptyMessage}>
18+
<div className={styles.emptyMessageTitle}>
19+
{title}
20+
</div>
21+
<div className={styles.emptyMessageDescription}>
22+
{description}
23+
</div>
24+
</div>
25+
);
26+
}
27+
28+
export default EmptyMessage;

0 commit comments

Comments
 (0)