Skip to content

Commit ec74fa1

Browse files
authored
Merge branch 'main' into feat/issue-1161
2 parents 3271858 + 8af77cc commit ec74fa1

File tree

13 files changed

+74
-55
lines changed

13 files changed

+74
-55
lines changed

.all-contributorsrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,4 +245,4 @@
245245
"contributions": ["code"]
246246
}
247247
]
248-
}
248+
}

.prettierignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
**/generated/*
2-
README.md
2+
.all-contributorsrc

.stylelintrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "stylelint-config-standard-scss",
2+
"extends": ["stylelint-config-standard-scss", "stylelint-prettier/recommended"],
33
"ignoreFiles": [
44
"node_modules/**/*",
55
"dist/**/*",

README.md

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,69 @@
11
# Open bus ranking app
22

33
## Welcome!
4+
45
This is the official repository of the open bus (תחב"צ פתוחה / דאטאבוס) project - also known as "ShameBus".
56
[link to the project](https://open-bus-map-search.hasadna.org.il/dashboard)
67

78
Please feel free to submit pull requests and contribute to the project.
89
For more details about contributing, see the [CONTRIBUTING.md](CONTRIBUTING.md) file.
910

1011
# Running the project locally
12+
1113
An explanation how to run the project locally you can [read here](CONTRIBUTING.md#running-the-project-on-a-local-environment).
1214

1315
## View video (Hebrew language):
14-
### The video will explain you how to contribute to the project:
16+
17+
### The video will explain you how to contribute to the project:
18+
1519
[![video (hebrew) about the project](https://img.youtube.com/vi/6H6jkJCVhgk/0.jpg)](https://www.youtube.com/watch?v=6H6jkJCVhgk)
1620

1721
# Easter eggs
22+
1823
We've hidden a couple of fun surprises in our web app, just for you. Discovering them is as easy as typing a few magic words on your keyboard.
1924

2025
## How to Find the Easter Eggs
26+
2127
1. Open our [web app](https://open-bus-map-search.hasadna.org.il/dashboard)
2228
2. **Unleash the Magic Words:**
2329
To reveal the hidden gems, use your keyboard to type the following commands:
24-
2530
- **Type "storybook":**
2631
Watch the magic unfold as you type "storybook" on your keyboard. You might just stumble upon our Storybook, a treasure trove of UI components showcasing the beauty and functionality of our app.
2732
- **Type "geek":**
2833
To get some experimental charts with some additional data and aggregation
2934

30-
3135
## deployments
3236

3337
This app is created by the volunteers of [Public Knowledge Workshop](https://www.hasadna.org.il/)
3438

3539
### submitting pull requests
40+
3641
Thanks for your willingness to invest time and help us improve!
42+
3743
1. If you're new to GitHub, here is a [tutorial describing Pull Requests](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request). if you're familiarized with Merge Requests - it's the same concept.
3844
2. Please make sure that the project works on your computer
3945
3. Please tag one of the maintainers as reviewers
40-
we're here to help! feel free to join our [Slack channel](https://join.slack.com/t/hasadna/shared_invite/zt-21qipktl1-7yF4FYJVxAqXl0wE4DlMKQ)
46+
we're here to help! feel free to join our [Slack channel](https://join.slack.com/t/hasadna/shared_invite/zt-21qipktl1-7yF4FYJVxAqXl0wE4DlMKQ)
4147

4248
## Links for developers
43-
* [figma file](https://www.figma.com/file/Plw8Uuu6U96CcX5tJyRMoW/Public-Transportation-visual-informaiton?node-id=0%3A1&t=EJCQpeg5zSbVXLUx-0)
44-
* [data model schema](https://github.com/hasadna/open-bus-stride-db/blob/main/DATA_MODEL.md)
45-
* [Slack channel](https://join.slack.com/t/hasadna/shared_invite/zt-21qipktl1-7yF4FYJVxAqXl0wE4DlMKQ)
46-
* [Swagger](https://open-bus-stride-api.hasadna.org.il/docs)
47-
* [Production](https://open-bus-map-search.hasadna.org.il/dashboard)
4849

49-
## Related Repositories
50+
- [figma file](https://www.figma.com/file/Plw8Uuu6U96CcX5tJyRMoW/Public-Transportation-visual-informaiton?node-id=0%3A1&t=EJCQpeg5zSbVXLUx-0)
51+
- [data model schema](https://github.com/hasadna/open-bus-stride-db/blob/main/DATA_MODEL.md)
52+
- [Slack channel](https://join.slack.com/t/hasadna/shared_invite/zt-21qipktl1-7yF4FYJVxAqXl0wE4DlMKQ)
53+
- [Swagger](https://open-bus-stride-api.hasadna.org.il/docs)
54+
- [Production](https://open-bus-map-search.hasadna.org.il/dashboard)
55+
56+
## Related Repositories
57+
5058
- the API client
5159
- the data API
5260

5361
### API client
62+
5463
The client is a JS library that provides methods and data models. for example:
55-
https://github.com/hasadna/open-bus-map-search/blob/main/src/model/busStop.ts#L4
64+
https://github.com/hasadna/open-bus-map-search/blob/main/src/model/busStop.ts#L4
5665
[link to repo](https://github.com/iliakap/open-bus-stride-client).
5766

58-
5967
## Contributors
6068

6169
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
@@ -116,7 +124,8 @@ https://github.com/hasadna/open-bus-map-search/blob/main/src/model/busStop.ts#L4
116124
<!-- ALL-CONTRIBUTORS-LIST:END -->
117125

118126
### data API
127+
119128
The API is backend code that provides us with data and aggregations from the DB
120-
You can see it's endpoints here:
121-
https://open-bus-stride-api.hasadna.org.il/docs
122-
[link to repo](https://github.com/hasadna/open-bus-stride-api).
129+
You can see it's endpoints here:
130+
https://open-bus-stride-api.hasadna.org.il/docs
131+
[link to repo](https://github.com/hasadna/open-bus-stride-api).

eslint.config.js

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,9 @@ export default [
2424
'test-results',
2525
'playwright-report',
2626
'storybook-static',
27+
'public',
2728
'.nx',
28-
'jest.config.ts',
2929
'**/*.js',
30-
'public',
3130
'applitools.config.cjs',
3231
],
3332
},
@@ -41,7 +40,10 @@ export default [
4140
},
4241
},
4342
{
44-
settings: { 'import/resolver': { typescript: true }, react: { version: 'detect' } },
43+
settings: {
44+
'import/resolver': { typescript: true },
45+
react: { version: 'detect' },
46+
},
4547
languageOptions: {
4648
parser: typescriptEslintParser,
4749
parserOptions: {
@@ -54,34 +56,23 @@ export default [
5456
},
5557
{
5658
rules: {
57-
...typescriptEslintEslintPlugin.configs.recommended.rules,
58-
...typescriptEslintEslintPlugin.configs['recommended-requiring-type-checking'].rules,
59-
...eslintPluginReact.configs.recommended.rules,
59+
// React
6060
'react-hooks/rules-of-hooks': 'error',
6161
'react/jsx-filename-extension': [1, { extensions: ['.tsx'] }],
6262
'react/react-in-jsx-scope': 'off',
63+
// TypeScript
6364
'@typescript-eslint/no-explicit-any': 'warn',
6465
'@typescript-eslint/no-unsafe-call': 'off',
6566
'@typescript-eslint/no-unsafe-member-access': 'off',
6667
'@typescript-eslint/no-floating-promises': 'off',
6768
'@typescript-eslint/restrict-template-expressions': 'off',
6869
'@typescript-eslint/no-base-to-string': 'off',
6970
'@typescript-eslint/no-unsafe-assignment': 'off',
71+
// Import
7072
'import/no-unused-modules': 'error',
7173
'import/order': 'error',
72-
'prettier/prettier': [
73-
'error',
74-
{
75-
semi: false,
76-
tabWidth: 2,
77-
printWidth: 100,
78-
singleQuote: true,
79-
trailingComma: 'all',
80-
bracketSameLine: true,
81-
jsxSingleQuote: false,
82-
endOfLine: 'auto',
83-
},
84-
],
74+
// Prettier
75+
'prettier/prettier': 'error',
8576
},
8677
},
8778
]

package-lock.json

Lines changed: 23 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"@emotion/react": "^11.14.0",
88
"@emotion/styled": "^11.14.0",
99
"@mui/icons-material": "^7.1.0",
10-
"@mui/material": "^7.1.1",
10+
"@mui/material": "^7.1.2",
1111
"@mui/x-date-pickers": "^7.29.2",
1212
"@mui/x-tree-view": "^8.5.1",
1313
"@tanstack/query-sync-storage-persister": "^5.81.2",
@@ -59,8 +59,8 @@
5959
"test:e2e": "cross-env APPLITOOLS_BATCH_ID=`uuidgen` playwright test",
6060
"test:unit": "jest",
6161
"test:unit:ci": "jest --coverage",
62-
"lint": "eslint --max-warnings 0 && stylelint '**/*.{css,scss}' --max-warnings 0",
63-
"lint:fix": "eslint --fix && stylelint '**/*.{css,scss}' --fix",
62+
"lint": "eslint --max-warnings 0 && stylelint '**/*.{css,scss}' --max-warnings 0 && prettier . -c -u",
63+
"lint:fix": "eslint --fix && stylelint '**/*.{css,scss}' --fix && prettier . -w -u",
6464
"storybook": "storybook dev -p 6006",
6565
"build-storybook": "nx exec -- storybook build",
6666
"_build": "tsc && vite build",
@@ -126,10 +126,11 @@
126126
"jsdom": "^26.1.0",
127127
"nx": "21.0.3",
128128
"playwright-advanced-har": "^1.3.3",
129-
"prettier": "^3.5.3",
129+
"prettier": "^3.6.1",
130130
"storybook": "^9.0.10",
131131
"stylelint": "^16.20.0",
132132
"stylelint-config-standard-scss": "^15.0.1",
133+
"stylelint-prettier": "^5.0.3",
133134
"ts-jest": "^29.4.0",
134135
"ts-node": "^10.9.2",
135136
"typescript-eslint": "^8.32.0",

src/complaint/README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
# MOT Complaint Maker
22

33
## NOTICE
4+
45
this project is still under development - it won't really send any reports to the MOT website.
56

67
## Goal
8+
79
After searching for specific bus in one of the pages, users might wasnt to submit a complaint about a bus:
810

9-
* maybe the bus came too early / too late
10-
* maybe it didn't stop at all
11-
* maybe the bus driver had a yellow T-shirt
12-
and so on.
11+
- maybe the bus came too early / too late
12+
- maybe it didn't stop at all
13+
- maybe the bus driver had a yellow T-shirt
14+
and so on.
1315

1416
anyway - we would like to make complaints submission accessible and easy, instead of the dark UX we currently have.
1517

1618
## usefull commands
19+
1720
build the image - `npm run docker:build`
1821
run the image (won't really send anything to the MOT) - `npm run docker:run`
1922
see the report - `npm run view-trace`

src/locale/he.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"timeline_page_title": "היסטוריית נסיעות",
1616
"timeline_page_description": "תצוגה של זמני עצירה בתחנות לפי חברה מפעילה, מספר קו ותחנה. השוואה בין שעת העצירה בפועל לעומת שעת העצירה המתוכננת",
1717
"time_based_map_page_title": "מפה לפי זמן",
18-
"time_based_map_page_description": "תצוגה של מיקום כל האוטובוסים בתאריך, שעה וטווח הדקות שהוכנסו ע\"י המשתמש",
18+
"time_based_map_page_description": "מיקומים של כלי תחבורה ציבורית בארץ לפי תאריך ושעה. משיקולי ביצועים, הגדרנו את ברירת המחדל של הדף ליום הפאי של 2023. מוזמנים לשחק עם התאריך והשעה ולטייל בזמן ⌛🚌",
1919
"gaps_page_title": "נסיעות שלא בוצעו",
2020
"gaps_page_description": "תצוגה של כל הנסיעות שלא יצאו כמתוכנן לפי חברה מפעילה, קו, מסלול ותאריך",
2121
"gaps_patterns_page_title": "דפוסי נסיעות שלא בוצעו",

src/pages/BugReportForm .tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ const BugReportForm = () => {
8686
<Form
8787
form={form}
8888
name="bug-report"
89-
// eslint-disable-next-line @typescript-eslint/no-misused-promises
9089
onFinish={onFinish}
9190
onFinishFailed={onFinishFailed}
9291
labelCol={{ span: 6 }}

src/pages/components/Preloader.stories.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ let promise: Promise<void> | null = null
4949

5050
const useTimeout = (ms: number) => {
5151
if (!fulfilled) {
52-
// eslint-disable-next-line @typescript-eslint/only-throw-error
5352
throw (promise ||= new Promise((resolve) => {
5453
setTimeout(() => {
5554
fulfilled = true

src/pages/components/map-related/MapLayers/BusToolTip.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ export function BusToolTip({ position, icon, children }: BusToolTipProps) {
112112
<li>
113113
{`${t('sample_time')}: `}
114114
<span>
115-
{/* eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion */}
116115
{dayjs(position.point!.recorded_at_time as string)
117116
.tz('Israel')
118117
.format(`l [${t('at_time')}] LT`)}

tests/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-return */
1+
/* eslint-disable @typescript-eslint/no-explicit-any */
22
import * as fs from 'fs'
33
import * as path from 'path'
44
import * as crypto from 'crypto'

0 commit comments

Comments
 (0)