entur / shamash Goto Github PK
View Code? Open in Web Editor NEWIn-browser IDE for exploring Entur GraphQL APIs
Home Page: https://api.entur.io/graphql-explorer/journey-planner-v3
In-browser IDE for exploring Entur GraphQL APIs
Home Page: https://api.entur.io/graphql-explorer/journey-planner-v3
Today we support light and dark modes which can be toggled with a button in the menu. See pic:
We should also support the cool prefers-color-scheme CSS media feature which detects the user's theme preference set in the operating system.
Today's theme preference is saved in localStorage
. The logic for setting happens on page load in App.js:
let logo
if (window.localStorage.getItem('theme') === 'dark') {
require('../css/darktheme.css')
logo = require('../static/img/entur-white.png')
} else {
logo = require('../static/img/entur.png')
}
The darktheme.css
stylesheet is loaded if "dark theme" is set in localStorage. The button for switching theme simply updates localStorage.
I'm not sure what's the best way of implementing this is, but if you would want to have a go at it, feel free! ๐
App.js is a class component using deprecated lifecycle methods (componentWillMount
). It would be nice to rewrite it as a function component with React hooks.
There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.
Error type: Failed to decrypt field npmToken. Please re-encrypt and try again.
This is a Node.js and React project. Having TypeScript would be very nice.
A pull request would be greatly appreciated, that
tsconfig.js
)This project does have a Node.js server, but it has no build (transpilation/compilation) step. Therefore it is sufficient to only consider the React frontend part for now.
The React app is based on Create React App, and therefore the react-scripts
package is used for building and running it.
add origin of the name shamash
, please? :-)
We should add ESLint in order to ensure basic code quality and consistency. The ESLint config should extend eslint:recommended
and recommended rules for React.
Other rules
Let's also add a script in package.json so we can use npm run lint
for running ESLint.
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
Warning
These dependencies are deprecated:
Datasource | Name | Replacement PR? |
---|---|---|
npm | babel-eslint |
|
npm | subscriptions-transport-ws |
These updates are currently rate-limited. Click on a checkbox below to force their creation now.
babel-jest
, jest
, jest-circus
, jest-resolve
)react
, react-dom
, react-test-renderer
)@testing-library/jest-dom
, @testing-library/react
, @testing-library/user-event
)@turf/bbox
, @turf/helpers
, @turf/line-to-polygon
)@typescript-eslint/eslint-plugin
, @typescript-eslint/parser
)These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
actions/download-artifact
, actions/upload-artifact
)@entur/form
, @entur/icons
, @entur/sdk
).github/workflows/firebase-hosting-merge.yml
actions/checkout v3
actions/setup-node v3
actions/cache v3
actions/upload-artifact v3
actions/checkout v3
actions/download-artifact v3
FirebaseExtended/action-hosting-deploy v0
actions/checkout v3
actions/download-artifact v3
FirebaseExtended/action-hosting-deploy v0
actions/checkout v3
actions/download-artifact v3
FirebaseExtended/action-hosting-deploy v0
.github/workflows/firebase-hosting-pull-request.yml
actions/checkout v3
actions/setup-node v3
actions/cache v3
actions/upload-artifact v3
actions/checkout v3
actions/download-artifact v3
FirebaseExtended/action-hosting-deploy v0
package.json
@apollo/client 3.10.3
@babel/core 7.24.5
@entur/form 3.4.7
@entur/icons 1.20.0
@entur/sdk 1.11.1
@entur/table 4.8.7
@mapbox/polyline 1.2.1
@pmmmwh/react-refresh-webpack-plugin 0.5.13
@svgr/webpack 5.5.0
@testing-library/jest-dom 4.2.4
@testing-library/react 9.5.0
@testing-library/user-event 7.2.1
@turf/bbox 6.5.0
@turf/helpers 6.5.0
@turf/line-to-polygon 6.5.0
@typescript-eslint/eslint-plugin 4.33.0
@typescript-eslint/parser 4.33.0
babel-eslint 10.1.0
babel-jest 26.6.3
babel-loader 8.3.0
babel-plugin-named-asset-import 0.3.8
babel-preset-react-app 10.0.1
bfj 7.1.0
camelcase 6.3.0
case-sensitive-paths-webpack-plugin 2.4.0
css-loader 4.3.0
dotenv 8.6.0
dotenv-expand 5.1.0
enzyme 3.11.0
enzyme-adapter-react-16 1.15.8
eslint 7.32.0
eslint-config-react-app 6.0.0
eslint-plugin-flowtype 5.10.0
eslint-plugin-import 2.29.1
eslint-plugin-jest 24.7.0
eslint-plugin-jsx-a11y 6.8.0
eslint-plugin-react 7.34.1
eslint-plugin-react-hooks 4.6.2
eslint-plugin-testing-library 3.10.2
eslint-webpack-plugin 2.7.0
file-loader 6.2.0
fs-extra 9.1.0
graphiql 1.11.5
graphiql-explorer 0.9.0
graphql 15.8.0
graphql-ws 5.16.0
history 4.10.1
html-webpack-plugin 4.5.2
husky 3.1.0
identity-obj-proxy 3.0.0
isomorphic-fetch 2.2.1
jest 26.6.3
jest-circus 26.6.3
jest-resolve 26.6.2
jest-watch-typeahead 0.6.5
leaflet 1.9.4
lint-staged 9.5.0
lodash.debounce 4.0.8
mini-css-extract-plugin 0.12.0
optimize-css-assets-webpack-plugin 5.0.8
pnp-webpack-plugin 1.7.0
postcss-flexbugs-fixes 4.2.1
postcss-loader 3.0.0
postcss-normalize 8.0.1
postcss-preset-env 6.7.2
postcss-safe-parser 5.0.2
prompts 2.4.2
query-string 6.14.1
react 16.14.0
react-app-polyfill 2.0.0
react-dev-utils 11.0.4
react-dom 16.14.0
react-helmet 5.2.1
react-leaflet 3.2.5
react-refresh 0.14.2
react-test-renderer 16.14.0
resolve 1.22.8
resolve-url-loader 3.1.5
sass-loader 10.5.2
semver 7.6.2
style-loader 1.3.0
subscriptions-transport-ws 0.11.0
terser-webpack-plugin 4.2.3
ts-pnp 1.2.0
url-loader 4.1.1
uuid 3.4.0
webpack 4.47.0
webpack-dev-server 3.11.3
webpack-manifest-plugin 2.2.0
workbox-webpack-plugin 5.1.4
eslint-plugin-prettier 3.4.1
prettier 2.8.8
I highly doubt this is the exact right repo for this (more likely in the openjourneyplanner or just the underlying docs depending on your perspective), but in the docs in the sidebar in shamash one can read the following :
transportModes: [TransportModes]
The allowed modes for the transit part of the trip. Use an empty list to disallow transit for this search. If the element is not present or null, it will default to all transport modes.
If attempting the following query:
{
trip(
from: {
name: "Bjerkealleen 5A, Skedsmo"
coordinates: {
latitude: 59.96050414081307
longitude:11.040338686322317
}
}
to: {
place:"NSR:StopPlace:385"
name:"Alna, Oslo"
}
numTripPatterns: 3
dateTime: "2023-09-25T16:35:26.652807"
walkSpeed: 1.3
arriveBy: false
modes: {
transportModes: null
}
)
#### Requested fields
{
tripPatterns {
expectedStartTime
duration
walkDistance
legs {
mode
distance
line {
id
publicCode
}
}
}
}
}
then i get the following response:
{
"errors": [
{
"message": "Exception while fetching data (/trip) : Cannot invoke \"java.util.List.isEmpty()\" because \"transportModes\" is null",
"locations": [
{
"line": 20,
"column": 3
}
],
"path": [
"trip"
],
"extensions": {
"classification": "DataFetchingException"
}
}
],
"data": null
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.