Skip to content

Commit 10f260c

Browse files
authored
feat: implement improvements
feat: add improvements
2 parents ed48e2f + 5c5df1f commit 10f260c

Some content is hidden

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

60 files changed

+3432
-5897
lines changed

.github/workflows/cypress.yml

Lines changed: 0 additions & 73 deletions
This file was deleted.

cypress.config.ts

Lines changed: 0 additions & 29 deletions
This file was deleted.

cypress/tsconfig.json

Lines changed: 0 additions & 10 deletions
This file was deleted.

eslint.config.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ export default [
3939
'airbnb-typescript',
4040
'plugin:import/typescript',
4141
'prettier',
42-
'plugin:cypress/recommended',
4342
'plugin:react/recommended',
4443
'plugin:react-hooks/recommended',
4544
'plugin:@typescript-eslint/recommended',

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
/>
2222
<title>Coral Bleaching</title>
2323
</head>
24-
<body>
24+
<body style="overflow: hidden">
2525
<div id="root"></div>
2626
<script type="module" src="src/main.tsx"></script>
2727
</body>

package.json

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"author": "Graasp",
66
"contributors": [
77
"Basile Spaenlehauer",
8-
"Jérémy La Scala"
8+
"Jérémy La Scala",
9+
"Kim Lan Phan Hoang"
910
],
1011
"homepage": ".",
1112
"type": "module",
@@ -15,13 +16,13 @@
1516
"@mui/icons-material": "7.0.2",
1617
"@mui/lab": "7.0.0-beta.11",
1718
"@mui/material": "7.0.2",
18-
"@sentry/react": "9.12.0",
1919
"@tanstack/react-query": "^5.81.2",
2020
"@tanstack/react-query-devtools": "^5.81.2",
2121
"@types/node": "22.14.1",
2222
"@types/react": "19.1.2",
2323
"@types/react-dom": "19.1.2",
2424
"i18next": "^23.16.8",
25+
"lodash.groupby": "^4.6.0",
2526
"motion": "^12.9.4",
2627
"react": "19.1.0",
2728
"react-dom": "19.1.0",
@@ -41,42 +42,36 @@
4142
"preview:test": "yarn vite preview --mode test",
4243
"postinstall": "husky install",
4344
"lint": "eslint .",
44-
"prettier:write": "prettier {src,cypress}/**/*.{ts,tsx,js,jsx} --write",
45-
"prettier:check": "prettier {src,cypress}/**/*.{ts,tsx,js,jsx} --check",
45+
"prettier:write": "prettier src/**/*.{ts,tsx,js,jsx} --write",
46+
"prettier:check": "prettier src/**/*.{ts,tsx,js,jsx} --check",
4647
"type-check": "tsc --noEmit",
4748
"check": "yarn lint && yarn prettier:check && yarn type-check",
4849
"hooks:install": "husky install",
4950
"hooks:uninstall": "husky uninstall",
50-
"pre-commit": "yarn prettier:check && yarn lint",
51-
"cypress:open": "env-cmd -f ./.env.test cypress open",
52-
"test": "concurrently -k -s first \"yarn start:test\" \"yarn test:ci\" ",
53-
"test:ci": "env-cmd -f ./.env.test cypress run --browser chrome --headless && nyc report --reporter=text --reporter=text-summary",
54-
"cov:report": "open ./coverage/lcov-report/index.html"
51+
"pre-commit": "yarn prettier:check && yarn lint"
5552
},
5653
"devDependencies": {
5754
"@commitlint/cli": "19.8.0",
5855
"@commitlint/config-conventional": "19.8.0",
59-
"@cypress/code-coverage": "3.14.0",
6056
"@eslint/compat": "^1.2.0",
6157
"@eslint/eslintrc": "^3.1.0",
6258
"@eslint/js": "^9.12.0",
6359
"@trivago/prettier-plugin-sort-imports": "^5.2.2",
6460
"@types/i18n": "0.13.12",
61+
"@types/lodash.groupby": "^4.6.9",
6562
"@types/uuid": "10.0.0",
6663
"@typescript-eslint/eslint-plugin": "7.18.0",
6764
"@typescript-eslint/parser": "7.18.0",
6865
"@vitejs/plugin-react": "^4.4.0",
6966
"axios": "1.7.7",
7067
"concurrently": "8.2.2",
71-
"cypress": "14.3.0",
7268
"env-cmd": "10.1.0",
7369
"eslint": "8.57.1",
7470
"eslint-config-airbnb": "19.0.4",
7571
"eslint-config-airbnb-typescript": "^18.0.0",
7672
"eslint-config-prettier": "9.1.0",
7773
"eslint-config-react-app": "7.0.1",
7874
"eslint-import-resolver-typescript": "^3.6.1",
79-
"eslint-plugin-cypress": "2.15.2",
8075
"eslint-plugin-import": "2.30.0",
8176
"eslint-plugin-jsx-a11y": "6.10.0",
8277
"eslint-plugin-prettier": "5.2.1",

renovate.json

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
11
{
22
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3-
"extends": [
4-
"github>graasp/renovate-config:app"
5-
],
3+
"extends": ["github>graasp/renovate-config:app"],
64
"packageRules": [
75
{
86
"matchDepTypes": ["devDependencies"],
9-
"matchPackagePatterns": ["lint", "prettier", "vite", "cypress", "commitlint", "axios", "concurrently", "env"],
7+
"matchPackagePatterns": [
8+
"lint",
9+
"prettier",
10+
"vite",
11+
"commitlint",
12+
"axios",
13+
"concurrently",
14+
"env"
15+
],
1016
"automerge": true
1117
},
1218
{
13-
"matchUpdateTypes": ["minor","patch"],
19+
"matchUpdateTypes": ["minor", "patch"],
1420
"matchCurrentVersion": "!/^0/",
1521
"automerge": true
1622
}

src/config/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export const THERMOMETER_COLOR = 'red';
22
export const THERMOMETER_WIDTH = 20;
33
export const THERMOMETER_RADIUS = 20;
4-
export const THERMOMETER_POSITION_X = 70;
4+
export const THERMOMETER_POSITION_X = 80;
55
export const THERMOMETER_STROKE_WIDTH = 3;
66
export const THERMOMETER_STROKE_COLOR = 'black';
77
// these factors are used as percentage depending on stage dimensions

src/config/env.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,9 @@ const {
33
VITE_VERSION,
44
VITE_SENTRY_ENV,
55
VITE_SENTRY_DSN,
6-
VITE_GA_MEASUREMENT_ID,
7-
VITE_ENABLE_MOCK_API,
86
VITE_API_HOST,
9-
} = window.Cypress ? Cypress.env() : import.meta.env;
7+
} = import.meta.env;
108

11-
export const MOCK_API = VITE_ENABLE_MOCK_API === 'true';
12-
export const GA_MEASUREMENT_ID = VITE_GA_MEASUREMENT_ID;
139
export const API_HOST = VITE_API_HOST;
1410
export const VERSION = VITE_VERSION || 'latest';
1511
export const GRAASP_APP_KEY = VITE_GRAASP_APP_KEY;

src/config/i18n.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,13 @@ declare module 'react-i18next' {
1818
resources: (typeof resources)['en'];
1919
}
2020
}
21+
const lang =
22+
new URLSearchParams(globalThis.location.search).get('lang') ??
23+
DEFAULT_LANGUAGE;
2124

2225
i18n.use(initReactI18next).init({
2326
resources,
24-
lng: DEFAULT_LANGUAGE,
27+
lng: lang,
2528
fallbackLng: DEFAULT_LANGUAGE,
2629
// debug only when not in production
2730
debug: import.meta.env.DEV,

0 commit comments

Comments
 (0)