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

raw MVP with old design #2

Merged
merged 219 commits into from
Dec 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
219 commits
Select commit Hold shift + click to select a range
770ec55
add working google login button
bohdancho Oct 21, 2023
f97f225
npm update
bohdancho Oct 21, 2023
491f64c
Revert "npm update"
bohdancho Oct 21, 2023
99fbfc9
add AuthProvider, make a request to backend with google login code, fix
bohdancho Oct 21, 2023
23ffb38
move main.tsx content to App.tsx
bohdancho Oct 21, 2023
b6d9e00
fix google auth and request jwt from backend
bohdancho Oct 21, 2023
8776220
implement saving jwt in local storage
bohdancho Oct 21, 2023
0fa00ea
implement using token from ls in auth header
bohdancho Oct 22, 2023
59177b9
remove only-export-components eslint rule
bohdancho Oct 22, 2023
98744ea
add vite favicon to remove the error
bohdancho Oct 22, 2023
4351ccf
add index.ts files
bohdancho Oct 22, 2023
ff707a5
move user_test api call to a dedicated api calls folder
bohdancho Oct 22, 2023
f3a6a7f
add swr, implement dashboard demo
bohdancho Oct 22, 2023
fac5c43
sync useCurrentUser url with backend
bohdancho Oct 22, 2023
ada487f
sync dashboard demo with backend
bohdancho Oct 22, 2023
909fc92
implement refresh_token
bohdancho Oct 22, 2023
04c5752
refactor token localStorage methods, add reload on login/logout
bohdancho Oct 22, 2023
7b3b096
implement case with invalid (expired) refresh token
bohdancho Oct 22, 2023
fdb34af
cover current_user 401 case
bohdancho Oct 22, 2023
264dc9b
add base for contest page, switch to useSWRImmutable
bohdancho Oct 22, 2023
1a7ebd1
sync dashboard with backend
bohdancho Oct 23, 2023
0c3abb8
add redirect to ongoing contest and default discipline in contests
bohdancho Oct 23, 2023
be87025
refactor pages file structure and naming
bohdancho Oct 23, 2023
19d283f
implement navbar for dashboard and contests
bohdancho Oct 23, 2023
6fa80ec
refactor auth tokens
bohdancho Oct 23, 2023
6e92969
add ongoing label for contests on dashboard
bohdancho Oct 23, 2023
c6f0a58
add missing imports to AuthProvider
bohdancho Oct 23, 2023
eab7c5d
change function keyword to arrow functions for consistency
bohdancho Oct 23, 2023
2f39d1b
add classnames package, add blue text color for links
bohdancho Oct 23, 2023
3aa2e3d
adjust demo links styles, add leaderboard link to best solves on
bohdancho Oct 23, 2023
ce1dfe6
implement contest results demo
bohdancho Oct 23, 2023
171a28d
move LoginSection and Navbar to separate files, remove Header component
bohdancho Oct 23, 2023
1fe872e
add discipline name to contest page
bohdancho Oct 23, 2023
aca539b
add reconstructor without solve importing
bohdancho Oct 24, 2023
efd69fc
add importSolve to the reconstructor
bohdancho Oct 24, 2023
0913066
adjust reconstructor iframe size
bohdancho Oct 24, 2023
5d3ea42
lazy load reconstructor iframe
bohdancho Oct 24, 2023
08d901c
sync contests/dashboard endpoint url with backend
bohdancho Oct 24, 2023
ca9b8bc
implement ReconstructTimeButton with fetching reconstruction
bohdancho Oct 24, 2023
0dffbf7
add ReconstructTimeButton to ContestPage
bohdancho Oct 24, 2023
5b14572
fix bug with opening different reconstructions
bohdancho Oct 24, 2023
f1425c2
import space grotesk font
bohdancho Oct 24, 2023
41dff0c
style navbar
bohdancho Oct 24, 2023
015d58c
style Sign in with Google button, add some colors to tw config
bohdancho Oct 24, 2023
1d1f96f
style contests block on dashboard
bohdancho Oct 24, 2023
77d7cbf
add svrg, style best solves on dashboard
bohdancho Oct 24, 2023
58252a8
style past contest page
bohdancho Oct 24, 2023
2d065f7
split DashboardPage into components in features directory
bohdancho Oct 25, 2023
09701b5
refactor for features/reconstructor
bohdancho Oct 25, 2023
d585a9a
refactor for features/auth
bohdancho Oct 25, 2023
6c6d8ef
move ContestResult to a separate component
bohdancho Oct 25, 2023
0dd7123
fix .map key for ContestResult
bohdancho Oct 25, 2023
d293234
refactor reconstructor api types
bohdancho Oct 25, 2023
b2e2fb4
refactor api/accounts file structure
bohdancho Oct 25, 2023
a23c420
refactor for api/routes/contests
bohdancho Oct 25, 2023
f3d6637
add dev server proxy for /api
bohdancho Oct 25, 2023
0843502
remove redundant index.ts from /api, add Discipline to types.ts
bohdancho Oct 25, 2023
3c385d3
add port to npm run preview
bohdancho Oct 25, 2023
d016ce0
move refreshAccessToken to api folder
bohdancho Oct 25, 2023
186495c
implement SolveContest component without content
bohdancho Oct 25, 2023
70321e8
add ContestDiscipline for its separate route
bohdancho Oct 25, 2023
4ba6941
adjust ContestResults grouppedResults
bohdancho Oct 25, 2023
53819c6
implement showing awaiting solve
bohdancho Oct 25, 2023
e2b5dfd
implement solver integration
bohdancho Oct 25, 2023
0feb288
implement working demo 2 sided communication with solver
bohdancho Oct 26, 2023
0fb7c6e
rename Solver to Cube, refactor naming
bohdancho Oct 26, 2023
d5def61
move ContestsList and BestSolves to a the dashboard feature folder
bohdancho Oct 26, 2023
2a2c008
move SolveContest to a dedicated folder
bohdancho Oct 26, 2023
4fbfc6f
get rid of the ActionButton in SolveContest
bohdancho Oct 26, 2023
0bf1812
add blue color to avg result in ContestantResults
bohdancho Oct 26, 2023
86198f6
pass real scramble to the Cube iframe
bohdancho Oct 26, 2023
eeeb317
passed value to cubeSolveCallback
bohdancho Oct 26, 2023
7c16f5d
implement solve result posting with mutation
bohdancho Oct 26, 2023
37aadd4
add reconstruction button for current solve
bohdancho Oct 26, 2023
8ed27dc
add changeToExtra and submitSolve api calls without action upon them
bohdancho Oct 26, 2023
d0e05b4
temporarily add solve_id to solve_contest put
bohdancho Oct 26, 2023
9f92d51
add proxy for cstimer and alg.cubing.net
bohdancho Oct 26, 2023
5300d81
remove useSolveContestState refetching (on mutation + automatic)
bohdancho Oct 26, 2023
ec2b8f8
sync solve_id from postSolveResults with backend
bohdancho Oct 26, 2023
0829bb2
minor
bohdancho Oct 26, 2023
71bd0cd
style solvecontest cards
bohdancho Oct 26, 2023
95228d5
sync changeToExtra and submitSolve with backend, add mutations
bohdancho Oct 26, 2023
5dec8f1
minor code style improvements
bohdancho Oct 27, 2023
6f22923
implement showResultsUnavailableTip
bohdancho Oct 27, 2023
0766839
extract SubmittedSolve to a separate component
bohdancho Oct 27, 2023
94cbb42
extract CurrentSolve into a separate component
bohdancho Oct 27, 2023
cfe015a
minor
bohdancho Oct 27, 2023
166379a
add navigation to results on contest finish
bohdancho Oct 27, 2023
4596623
minor types fix
bohdancho Oct 27, 2023
9e40c5c
fix go back history routing
bohdancho Oct 27, 2023
8517ee3
remove useReconstructor from ReconstructTimeButton
bohdancho Oct 27, 2023
7be684d
implement solveId query param
bohdancho Oct 27, 2023
9a52297
implement scramble.position
bohdancho Oct 27, 2023
86803a6
implement isExtraAvailable
bohdancho Oct 27, 2023
a4f9619
implement copy link to the solve with a placeholder
bohdancho Oct 27, 2023
b42d73d
make reconstruction from url accessible for all users
bohdancho Oct 27, 2023
fc6f099
implement reconstruction link
bohdancho Oct 28, 2023
db426b2
rename reconstruction to solution for readability
bohdancho Oct 28, 2023
66818b5
add navigation for showing reconstruction in SolveContest
bohdancho Oct 28, 2023
a457567
refactor navigation to a solve - add useNavigateToSolve
bohdancho Oct 28, 2023
600c503
add missing import
bohdancho Oct 28, 2023
e4e9022
implement reconstruction metadata
bohdancho Oct 28, 2023
a18e045
fix the bug with time_ms=0
bohdancho Oct 29, 2023
921a97f
implement TimeStart callback for Cube
bohdancho Oct 29, 2023
11597d3
add dnf variant to solves
bohdancho Oct 29, 2023
ce3835c
move darkened background to CubeProvider
bohdancho Oct 29, 2023
388eee4
sync solve reconstruction with backend
bohdancho Oct 30, 2023
7da89ba
sync dashboard with backend
bohdancho Oct 30, 2023
58198da
sync ContestResults with backend
bohdancho Oct 30, 2023
fb0db54
formatSolveTime: fix typo in the file name, fix 0 ms case
bohdancho Oct 30, 2023
e3026df
sync SolveContest with backend
bohdancho Oct 30, 2023
360dc57
change Discipline['name'] approach to just Discipline
bohdancho Oct 30, 2023
656db08
replace undefined with null for consistency
bohdancho Oct 30, 2023
b2aa3b4
dashboard adjust types
bohdancho Oct 30, 2023
0c91ea6
adjust naming
bohdancho Oct 30, 2023
bb26d64
fix link to solve in reconstruction
bohdancho Oct 30, 2023
ac145ca
minor refactoring
bohdancho Oct 30, 2023
c3c38c9
reconstructor: move darkened background to the provider
bohdancho Oct 30, 2023
3327321
minor refactoring
bohdancho Oct 30, 2023
69a4747
add temporary POST dnf handler
bohdancho Oct 30, 2023
dcb7673
sync dashboard best solves username with backend
bohdancho Oct 31, 2023
500c43d
fix dnf placeholder in api
bohdancho Oct 31, 2023
0bdb88d
implement solve abortion without confirm prompt
bohdancho Oct 31, 2023
bb10fb1
filter out changed to extra solves from session results
bohdancho Oct 31, 2023
625db95
minor readability
bohdancho Oct 31, 2023
a1ec00b
implement solve abortion prompt
bohdancho Oct 31, 2023
1a513e2
make cube iframe take up all parent height and width
bohdancho Oct 31, 2023
9c6a027
adjust reconstructor size
bohdancho Oct 31, 2023
843e9ce
minor
bohdancho Oct 31, 2023
fbaa034
add visual sign for extra solves in contest results
bohdancho Nov 4, 2023
4ac659c
refactor auth for userData
bohdancho Nov 5, 2023
137dd3b
adjust redirects to ongoing contest and default discipline
bohdancho Nov 11, 2023
f81175e
refactor default isAuthenticated value in AuthProvider
bohdancho Nov 11, 2023
0aca017
fix NavBar current page highlighting bug
bohdancho Nov 11, 2023
d71629c
add demo for PickUsernameModal
bohdancho Nov 12, 2023
38cad89
fix go back in history with opened reconstruction
bohdancho Nov 12, 2023
856f6bb
uncomment extra label in contest results
bohdancho Nov 12, 2023
ab3cacb
sync with backend adding auth_completed field
bohdancho Nov 12, 2023
2374909
fix baseUrl in vite config to absolute
bohdancho Nov 15, 2023
49a8b1b
rename alg.cubing.net path in proxy to twisty
bohdancho Nov 16, 2023
538416f
remove redundant index.html from twisty src
bohdancho Nov 16, 2023
16bccd7
implement proper dnf output in contest results
bohdancho Nov 16, 2023
961cc4b
change cstimer path to /php and adjust vite cofig
bohdancho Nov 17, 2023
d339502
sync dnfing solves by aborting with backend
bohdancho Nov 17, 2023
5dc6421
display own session results separately
bohdancho Nov 17, 2023
fec8f75
implement leaderboard page
bohdancho Nov 19, 2023
4d0afe2
add leaderboard link to navbar
bohdancho Nov 19, 2023
de6d0e0
add place number to contest results
bohdancho Nov 19, 2023
7100fc9
add info box
bohdancho Nov 19, 2023
31a8e0d
fix dnf label in SolveContest
bohdancho Nov 19, 2023
0978c55
add redirect to root from invalid routes
bohdancho Nov 19, 2023
bfe46ff
add redirect to the default discipline from invalid discipline in route
bohdancho Nov 19, 2023
1398e34
implement dnfing on tab close
bohdancho Nov 19, 2023
18f0ce6
minor fix
bohdancho Nov 19, 2023
7d26ab6
responsive home page WiP
bohdancho Nov 22, 2023
8a4d0eb
fix invalid export in a barrel file
bohdancho Nov 23, 2023
6951d9b
add responsive mobile navigation
bohdancho Nov 23, 2023
a68bcae
fix mobile navbar
bohdancho Nov 24, 2023
d2d869c
adjust dashboard mobile styles
bohdancho Nov 24, 2023
0485e6a
responsive WiP
bohdancho Nov 24, 2023
b040b27
replace classnames with clsx and twmerge
bohdancho Nov 25, 2023
bd13b63
extract disciplines tabs layout to a component
bohdancho Nov 25, 2023
12d5121
adjust published session card styles
bohdancho Nov 25, 2023
ba57a07
extract result card component
bohdancho Nov 25, 2023
af0414d
add leaderboard mobile responsive
bohdancho Nov 25, 2023
d6ca6ca
responsive
bohdancho Nov 25, 2023
045b68b
refactor file structure
bohdancho Nov 27, 2023
7646f58
refactor loaders files
bohdancho Nov 27, 2023
4988a3b
disable solving for touch devices
bohdancho Nov 28, 2023
7f46c33
minor refactor
bohdancho Nov 28, 2023
762f173
implement responsive for SolveContest
bohdancho Nov 28, 2023
5f37ff8
add user circle icon asset
bohdancho Nov 29, 2023
17a8008
change hamburger button animation function to custom ease-out-expo
bohdancho Nov 29, 2023
bc3585f
adjust header height and mobile navigation top offset
bohdancho Nov 29, 2023
bec7351
add semantic header and main tags
bohdancho Nov 29, 2023
2ce0db8
adjust leaderboard margins between cards
bohdancho Nov 29, 2023
35a313b
refactor: move useConditionalBeforeUnload to utils
bohdancho Dec 4, 2023
5acf246
refactor: partially merge state in CubeProvider in one object
bohdancho Dec 5, 2023
6249d3f
feat: keyboard warning modal
bohdancho Dec 6, 2023
8676205
refactor: rename startSolve to initSolve
bohdancho Dec 6, 2023
da79879
refactor: improve naming in CurrentSolve
bohdancho Dec 6, 2023
fd924a4
feat: add responsive width for integrations popups
bohdancho Dec 6, 2023
cd54acb
fix: adjust paddings for integrations modals
bohdancho Dec 9, 2023
02231e1
fix: specify z-index for modals
bohdancho Dec 9, 2023
4f3fa9f
fix: center dnf result badge in published session
bohdancho Dec 9, 2023
22f4632
refactor: sync api routes with backend changes
bohdancho Dec 16, 2023
55f1bd6
feat: implement resetting session for olesia
bohdancho Dec 16, 2023
6f43fa7
refactor: minor file naming
bohdancho Dec 21, 2023
7a6ac81
refactor: remove redundant class
bohdancho Dec 21, 2023
f42a2c5
refactor: convert to function declaration
bohdancho Dec 22, 2023
9a1705f
refactor: add axios-case-converter to remove case inconsistency
bohdancho Dec 22, 2023
7f02bd1
refactor: migrate to tanstack-router, disable search param for
bohdancho Dec 23, 2023
f60aee5
move router to a separate file
bohdancho Dec 23, 2023
f9220cb
refactor: move leaderboard and contests routers to separate files
bohdancho Dec 23, 2023
ecc7a09
refactor: add reactQuery, migrate leaderboard and ongoingContestNumber
bohdancho Dec 23, 2023
c9c51e0
refactor: migrate dashboard to reactQuery
bohdancho Dec 23, 2023
d2c2080
fix: adjust barrel file
bohdancho Dec 23, 2023
26f13f9
refactor: leaderboard pass query from loader
bohdancho Dec 23, 2023
7af8cc0
refactor: migrate PublishedSessions to reactQuery
bohdancho Dec 23, 2023
26edec5
refactor: migrate useUser to reactQuery
bohdancho Dec 23, 2023
54cac46
refactor: migrate useSolveReconstruction to reactQuery
bohdancho Dec 23, 2023
9c69588
refactor: remove reload after choosing username
bohdancho Dec 23, 2023
e3664cc
refactor: migrate solveContest to react query
bohdancho Dec 23, 2023
f499e19
refactor: remove swr package
bohdancho Dec 23, 2023
5e6cc9a
fix: reactQuery adjust default retry option
bohdancho Dec 24, 2023
c17f329
refactor: migrate to features folder
bohdancho Dec 24, 2023
e219a56
refactor: add queryKeys files to modules
bohdancho Dec 24, 2023
d9edbfb
refactor: remove queryKeys files
bohdancho Dec 24, 2023
3b7d3ad
fix: delete leftover file
bohdancho Dec 24, 2023
1fb25b2
fix: axios interceptor refetch auth token only if has tokens
bohdancho Dec 24, 2023
e723d1f
fix: type naming error
bohdancho Dec 24, 2023
ca99e9a
fix: ContestDiscipline reduce unnecessary fetching
bohdancho Dec 24, 2023
bb6adc6
Revert "fix: ContestDiscipline reduce unnecessary fetching"
bohdancho Dec 25, 2023
efb04c8
fix: outdated imports after structure refactor
bohdancho Dec 25, 2023
3a7fbea
infra: update eslint config
bohdancho Dec 25, 2023
b387a10
refactor: make eslint config more strict
bohdancho Dec 25, 2023
d7502e6
fix: fix eslint errors with new config
bohdancho Dec 25, 2023
8a988a1
infra: update dependencies (vite 5.0)
bohdancho Dec 28, 2023
efdd081
Merge pull request #1 from vscubing/tanstack-router
bohdancho Dec 28, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 26 additions & 3 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,35 @@
const config = {
root: true,
env: { browser: true, es2020: true, node: true },
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:react-hooks/recommended'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended-type-checked',
'plugin:@typescript-eslint/stylistic-type-checked',
'plugin:react-hooks/recommended',
'plugin:@tanstack/eslint-plugin-query/recommended',
],
ignorePatterns: ['dist', 'node_modules', '!.*.*'],
parser: '@typescript-eslint/parser',
plugins: ['react-refresh'],
parserOptions: { project: true },
plugins: ['react-refresh', '@typescript-eslint'],
rules: {
'react-refresh/only-export-components': ['warn', { allowConstantExport: true }],
'@typescript-eslint/array-type': 'off',
'@typescript-eslint/consistent-type-definitions': 'off',
'@typescript-eslint/prefer-nullish-coalescing': 'off',
'@typescript-eslint/consistent-type-imports': [
'warn',
{
prefer: 'type-imports',
fixStyle: 'inline-type-imports',
},
],
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
'@typescript-eslint/no-misused-promises': [
2,
{
checksVoidReturn: { attributes: false },
},
],
},
}

Expand Down
Binary file added bun.lockb
Binary file not shown.
Loading