Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Geojson react #40

Merged
merged 192 commits into from
Mar 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
192 commits
Select commit Hold shift + click to select a range
c2dfad2
initial commit
lapim Jan 11, 2019
484055d
Added more logic (wip)
lapim Jan 15, 2019
80c3fdc
Merge branch 'master' of https://github.com/HSLdevcom/digitransit-ui …
lapim Jan 15, 2019
c2aec9c
Added more functionality and banner for leg departure cancellations
lapim Jan 18, 2019
38c9a6c
Small css fix
lapim Jan 21, 2019
d3b280d
Lint fix
lapim Jan 21, 2019
3c1f51f
Removed the tertiary for testing
lapim Jan 21, 2019
0aac133
Merged to master
lapim Jan 22, 2019
e72d6d2
Merge branch 'master' of https://github.com/HSLdevcom/digitransit-ui …
lapim Jan 25, 2019
48c0b7c
Merge branch 'master' into DT-2831
jolkkola Jan 25, 2019
d0f553e
Added validation improvements
lapim Jan 25, 2019
b6a2bb2
Merge branch 'DT-2831' of https://github.com/HSLdevcom/digitransit-ui…
lapim Jan 25, 2019
d185a04
Validation switched to array length instead of boolean
lapim Jan 25, 2019
fdfa34d
Included support for highlighting the disruptions tab for routes.
jolkkola Jan 25, 2019
37138b9
Fixed lint.
jolkkola Jan 28, 2019
3eaf740
Updated dependencies.
jolkkola Jan 28, 2019
0b5014d
Included a unit test for the caution mark highlight.
jolkkola Jan 28, 2019
1385941
Refactored the alerts functionality for routes and stops.
jolkkola Jan 28, 2019
2ea5dc4
Included alert texts.
jolkkola Jan 28, 2019
9f9c3b9
Added unit tests for the AlertList component.
jolkkola Jan 29, 2019
ecd4974
Improved unit tests.
jolkkola Jan 29, 2019
c9a9566
Prefer destructuring.
jolkkola Jan 29, 2019
79ae27c
Refactored the old service alert translation logic.
jolkkola Jan 29, 2019
0cf905b
Removed a useless, failing visual test.
jolkkola Jan 29, 2019
f85125c
Added handling for text with no language set.
jolkkola Jan 29, 2019
1e74fa1
Added store for banner handling
lapim Jan 29, 2019
f35bc8a
Fixed a bug in handling the expiration of alerts.
jolkkola Feb 1, 2019
1e65480
Added test, improved naming
lapim Feb 4, 2019
a2e39cb
Merge branch 'master' into DT-2831
jolkkola Feb 5, 2019
1ca2c0d
Merge branch 'master' into DT-2835-cancelations
jolkkola Feb 5, 2019
a7d88b9
Replaced piwik with Google Tag Manager
jussiviertola Feb 8, 2019
d09ad06
Merge branch 'master' into DT-2872
jussiviertola Feb 8, 2019
f6e382f
Support for custom popups when using POIs from geojson.
jolkkola Feb 8, 2019
0957aeb
Fix for geojson POIs not showing up when dragging the map.
jolkkola Feb 11, 2019
1353152
Added translation support for POI name, address and city.
jolkkola Feb 11, 2019
705ff31
Don't cache google font root
optionsome Feb 11, 2019
edff7b4
Merge pull request #2676 from HSLdevcom/font-cache-update
vesameskanen Feb 12, 2019
4e3e371
Add PR template with dod checklist
vesameskanen Feb 12, 2019
b5e5249
Fix typo
vesameskanen Feb 12, 2019
4882cda
Include review instructions into PR template
vesameskanen Feb 12, 2019
e4e4c68
Merge branch 'master' of https://github.com/hsldevcom/digitransit-ui
vesameskanen Feb 12, 2019
0e372a4
Improved comments.
jolkkola Feb 12, 2019
8e280d0
Update pull_request_template.md
vesameskanen Feb 12, 2019
99fc39d
Moved the marker to its own component.
jolkkola Feb 12, 2019
5f6caaa
Included unit tests for changes in geo-utils.
jolkkola Feb 12, 2019
5f18f98
Initialize window.dataLayer in init.js for unit tests
jussiviertola Feb 12, 2019
0e644fe
Merge pull request #2673 from HSLdevcom/DT-2872
vesameskanen Feb 14, 2019
f299572
Included unit tests for GenericMarker.
jolkkola Feb 18, 2019
529cbaa
Changed to set up only required globals.
jolkkola Feb 18, 2019
97f443b
Merged upstream changes from master.
jolkkola Feb 18, 2019
39317f9
Added unit tests for PointFeatureMarker.
jolkkola Feb 18, 2019
e57abcf
Added support for an external layer configuration.
jolkkola Feb 18, 2019
c84d4ec
Fixed unit test setup.
jolkkola Feb 18, 2019
876ad67
Included layer name mapping for external layers.
jolkkola Feb 19, 2019
b6145b4
Improved the unit tests for GeoJsonStore.
jolkkola Feb 19, 2019
1d739c4
Added unit tests for the GeoJSON component.
jolkkola Feb 19, 2019
d18a57b
Updated dependencies.
jolkkola Feb 20, 2019
537bce3
Added unit tests for changes in the MapWithTracking component.
jolkkola Feb 20, 2019
a07edc8
Included bounds in the unit test.
jolkkola Feb 20, 2019
a6394b1
Included unit tests for dynamic geojson layer retrieval.
jolkkola Feb 20, 2019
d65885f
Updated the documentation for geojson data sources.
jolkkola Feb 20, 2019
b401fb2
Included a test for icon generation.
jolkkola Feb 20, 2019
4b2c35f
Merged changes from branch DT-2835-cancelations.
jolkkola Feb 21, 2019
2c0decd
Merged changes from branch DT-2878.
jolkkola Feb 21, 2019
ab184c3
Updated the graphql schema.
jolkkola Feb 21, 2019
caa69b5
Merge pull request #2685 from HSLdevcom/DT-2878
vesameskanen Feb 21, 2019
6da62d6
Applied styling, no functional changes.
jolkkola Feb 21, 2019
5078252
Added info and caution icons to stop popups.
jolkkola Feb 21, 2019
60b1c22
Merge branch 'master' into DT-2834
jolkkola Feb 21, 2019
f44e431
Fixed lint and moved the header-icon style declarations.
jolkkola Feb 21, 2019
3a4396b
Merged upstream changes from master.
jolkkola Feb 21, 2019
0444398
Removed some useless visual tests.
jolkkola Feb 21, 2019
28a4c8e
Improved code functionality, adding visual tests (wip)
lapim Feb 22, 2019
ca88916
Updated the visual images for Firefox.
jolkkola Feb 22, 2019
9b58786
Fixed the canceled leg filtering
lapim Feb 22, 2019
63731c7
Merge branch 'DT-2831' of https://github.com/HSLdevcom/digitransit-ui…
lapim Feb 22, 2019
3d35f1b
Bumped Edge version to 17.
jolkkola Feb 22, 2019
6d4b331
Merge pull request #2651 from HSLdevcom/DT-2835-cancelations
vesameskanen Feb 22, 2019
76aa78e
Updated the visual images for Edge, again.
jolkkola Feb 22, 2019
54ff4fa
Merge branch 'master' into DT-2834
jolkkola Feb 22, 2019
2dfffb5
Updated tests
lapim Feb 22, 2019
5273725
Lint fix
lapim Feb 25, 2019
d508e46
removed duplicate properties
lapim Feb 25, 2019
b960d5c
Merge pull request #2689 from HSLdevcom/DT-2834
vesameskanen Feb 25, 2019
0525ccd
Reverted to old style
lapim Feb 25, 2019
332d4dd
Fix bug in stop timetable links
optionsome Feb 25, 2019
8f388f7
Remove unused printUrl prop
optionsome Feb 25, 2019
644e61a
Add test for stopPDFURL
optionsome Feb 25, 2019
15c9ff6
Fix lint and refactor
optionsome Feb 25, 2019
559a06c
Use mock config
optionsome Feb 25, 2019
9307ddd
Add more tests
optionsome Feb 25, 2019
5f7f5dd
Fix lint
optionsome Feb 25, 2019
cc56596
Initial version to support per-stop alert fetching on the map layers.
jolkkola Feb 25, 2019
382681d
Merge branch 'master' into DT-2844
jolkkola Feb 25, 2019
d5f3e3f
Update URL to contain tags
Feb 26, 2019
53a24dc
Included unit tests for stop alert status fetching and badge drawing.
jolkkola Feb 26, 2019
a19445d
Merge pull request #2694 from HSLdevcom/DT-2914
vesameskanen Feb 26, 2019
5219398
Included unit tests for drawing the alert badge.
jolkkola Feb 27, 2019
a1fbacc
Updated the unit test.
jolkkola Feb 27, 2019
c561635
Added unit tests for alert effect.
jolkkola Feb 27, 2019
0552267
Changed to use severity level instead of effect.
jolkkola Feb 27, 2019
922a4c7
Merge branch 'master' into DT-2831
jolkkola Feb 27, 2019
b0049a1
Merge pull request #2697 from HSLdevcom/DT-2844
vesameskanen Feb 28, 2019
d60f029
Don't use string interpolation in tampere configuration
vesameskanen Feb 28, 2019
fd4c8a7
Included helper functions for leg and itinerary.
jolkkola Feb 28, 2019
46879d4
Merge branch 'master' into DT-2831
jolkkola Feb 28, 2019
49dae59
Prefer desctructuring.
jolkkola Feb 28, 2019
fa10c53
Added unit tests for the new helpers.
jolkkola Feb 28, 2019
0191650
Use leg's native property instead of the computed one.
jolkkola Feb 28, 2019
85e39ae
Use the leg's realtimeState.
jolkkola Feb 28, 2019
b750e5a
Prefer destructuring.
jolkkola Feb 28, 2019
e8af9ba
Changed to use the helper function with realtimeState.
jolkkola Feb 28, 2019
17dd9e7
Updated the unit test and related data.
jolkkola Feb 28, 2019
7aff67a
Changed to use composition, revised unit tests.
jolkkola Feb 28, 2019
860d498
Removed stale css class.
jolkkola Feb 28, 2019
7040136
Simplify smoke test setup
vesameskanen Feb 28, 2019
d38f0b2
Updated the visual layout to match the design.
jolkkola Feb 28, 2019
71d52b0
Included a helper function and unit tests for intermediate leg cancel…
jolkkola Feb 28, 2019
1bab41d
Add smoke testing for all UI instances
vesameskanen Feb 28, 2019
903fe4d
Enable build in smoke tests
vesameskanen Feb 28, 2019
9783a83
+x
vesameskanen Feb 28, 2019
b1797a6
install before build
vesameskanen Feb 28, 2019
b509cdc
Wait server longer, control smoke tested browsers by env var
vesameskanen Mar 1, 2019
09657cb
Fetch chromedriver
vesameskanen Mar 1, 2019
848de70
Updated the failing visual tests.
jolkkola Mar 1, 2019
2cb07cb
Merge pull request #2644 from HSLdevcom/DT-2831
jolkkola Mar 1, 2019
d17b791
Added support for tile scaleratio on hidpi screens.
jolkkola Mar 1, 2019
f27ac12
Implemented support for showing an alert icon in the route stop view.
jolkkola Mar 1, 2019
c642fd6
Included a test for including the alert icon.
jolkkola Mar 1, 2019
7710d39
Included a no alerts case.
jolkkola Mar 1, 2019
3e90b07
Included an example of a canceled stoptime.
jolkkola Mar 1, 2019
c20f915
Added support for service alert icons for route stops.
jolkkola Mar 2, 2019
798a0a5
Added route stop alert handling for the route disruptions page.
jolkkola Mar 4, 2019
710978f
Improved route page alert icon logic.
jolkkola Mar 4, 2019
c42ae38
Added support for showing the alert icon due to stop alerts.
jolkkola Mar 4, 2019
095a888
Added handling to the alerts tab for stop-level service alerts.
jolkkola Mar 5, 2019
53b9391
Improved alert list ordering.
jolkkola Mar 5, 2019
8738260
Merge pull request #2701 from HSLdevcom/fix-alert-badge-size
vesameskanen Mar 5, 2019
db36d25
Merge branch 'master' into DT-2832
jolkkola Mar 5, 2019
db95d0b
Updated the failing visual tests.
jolkkola Mar 5, 2019
7cda87a
Limited the amount of disruptions shown in the alert tab.
jolkkola Mar 5, 2019
ac18d36
Included unit tests for showing the cancelation icon.
jolkkola Mar 6, 2019
1d9d661
Additional unit test.
jolkkola Mar 6, 2019
0c9a428
Merge pull request #2692 from HSLdevcom/fix-weekly-timetable
pailakka Mar 6, 2019
188e77e
Updated the unit tests to reflect changes in the data structure.
jolkkola Mar 6, 2019
7a150de
Retrieve alerts per route just once.
jolkkola Mar 6, 2019
c676d30
Updated the unit tests.
jolkkola Mar 6, 2019
68634cb
Smoke test which actually tests UI functionality
vesameskanen Mar 7, 2019
ceb8c8e
Fine tune
vesameskanen Mar 7, 2019
0ecdf95
Added the possibility to disable showing expired alerts.
jolkkola Mar 7, 2019
0fc7f29
Fix params
vesameskanen Mar 7, 2019
8d9de4b
Fine tune, add debug output
vesameskanen Mar 7, 2019
9823a48
tune
vesameskanen Mar 7, 2019
50dd4c1
Fix variables
vesameskanen Mar 7, 2019
4db101f
Output less, use yarn
vesameskanen Mar 7, 2019
c65a2ee
Cleanup
vesameskanen Mar 7, 2019
4f3347d
Fix env var name conflict, split test job into two
vesameskanen Mar 7, 2019
473807d
Restore fixed tampere conf.
vesameskanen Mar 7, 2019
09f55eb
Optimize parallel test execution to save time
vesameskanen Mar 8, 2019
48f3d74
Update docs to explain how to run smoke tests
vesameskanen Mar 8, 2019
fde5b70
Renamed disruptions in Finnish.
jolkkola Mar 8, 2019
7937e50
Merge pull request #2702 from HSLdevcom/DT-2832
vesameskanen Mar 8, 2019
1a899f3
Refactored the filtering logic.
jolkkola Mar 8, 2019
1ebe491
Try retrying smoke tests at nighwatch launch level
vesameskanen Mar 8, 2019
cd90082
Improved unit tests.
jolkkola Mar 8, 2019
6bddb30
FIx parallel test conflicts
vesameskanen Mar 8, 2019
453ced2
rememeber to build!
vesameskanen Mar 8, 2019
0d8d294
Fixed lint.
jolkkola Mar 8, 2019
1a39ccf
Merge pull request #2700 from HSLdevcom/fix-tre-conf
optionsome Mar 8, 2019
b05d7a9
Improved unit tests.
jolkkola Mar 8, 2019
43a6fdb
Merge branch 'master' into DT-2943
jolkkola Mar 8, 2019
d853089
test
vesameskanen Mar 11, 2019
48725f2
test more
vesameskanen Mar 11, 2019
434f104
Remove localIdentifier. It seems impossible to get it working.
vesameskanen Mar 11, 2019
b32f6cf
Test again parallel testing
vesameskanen Mar 11, 2019
75a9be5
localIndetifier is now set but parallel tests still fail. Disable par…
vesameskanen Mar 11, 2019
9a79133
Merge pull request #2705 from HSLdevcom/DT-2943
vesameskanen Mar 12, 2019
9a28198
Merge pull request #2708 from HSLdevcom/smoke
vesameskanen Mar 13, 2019
10733bf
Merge https://github.com/HSLdevcom/digitransit-ui/pull/2685
tomasmcm Mar 14, 2019
843376c
use popupContent for marker description
tomasmcm Mar 14, 2019
1a2a577
add cluster to react markers
tomasmcm Mar 14, 2019
281f4f0
comment line that breaks popups inside cluster
tomasmcm Mar 14, 2019
5ac4221
only display up to X number of markers
tomasmcm Mar 14, 2019
57b69e2
save zoom to variable
tomasmcm Mar 14, 2019
e154872
use name if address is not defined
tomasmcm Mar 14, 2019
41ae2a6
set default to include all markers
tomasmcm Mar 14, 2019
6e637c6
show description instead of address if available
tomasmcm Mar 15, 2019
f0aca36
add fallback for user name
tomasmcm Mar 15, 2019
f459052
add new variables to tests
tomasmcm Mar 15, 2019
b57ad05
Merge branch 'HSLdevcom/master' into geojson-react
tomasmcm Mar 15, 2019
02e2790
fix tests fail without correct locale
tomasmcm Mar 15, 2019
abbe5a5
fix geojson tests with cluster
tomasmcm Mar 15, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .gemini.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ module.exports = {
'browserstack.video': false,
},
},
edge15: {
edge17: {
windowSize: '600x1024',
desiredCapabilities: {
os: 'Windows',
os_version: '10',
browserName: 'edge',
version: '15',
version: '17.0',
locationContextEnabled: false,
'browserstack.timezone': 'Europe/Helsinki',
'browserstack.video': false,
Expand Down
19 changes: 19 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
## Proposed Changes

-

## Pull Request Check List

- A reasonable set of unit tests is included
- Console does not show new warnings/errors
- Changes are documented or they are self explanatory
- This pull request does not have any merge conflicts
- All existing tests pass in CI build
- Code coverage does not decrease (unless measured incorrectly)

## Review

- Read and verify the code changes
- Test the functionality by running the UI locally with all popular browsers available in your platform
- Check that the implementation matches the design, when such one is defined in a Jira issue
- Merge the pull request
18 changes: 7 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,18 @@ services:
jobs:
include:
- stage: test
env: LINT=1
env: LINT,UNIT,FLOW
node_js: '10'
script:
- yarn install
- yarn lint
- yarn test-coverage
- yarn test-report
- test/flow.sh
- stage: test
env: FLOW=1
env: _SMOKE=1
node_js: '10'
script: test/flow.sh
- stage: test
env: UNIT=1
node_js: '10'
script:
- yarn install
- yarn run test-coverage
- yarn run test-report
script: test/smoke.sh

- stage: visual
env: VISUAL=chrome
Expand All @@ -47,7 +43,7 @@ jobs:
node_js: '10'
script: test/visual.sh
- stage: visual
env: VISUAL=edge15
env: VISUAL=edge17
node_js: '10'
script: test/visual.sh
- stage: visual
Expand Down
3 changes: 3 additions & 0 deletions app/action/CanceledLegsBarActions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default function updateShowCanceledLegsBannerState(actionContext, val) {
actionContext.dispatch('updateShowCanceledLegsBannerState', val);
}
2 changes: 2 additions & 0 deletions app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import TimeStore from './store/TimeStore';
import FavouriteCityBikeStationStore from './store/FavouriteCityBikeStationStore';
import MapLayerStore from './store/MapLayerStore';
import GeoJsonStore from './store/GeoJsonStore';
import CanceledLegsBarStore from './store/CanceledLegsBarStore';

export default config => {
const app = new Fluxible({
Expand All @@ -33,6 +34,7 @@ export default config => {
app.registerStore(FavouriteCityBikeStationStore);
app.registerStore(MapLayerStore);
app.registerStore(GeoJsonStore);
app.registerStore(CanceledLegsBarStore);

app.plug({
name: 'extra-context-plugin',
Expand Down
216 changes: 216 additions & 0 deletions app/component/AlertList.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,216 @@
import connectToStores from 'fluxible-addons-react/connectToStores';
import PropTypes from 'prop-types';
import React from 'react';
import { FormattedMessage } from 'react-intl';

import ComponentUsageExample from './ComponentUsageExample';
import RouteAlertsRow from './RouteAlertsRow';
import { alertHasExpired } from '../util/alertUtils';
import { routeNameCompare } from '../util/searchUtils';
import { AlertSeverityLevelType } from '../constants';

/**
* Compares the given alerts in order to sort them.
*
* @param {*} a the first alert to compare.
* @param {*} b the second alert to compare.
*/
export const alertCompare = (a, b) => {
// sort by expiration status
if (a.expired !== b.expired) {
return a.expired ? 1 : -1;
}

// sort by missing route information (for stop level alerts)
if (!a.route || !a.route.shortName) {
return -1;
}

// sort by route information
const routeOrder = routeNameCompare(a.route, b.route);
if (routeOrder !== 0) {
return routeOrder;
}

// sort by alert validity period
return b.validityPeriod.startTime - a.validityPeriod.startTime;
};

const AlertList = ({
cancelations,
currentTime,
showExpired,
serviceAlerts,
}) => {
const currentUnixTime = Number.isInteger(currentTime)
? currentTime
: currentTime.unix();

const alerts = (Array.isArray(cancelations) ? cancelations : [])
.concat(Array.isArray(serviceAlerts) ? serviceAlerts : [])
.map(alert => ({
...alert,
expired: alertHasExpired(alert.validityPeriod, currentUnixTime),
}))
.filter(alert => (showExpired ? true : !alert.expired));

if (alerts.length === 0) {
return (
<div className="stop-no-alerts-container">
<FormattedMessage
id="disruption-info-no-alerts"
defaultMessage="No known disruptions or diversions."
/>
</div>
);
}

return (
<div className="momentum-scroll">
<div className="route-alerts-list">
{alerts
.sort(alertCompare)
.map(
({
description,
header,
expired,
route: { color, mode, shortName } = {},
severityLevel,
validityPeriod: { startTime, endTime },
}) => (
<RouteAlertsRow
color={color ? `#${color}` : null}
description={description}
expired={expired}
header={header}
key={`alert-${startTime}-${endTime}-${shortName}-${severityLevel}`}
routeLine={shortName}
routeMode={mode && mode.toLowerCase()}
severityLevel={severityLevel}
/>
),
)}
</div>
</div>
);
};

const alertShape = PropTypes.shape({
description: PropTypes.string,
header: PropTypes.oneOfType([PropTypes.node, PropTypes.string]),
route: PropTypes.shape({
color: PropTypes.string,
mode: PropTypes.string,
shortName: PropTypes.string,
}),
severityLevel: PropTypes.string,
validityPeriod: PropTypes.shape({
startTime: PropTypes.number.isRequired,
endTime: PropTypes.number,
}).isRequired,
});

AlertList.propTypes = {
currentTime: PropTypes.oneOfType([
PropTypes.shape({ unix: PropTypes.func.isRequired }),
PropTypes.number,
]).isRequired,
cancelations: PropTypes.arrayOf(alertShape),
serviceAlerts: PropTypes.arrayOf(alertShape),
showExpired: PropTypes.bool,
};

AlertList.defaultProps = {
cancelations: [],
serviceAlerts: [],
showExpired: false,
};

AlertList.description = (
<React.Fragment>
<ComponentUsageExample>
<AlertList
currentTime={15}
cancelations={[
{
header:
'Bussin 3A lähtö Lentävänniemi–Etelä-Hervanta kello 10:49 on peruttu',
route: {
mode: 'BUS',
shortName: '3A',
},
severityLevel: AlertSeverityLevelType.Warning,
validityPeriod: { startTime: 20, endTime: 30 },
},
{
header:
'Bussin 28B lähtö Laatokantie–Ruutana kello 10:44 on peruttu',
route: {
mode: 'BUS',
shortName: '28B',
},
severityLevel: AlertSeverityLevelType.Warning,
validityPeriod: { startTime: 10, endTime: 20 },
},
{
header:
'Bussin 28B lähtö Laatokantie–Ruutana kello 10:25 on peruttu',
route: {
mode: 'BUS',
shortName: '28B',
},
severityLevel: AlertSeverityLevelType.Warning,
validityPeriod: { startTime: 1, endTime: 11 },
},
{
header: 'Bussin 80 lähtö Moisio–Irjala kello 10:45 on peruttu',
route: {
mode: 'BUS',
shortName: '80',
},
severityLevel: AlertSeverityLevelType.Warning,
validityPeriod: { startTime: 11, endTime: 21 },
},
{
header: 'Bussin 80 lähtö Moisio–Irjala kello 10:24 on peruttu',
route: {
mode: 'BUS',
shortName: '80',
},
severityLevel: AlertSeverityLevelType.Warning,
validityPeriod: { startTime: 0, endTime: 10 },
},
]}
serviceAlerts={[
{
header: 'Pysäkki Rantatie (1007) toistaiseksi pois käytöstä',
description:
'Pysäkki Rantatie (1007) toistaiseksi pois käytöstä työmaan vuoksi.',
route: {},
severityLevel: AlertSeverityLevelType.Warning,
validityPeriod: { startTime: 10, endTime: 20 },
},
{
header: 'Pysäkillä Rantatie (1007) lisävuoroja',
description:
'Pysäkillä Rantatie (1007) on lisävuoroja yleisötapahtuman vuoksi.',
route: {},
severityLevel: AlertSeverityLevelType.Info,
validityPeriod: { startTime: 0, endTime: 10 },
},
]}
/>
</ComponentUsageExample>
</React.Fragment>
);

const connectedComponent = connectToStores(
AlertList,
['TimeStore'],
context => ({
currentTime: context.getStore('TimeStore').getCurrentTime(),
}),
);

export { connectedComponent as default, AlertList as Component };
2 changes: 2 additions & 0 deletions app/component/AppBarLarge.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import Icon from './Icon';
import ComponentUsageExample from './ComponentUsageExample';
import LangSelect from './LangSelect';
import MessageBar from './MessageBar';
import CanceledLegsBar from './CanceledLegsBar';
import LogoSmall from './LogoSmall';
import AuthButton from './AuthButton';

Expand Down Expand Up @@ -68,6 +69,7 @@ const AppBarLarge = (
</div>
<MessageBar />
<DisruptionInfo />
<CanceledLegsBar />
</div>
);
};
Expand Down
2 changes: 2 additions & 0 deletions app/component/AppBarSmall.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import ComponentUsageExample from './ComponentUsageExample';
import MessageBar from './MessageBar';
import LogoSmall from './LogoSmall';
import AuthButton from './AuthButton';
import CanceledLegsBar from './CanceledLegsBar';

const AppBarSmall = ({ disableBackButton, showLogo, title, homeUrl, logo }) => (
<React.Fragment>
Expand All @@ -21,6 +22,7 @@ const AppBarSmall = ({ disableBackButton, showLogo, title, homeUrl, logo }) => (
<MainMenuContainer homeUrl={homeUrl} />
</nav>
<MessageBar />
<CanceledLegsBar />
</React.Fragment>
);

Expand Down
2 changes: 1 addition & 1 deletion app/component/AuthButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class AuthButton extends React.Component {
targetOrigin={{ horizontal: 'right', vertical: 'top' }}
iconButtonElement={AvatarFallback(
authUser.photoURL,
authUser.displayName,
authUser.displayName || '',
)}
>
{navMenuButton(
Expand Down
Loading