Skip to content

Commit 90511e3

Browse files
feat: New search page design (#1131)
* added boxshadow to theme * feed locations sorted by most stops * addition of advanced search table * accessibility addition * more feature data function * feature api integration * cleanup * advanced search country name hover * filter defaults * select defaults fix * filter title + padding * lint * revert padding + filter title
1 parent d52551a commit 90511e3

File tree

15 files changed

+713
-147
lines changed

15 files changed

+713
-147
lines changed

web-app/public/locales/en/common.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
"feeds": "Feeds",
1111
"gtfsSchedule": "GTFS Schedule",
1212
"gtfsRealtime": "GTFS Realtime",
13+
"gtfs": "GTFS Schedule",
14+
"gtfs_rt": "GTFS Realtime",
15+
"gbfs": "GBFS",
1316
"gtfsRealtimeEntities": {
1417
"tripUpdates": "Trip Updates",
1518
"vehiclePositions": "Vehicle Positions",

web-app/public/locales/en/feeds.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
"linkToLicense": "Link to feed license",
5252
"authenticationType": "Authentication type",
5353
"selectAuthenticationType": "Please select an authentication type",
54+
"authenticationRequired": "This feed requires authentication",
5455
"registerToDownloadFeed": "Register to download feed",
5556
"feedContactEmail": "Feed contact email",
5657
"copyFeedContactEmail": "Copy feed contact email",

web-app/src/app/Theme.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@ import {
55
} from '@mui/material/styles';
66
import { type Property } from 'csstype';
77

8+
declare module '@mui/material/styles' {
9+
interface Palette {
10+
boxShadow: string;
11+
}
12+
interface PaletteOptions {
13+
boxShadow?: string;
14+
}
15+
}
16+
817
declare module '@mui/material/Typography' {
918
interface TypographyPropsVariantOverrides {
1019
sectionTitle: true;
@@ -53,6 +62,7 @@ const palette = {
5362
disabled: 'rgba(0,0,0,0.3)',
5463
},
5564
divider: 'rgba(0, 0, 0, 0.23)',
65+
boxShadow: '0px 1px 4px 2px rgba(0,0,0,0.2)',
5666
};
5767

5868
const darkPalette = {
@@ -78,6 +88,7 @@ const darkPalette = {
7888
disabled: 'rgba(255, 255, 255, 0.3)',
7989
},
8090
divider: 'rgba(255, 255, 255, 0.23)',
91+
boxShadow: '0px 1px 4px 2px rgba(0,0,0,0.6)',
8192
};
8293

8394
export const getTheme = (mode: ThemeModeEnum): Theme => {

web-app/src/app/components/FeedStatus.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ export const FeedStatusIndicator = (
6363
width: '12px',
6464
height: '12px',
6565
borderRadius: '50%',
66+
minWidth: '12px',
6667
}}
6768
></Box>
6869
</Tooltip>

web-app/src/app/components/OfficialChip.tsx

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,38 @@ import { useTranslation } from 'react-i18next';
33
import { verificationBadgeStyle } from '../styles/VerificationBadge.styles';
44
import VerifiedIcon from '@mui/icons-material/Verified';
55

6-
export default function OfficialChip(): React.ReactElement {
6+
interface OfficialChipProps {
7+
isLongDisplay?: boolean;
8+
}
9+
10+
export default function OfficialChip({
11+
isLongDisplay = true,
12+
}: OfficialChipProps): React.ReactElement {
713
const { t } = useTranslation('feeds');
814
return (
915
<>
10-
<Tooltip title={t('officialFeedTooltip')} placement='top'>
11-
<Chip
12-
sx={verificationBadgeStyle}
13-
icon={<VerifiedIcon sx={{ fill: 'white' }}></VerifiedIcon>}
14-
label={t('officialFeed')}
15-
></Chip>
16-
</Tooltip>
16+
{isLongDisplay ? (
17+
<Tooltip title={t('officialFeedTooltip')} placement='top'>
18+
<Chip
19+
sx={verificationBadgeStyle}
20+
icon={<VerifiedIcon sx={{ fill: 'white' }}></VerifiedIcon>}
21+
label={t('officialFeed')}
22+
></Chip>
23+
</Tooltip>
24+
) : (
25+
<Tooltip title={t('officialFeedTooltipShort')} placement='top'>
26+
<VerifiedIcon
27+
sx={(theme) => ({
28+
display: 'block',
29+
borderRadius: '50%',
30+
padding: '0.1rem',
31+
ml: 0,
32+
mr: 2,
33+
...verificationBadgeStyle(theme),
34+
})}
35+
></VerifiedIcon>
36+
</Tooltip>
37+
)}
1738
</>
1839
);
1940
}

web-app/src/app/components/ThemeToggle.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const ThemeToggle = (): JSX.Element => {
77
const { toggleTheme } = useTheme();
88

99
return (
10-
<IconButton onClick={toggleTheme} color='inherit'>
10+
<IconButton onClick={toggleTheme} color='inherit' aria-label='Theme Toggle'>
1111
{localStorage.getItem('theme') === 'dark' ? (
1212
<Brightness7Icon />
1313
) : (

web-app/src/app/screens/Feed/FeedSummary.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import {
2121
import { type components } from '../../services/feeds/types';
2222
import { useTranslation } from 'react-i18next';
2323
import OpenInNewIcon from '@mui/icons-material/OpenInNew';
24-
import { getDataFeatureUrl } from '../../utils/consts';
24+
import { getFeatureComponentDecorators } from '../../utils/consts';
2525
import PublicIcon from '@mui/icons-material/Public';
2626
import DirectionsBusIcon from '@mui/icons-material/DirectionsBus';
2727
import LinkIcon from '@mui/icons-material/Link';
@@ -370,7 +370,10 @@ export default function FeedSummary({
370370
},
371371
}}
372372
onClick={() => {
373-
window.open(getDataFeatureUrl(feature), '_blank');
373+
window.open(
374+
getFeatureComponentDecorators(feature)?.linkToInfo,
375+
'_blank',
376+
);
374377
}}
375378
/>
376379
</Grid>

0 commit comments

Comments
 (0)