Skip to content

Commit 345c029

Browse files
lorenzocorallototo04github-advanced-security[bot]
authored
feat: version 2 (#295)
* fix: eslint prettier * feat: temporary route to test new golang parser output * feat: bring back student's id and course/location filtering * feat: correct filtering on course * ci: update Actions runner to ubuntu-latest * ci: fix pnpm version in preview.yml * feat: biome replaces everything * fix: biome check fix, manual fixes * feat: upgrade tailwind, vite, node * feat: poc tanstack router + query don't even * fix: reduce with no initial value? (#291) * fix: missing file rename in previous commit * fix: missing classname merging in Footer * style: fix font classname * style: button default with cursor pointer * build(biome): exclude routeTree.gen.ts from checks, run lint:fix * ci: add test workflow * build: bump node engine and pnpm packageManager versions * feat: route to view ranking table, start cleaning previous stuff * feat: source route * feat: privacy route * feat: about route, update credits * feat: finish migration to app file-based routes * feat: make breadcrumb work again * feat: massive cleanup, ranking phase utilities and types * fix: matricola header name and filter placeholder * fix: reinstall shadcn component "command" combobox was not working correctly * style: missing cursor pointer in Removable component * style: all buttons have cursor-pointer by default * feat: bring back course-location filters * feat: react-compiler NOTE: to use react-compiler we need to use the standard `@vitejs/plugin-react` instead of `@vitejs/plugin-react-swc` See vitejs/vite-plugin-react#428 * refactor: move home-related routes into a single folder * build: remove orphan dependencies * feat: remote data fetch, json type fix * fix(router): use hash history for gh pages * fix: use correct env to detect production * feat: query-factory, custom devtools to change data source * fix: ranking page recovery on data source error * feat: zustand time (it allows prefetching pattern) * style: fix pages alignment * feat: new UI for Ranking picker flow (#293) * style: fix breadcrumb ranking info on mobile * fix: react-compiler not compatible with table/pagination * style: temporary fix for tooltip not working on mobile * chore: biome * release: v2.0.0 * fix: location select not working with react-compiler * style: arabic numbers in ranking selector, extra-eu badge dashed border * fix: revert debug code, add aria-label to home button in breadcrumb * fix: font not applied everywhere * feat: search by student id in homepage * style: new year select style * feat: font, eng rankings not available, some style changes * fix: remove unused icon import * chore: remove old file router.tsx * fix: import createRoot only from react-dom * fix: guard for empty filters * fix: rendering Location components as JSX instead of functions Rendering as function break React Hooks rules * fix: accessing zero-index array without guard * fix: throw on failed fetch * fix: handle course with no locations * fix: cleanup resize listener * fix: correct year param parsing * fix: better handling of side effects when switching dark mode * fix: wrong field for phase in PathBreadcrumb * fix: error boundaries * fix(a11y): aria label for student code input * fix: location case insensitive in tabs selector * fix: better tailwind selector maybe? * fix: guard on years in ArchiveTip * ci: explicit permissions on test workflow fix for code scanning alert no. 12 Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * fix: `DarkModeContext` props typedefs * feat: use localstorage instead of search params for persisting ID searches * fix: specify value as location.toLowerCase in Combobox * fix: typo in biome config * fix: remove old component * fix: text typo in location select * chore: remove redundant file exclusions in `biome.jsonc` --------- Co-authored-by: Tommaso Morganti <tommaso.morganti01@gmail.com> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent de72432 commit 345c029

File tree

146 files changed

+6796
-6589
lines changed

Some content is hidden

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

146 files changed

+6796
-6589
lines changed

.eslintrc.cjs

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

.github/workflows/preview.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,15 @@ jobs:
3535
ref: refs/pull/${{ github.event.pull_request.number }}/merge
3636

3737
# Assuming you're using Node.js
38-
- name: Setup Node.js
39-
uses: actions/setup-node@v4
40-
if: ${{ github.event.action != 'closed' }} # Skipping these steps if the PR has been closed
41-
with:
42-
node-version-file: "package.json"
43-
4438
- uses: pnpm/action-setup@v4
4539
with:
4640
run_install: false
4741

42+
- uses: actions/setup-node@v4
43+
with:
44+
node-version-file: "package.json"
45+
cache: pnpm
46+
4847
- name: Get pnpm store directory
4948
id: pnpm-cache
5049
shell: bash

.github/workflows/test.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Test
2+
permissions:
3+
contents: read
4+
on:
5+
push:
6+
branches:
7+
- main
8+
pull_request:
9+
workflow_dispatch:
10+
11+
jobs:
12+
test:
13+
name: Typecheck and Lint
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v5
17+
- uses: pnpm/action-setup@v4
18+
with:
19+
run_install: false
20+
- uses: actions/setup-node@v4
21+
with:
22+
node-version-file: "package.json"
23+
cache: pnpm
24+
- name: Install Dependencies
25+
run: pnpm install --frozen-lockfile
26+
- name: Typecheck
27+
run: pnpm run typecheck
28+
- name: Run Biome
29+
run: pnpm exec biome ci .
30+
- name: Build
31+
run: pnpm run build

.prettierignore

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

.prettierrc.json

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

biome.jsonc

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/2.3.8/schema.json",
3+
"vcs": { "enabled": true, "clientKind": "git", "useIgnoreFile": true },
4+
"files": {
5+
"ignoreUnknown": false,
6+
"includes": [
7+
"**",
8+
"!**/src/components/ui",
9+
"!**/src/utils/data",
10+
"!**/routeTree.gen.ts",
11+
"!**/-old-components/"
12+
]
13+
},
14+
"formatter": {
15+
"enabled": true,
16+
"formatWithErrors": false,
17+
"indentStyle": "space",
18+
"indentWidth": 2,
19+
"lineEnding": "lf",
20+
"lineWidth": 80,
21+
"attributePosition": "auto",
22+
"bracketSameLine": false,
23+
"bracketSpacing": true,
24+
"expand": "auto",
25+
"useEditorconfig": false
26+
},
27+
"linter": {
28+
"enabled": true,
29+
"rules": {
30+
"recommended": true,
31+
"suspicious": {
32+
"noVar": "error"
33+
},
34+
"nursery": {
35+
"noFloatingPromises": "error",
36+
"noMisusedPromises": "error",
37+
"noUnnecessaryConditions": "error",
38+
"noImportCycles": "warn",
39+
"useSortedClasses": {
40+
"level": "warn",
41+
"options": {
42+
"attributes": ["classList"],
43+
"functions": ["cn"]
44+
}
45+
}
46+
},
47+
"correctness": {
48+
"useJsonImportAttributes": "warn",
49+
"noPrivateImports": "error"
50+
}
51+
},
52+
"domains": {
53+
"project": "recommended",
54+
"react": "recommended"
55+
}
56+
},
57+
"javascript": {
58+
"formatter": {
59+
"jsxQuoteStyle": "double",
60+
"quoteProperties": "asNeeded",
61+
"trailingCommas": "es5",
62+
"semicolons": "asNeeded",
63+
"arrowParentheses": "always",
64+
"bracketSameLine": false,
65+
"quoteStyle": "double",
66+
"attributePosition": "auto",
67+
"bracketSpacing": true
68+
}
69+
},
70+
"html": { "formatter": { "selfCloseVoidElements": "always" } },
71+
"css": {
72+
"parser": {
73+
"tailwindDirectives": true
74+
}
75+
},
76+
"assist": {
77+
"enabled": true,
78+
"actions": { "source": { "organizeImports": "on" } }
79+
}
80+
}

index.html

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,10 @@
5858

5959
<link rel="preconnect" href="https://fonts.googleapis.com" />
6060
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
61-
<link
62-
href="https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap"
63-
rel="stylesheet"
64-
/>
61+
<link href="https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap" rel="stylesheet">
6562
</head>
6663
<body
67-
class="bg-white text-black scrollbar-thin scrollbar-track-slate-300 scrollbar-thumb-slate-400 dark:bg-slate-900 dark:text-white dark:scrollbar-track-slate-800 dark:scrollbar-thumb-slate-600"
64+
class="bg-white text-black scrollbar-thin scrollbar-track-slate-300 scrollbar-thumb-slate-400 dark:bg-slate-900 dark:text-white dark:scrollbar-track-slate-800 dark:scrollbar-thumb-slate-600 font-custom"
6865
>
6966
<div id="root"></div>
7067
<script type="module" src="./src/index.tsx"></script>

package.json

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,63 @@
11
{
22
"name": "polinetwork-rankings",
33
"private": true,
4-
"version": "1.14.2",
4+
"version": "2.0.0",
55
"type": "module",
66
"scripts": {
77
"dev": "vite --open",
88
"build": "tsc && vite build",
9-
"lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
10-
"preview": "vite preview"
9+
"preview": "vite preview",
10+
"typecheck": "tsc --noEmit",
11+
"check": "biome check",
12+
"check:fix": "biome check --write --unsafe"
1113
},
14+
"packageManager": "pnpm@10.17.1",
1215
"engines": {
13-
"node": ">=20.11.1",
14-
"pnpm": "9.x.x"
16+
"node": ">=24.5.0"
1517
},
16-
"packageManager": "pnpm@9.15.5",
1718
"dependencies": {
18-
"@radix-ui/react-dialog": "^1.0.4",
19-
"@radix-ui/react-icons": "^1.3.0",
20-
"@radix-ui/react-popover": "^1.0.6",
21-
"@radix-ui/react-scroll-area": "^1.1.0",
22-
"@radix-ui/react-select": "^1.2.2",
23-
"@radix-ui/react-separator": "^1.0.3",
24-
"@radix-ui/react-slot": "^1.1.0",
25-
"@radix-ui/react-tabs": "^1.1.0",
26-
"@tanstack/react-loaders": "0.0.1-beta.96",
27-
"@tanstack/react-table": "^8.20.1",
28-
"@tanstack/router": "0.0.1-beta.100",
29-
"@tanstack/router-devtools": "0.0.1-beta.102",
30-
"class-variance-authority": "^0.6.1",
31-
"clsx": "^1.2.1",
32-
"cmdk": "^0.2.0",
33-
"react": "^18.2.0",
34-
"react-dom": "^18.2.0",
35-
"react-icons": "^4.10.1",
36-
"react-spinners": "^0.13.8",
37-
"tailwind-merge": "^1.13.2",
19+
"@radix-ui/react-dialog": "^1.1.15",
20+
"@radix-ui/react-icons": "^1.3.2",
21+
"@radix-ui/react-popover": "^1.1.15",
22+
"@radix-ui/react-scroll-area": "^1.2.10",
23+
"@radix-ui/react-select": "^2.2.6",
24+
"@radix-ui/react-separator": "^1.1.8",
25+
"@radix-ui/react-slot": "^1.2.4",
26+
"@radix-ui/react-tabs": "^1.1.13",
27+
"@radix-ui/react-toggle": "^1.1.10",
28+
"@radix-ui/react-toggle-group": "^1.1.11",
29+
"@radix-ui/react-tooltip": "^1.2.8",
30+
"@tailwindcss/vite": "^4.1.17",
31+
"@tanstack/react-query": "^5.90.12",
32+
"@tanstack/react-router": "^1.139.16",
33+
"@tanstack/react-router-devtools": "^1.139.15",
34+
"@tanstack/react-table": "^8.21.3",
35+
"class-variance-authority": "^0.7.1",
36+
"clsx": "^2.1.1",
37+
"cmdk": "^1.1.1",
38+
"next-themes": "^0.4.6",
39+
"react": "^19.2.1",
40+
"react-dom": "^19.2.1",
41+
"react-error-boundary": "^6.1.0",
42+
"react-icons": "^5.5.0",
43+
"react-spinners": "^0.17.0",
44+
"sonner": "^2.0.7",
45+
"tailwind-merge": "^3.4.0",
3846
"tailwindcss-animate": "^1.0.7",
39-
"url-join": "^5.0.0"
47+
"url-join": "^5.0.0",
48+
"zustand": "^5.0.9"
4049
},
4150
"devDependencies": {
42-
"@types/node": "^20.4.1",
43-
"@types/react": "^18.2.14",
44-
"@types/react-dom": "^18.2.6",
45-
"@types/url-join": "^4.0.1",
46-
"@typescript-eslint/eslint-plugin": "^5.60.1",
47-
"@typescript-eslint/parser": "^5.60.1",
48-
"@vitejs/plugin-react-swc": "^3.3.2",
49-
"autoprefixer": "^10.4.14",
50-
"eslint": "^8.57.0",
51-
"eslint-config-prettier": "^8.8.0",
52-
"eslint-plugin-prettier": "^4.2.1",
53-
"eslint-plugin-react-hooks": "^4.6.2",
54-
"eslint-plugin-react-refresh": "^0.4.9",
55-
"postcss": "^8.4.31",
56-
"prettier": "2.8.8",
57-
"prettier-plugin-tailwindcss": "^0.2.8",
58-
"tailwind-scrollbar": "^3.0.4",
59-
"tailwindcss": "^3.3.2",
60-
"typescript": "^5.1.6",
61-
"vite": "^4.5.3"
51+
"@biomejs/biome": "^2.3.8",
52+
"@tanstack/router-plugin": "^1.139.14",
53+
"@types/node": "^24.10.1",
54+
"@types/react": "^19.2.7",
55+
"@types/react-dom": "^19.2.3",
56+
"@vitejs/plugin-react": "^5.1.2",
57+
"babel-plugin-react-compiler": "^1.0.0",
58+
"tailwind-scrollbar": "^4.0.2",
59+
"tailwindcss": "^4.1.17",
60+
"typescript": "^5.9.3",
61+
"vite": "^7.2.6"
6262
}
6363
}

0 commit comments

Comments
 (0)