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

feat: Quadratic Cloud Files V1 #530

Merged
merged 192 commits into from
Aug 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
192 commits
Select commit Hold shift + click to select a range
ca950ec
initial UI
jimniels May 22, 2023
4e8c264
put isPublic state in the file itself
jimniels May 23, 2023
0a3e9e6
more tweaks
jimniels May 23, 2023
185da84
more tweaks
jimniels May 24, 2023
9230b6a
Update apiClientSingleton.ts
jimniels May 25, 2023
9160b1c
Update files.ts
jimniels May 25, 2023
227e620
Merge branch 'main' into share-file
jimniels Jul 11, 2023
3f08578
set up routes for cloud files (#603)
davidkircos Jul 11, 2023
2865da8
Update useGenerateLocalFiles.tsx
jimniels Jul 11, 2023
6ef61a9
support deleting file still in memory
jimniels Jul 11, 2023
d67d569
stub for file delete
jimniels Jul 11, 2023
1f5b4c4
downloadFile
jimniels Jul 11, 2023
b117c6f
routing (#605)
jimniels Jul 14, 2023
76ea3d3
Update auth.ts
jimniels Jul 14, 2023
d9cf8e1
more tweaks
jimniels Jul 14, 2023
3433ba4
Update Routes.tsx
jimniels Jul 15, 2023
628a6ec
tweaks
jimniels Jul 17, 2023
8ff4e1b
Routes and Tests for API (#608)
davidkircos Jul 17, 2023
021aab8
tweaks
jimniels Jul 17, 2023
d60aa95
Merge branch 'share-file' of github.com:quadratichq/quadratic into sh…
jimniels Jul 17, 2023
f8a9cb1
more tweaks
jimniels Jul 18, 2023
e91e79e
more tweaks
jimniels Jul 18, 2023
7042817
Update Empty.tsx
jimniels Jul 18, 2023
b3ac3ef
merge latest from main
jimniels Jul 18, 2023
ef599bc
more tweaks
jimniels Jul 18, 2023
33d8496
remove overrides
jimniels Jul 18, 2023
01a4a4f
Update TopBar.tsx
jimniels Jul 18, 2023
917352d
Update Dashboard.tsx
jimniels Jul 21, 2023
488e0a1
Use Docker for API integration tests (#613)
davidkircos Jul 21, 2023
c152187
Update Empty.tsx
jimniels Jul 21, 2023
8f15238
Update package.json
jimniels Jul 21, 2023
8c9046a
Merge Share file tests2 (#618)
davidkircos Jul 24, 2023
3fd1f68
refactor to use files over network not local files (#616)
jimniels Jul 24, 2023
04145cc
Update QuadraticApp.tsx
jimniels Jul 24, 2023
b06138e
proper dark mode
jimniels Jul 24, 2023
ccaed0f
Share file tests 3 (#617)
davidkircos Jul 24, 2023
91d93ee
more tweaks
jimniels Jul 24, 2023
83739f8
Merge branch 'share-file' of github.com:quadratichq/quadratic into sh…
jimniels Jul 24, 2023
74803c7
accept a file update
davidkircos Jul 24, 2023
beeff99
create endpoint plus tests
davidkircos Jul 24, 2023
c02b64f
Merge branch 'share-file' of https://github.com/quadratichq/quadratic…
davidkircos Jul 24, 2023
6deaa6e
tweaks
jimniels Jul 24, 2023
a544eb0
Merge branch 'share-file' of github.com:quadratichq/quadratic into sh…
jimniels Jul 24, 2023
1fd0966
connect create new file on frontend
davidkircos Jul 24, 2023
6abd6ad
add endpoint and tests for file deletion
davidkircos Jul 24, 2023
5c7520e
more tweaks
jimniels Jul 24, 2023
d5cc4c9
require file contents to create a file
davidkircos Jul 24, 2023
dd5db32
Merge branch 'share-file' of https://github.com/quadratichq/quadratic…
davidkircos Jul 24, 2023
5c7bbd2
fix backend file post/get
jimniels Jul 25, 2023
65f458c
fix tests
davidkircos Jul 25, 2023
3365c6f
move files around
davidkircos Jul 25, 2023
bd4fc0e
order returned files by updated_date
davidkircos Jul 25, 2023
d96eeb0
refactor and cleanup API code
davidkircos Jul 25, 2023
a5d2b14
more tweaks
jimniels Jul 25, 2023
641f369
Merge branch 'share-file' of github.com:quadratichq/quadratic into sh…
jimniels Jul 25, 2023
3b87b38
more tweaks
jimniels Jul 25, 2023
d1dfc26
tweaks
jimniels Jul 26, 2023
6372f74
fixes & updates
jimniels Jul 26, 2023
22ee919
merge latest from main
jimniels Jul 26, 2023
8ce23c1
make typescript happy
davidkircos Jul 26, 2023
7a520e4
initial (#624)
jimniels Aug 1, 2023
efe6a88
refactor file structure
jimniels Aug 1, 2023
fd4c6cc
change root app structuring
jimniels Aug 1, 2023
79eedfc
refactor file structure
jimniels Aug 1, 2023
a6d5e51
renaming
jimniels Aug 1, 2023
81feef3
create file enhancements
jimniels Aug 1, 2023
fe6cf7c
fix fonts
jimniels Aug 1, 2023
32b7b04
fix styles
jimniels Aug 1, 2023
11a99fb
make globalsnackbar provider truly global
jimniels Aug 1, 2023
a768d19
support error handling on creating example file
jimniels Aug 1, 2023
f3589ce
discrete file updates
jimniels Aug 1, 2023
ab7ac88
add disabled state
jimniels Aug 1, 2023
6db6f80
small but important UI refinements
jimniels Aug 2, 2023
6f911f3
Update CellsMarkers.ts
jimniels Aug 2, 2023
5f3d4bc
small tweaks to login/logout
jimniels Aug 2, 2023
255b457
small fix
jimniels Aug 2, 2023
8127ff9
sync indicator in footer
jimniels Aug 2, 2023
0908681
fix old loader data
jimniels Aug 2, 2023
a75273e
inline svgs for performance
jimniels Aug 2, 2023
967941f
handle errors on /files/mine
jimniels Aug 2, 2023
6d6cc50
make my files link work
davidkircos Aug 2, 2023
966c37d
get mobile/tablet layout working
jimniels Aug 2, 2023
21e98ce
style refinements
jimniels Aug 3, 2023
b55e075
add mixpanel event
jimniels Aug 3, 2023
7d52e4a
add mixpanel event
jimniels Aug 3, 2023
b6b393d
remove todos
jimniels Aug 3, 2023
711ea2e
small auth code tweak
jimniels Aug 3, 2023
2f35f62
Remove reload
jimniels Aug 3, 2023
67f1285
fix teams sign up
jimniels Aug 3, 2023
f09df23
protect `/file` routes
jimniels Aug 3, 2023
265e15c
add mixpanel tracking and file validation
jimniels Aug 3, 2023
e5f302a
tweaks to logout and sidebar
jimniels Aug 3, 2023
d74dc60
Preview Branches (#632)
davidkircos Aug 3, 2023
71e72f4
hide actions on mobile
jimniels Aug 4, 2023
d15cb0d
Merge branch 'share-file' of github.com:quadratichq/quadratic into sh…
jimniels Aug 4, 2023
66ae556
make logo linkable
jimniels Aug 4, 2023
019f4b5
remove extra loader
jimniels Aug 4, 2023
7bbe1bb
send version with CREATE and UPDATE File contents
davidkircos Aug 4, 2023
c529d0f
validate and upgrade GET /file/:uuid
jimniels Aug 4, 2023
c7502b6
pass version when updating file contents
jimniels Aug 4, 2023
6ebea0b
more API fixes
jimniels Aug 4, 2023
0425111
normalize API error handling
jimniels Aug 4, 2023
60e79cf
small tweaks
jimniels Aug 4, 2023
95a6793
ShowAfter component
jimniels Aug 5, 2023
3d3d2e7
fix create
jimniels Aug 8, 2023
b6b3a77
Update create.tsx
jimniels Aug 8, 2023
8505834
fix autofocus on global menus
jimniels Aug 8, 2023
7124810
update document title as you navigate
jimniels Aug 9, 2023
bad0543
cloud files migration
jimniels Aug 9, 2023
45ebf19
remove TODOs
jimniels Aug 9, 2023
23c3b44
remove "share file" related code
jimniels Aug 9, 2023
c56a74b
fix: migration code
jimniels Aug 9, 2023
26097e4
feedback use new user model, fix tests
davidkircos Aug 9, 2023
b2ea71b
Merge branch 'share-file' of https://github.com/quadratichq/quadratic…
davidkircos Aug 9, 2023
1413693
play with tweaking theme
jimniels Aug 10, 2023
29bdf90
David UI Refinements (#635)
davidkircos Aug 10, 2023
02f3a0b
centralize route strings
jimniels Aug 10, 2023
ae825b2
small fix to login/logout history
jimniels Aug 10, 2023
25c147c
folder icon
jimniels Aug 10, 2023
8eb7325
fix nav and allow cmd+click on file creation
jimniels Aug 11, 2023
1507b49
comment out dark mode
jimniels Aug 11, 2023
2c772d9
small ui enhancement to navigation in top bar
jimniels Aug 11, 2023
a6271cd
feat: social share meta/image (#636)
jimniels Aug 11, 2023
c5879a8
Update CONTRIBUTING.md
jimniels Aug 11, 2023
f82804e
Update CONTRIBUTING.md
jimniels Aug 11, 2023
c685c8a
remove rate limiter on files
davidkircos Aug 11, 2023
33da09f
Merge branch 'share-file' of https://github.com/quadratichq/quadratic…
davidkircos Aug 11, 2023
a526413
updates to bottombar
jimniels Aug 11, 2023
525306f
proper syncing
jimniels Aug 14, 2023
d8f4985
sentry updates
jimniels Aug 14, 2023
eaa4634
download local file
jimniels Aug 14, 2023
f439bbe
download local file
jimniels Aug 14, 2023
63c7f32
fix: analytics (#637)
jimniels Aug 14, 2023
0cb5de3
file/folder restructuring
jimniels Aug 14, 2023
50d6c8f
cleanup docker commands
davidkircos Aug 15, 2023
abf4eff
add comment
jimniels Aug 15, 2023
ca2e64a
update readme for env vars
davidkircos Aug 15, 2023
f59e067
Merge branch 'share-file' of https://github.com/quadratichq/quadratic…
davidkircos Aug 15, 2023
2508e5a
fix imports
davidkircos Aug 15, 2023
f917c02
fix tests (fix from @juanbercoff)
davidkircos Aug 15, 2023
41ea9c8
lint
davidkircos Aug 15, 2023
f022e0e
fix tests
davidkircos Aug 15, 2023
c6ee7a7
fix typo
davidkircos Aug 15, 2023
187e016
cleaned up schema file
davidkircos Aug 15, 2023
c4eb9f9
use dbClient
davidkircos Aug 15, 2023
5e6d0cc
order imports
davidkircos Aug 15, 2023
374ba5e
delete unused file
davidkircos Aug 15, 2023
7a0a736
fix typo
davidkircos Aug 15, 2023
9f08b6d
make it harder to accidentally reference API_URL directly
davidkircos Aug 15, 2023
2994d47
improve env vars error handling
davidkircos Aug 15, 2023
c9f45cd
add root project command to run api
davidkircos Aug 15, 2023
69d63ed
add singin to vs code dict
davidkircos Aug 15, 2023
f72f802
don't flash QuadraticLoading on dashboard load
davidkircos Aug 15, 2023
7ecf52d
app.ts is a reserved file name imo - rename constants file
davidkircos Aug 15, 2023
f9a5c2f
revert logic in auth.ts
davidkircos Aug 15, 2023
2b9be1b
fix typo
davidkircos Aug 15, 2023
1bd3321
remove ellipses
davidkircos Aug 15, 2023
eb724fe
use ROUTES
davidkircos Aug 15, 2023
36b2288
use ROUTES
davidkircos Aug 15, 2023
f12d277
rename inputRef -> focusInput
davidkircos Aug 15, 2023
40be6b5
add back preRenderQuadrants to loading
davidkircos Aug 15, 2023
927cb13
make root route loader into a hook
jimniels Aug 15, 2023
10deedf
Merge branch 'share-file' of github.com:quadratichq/quadratic into sh…
jimniels Aug 15, 2023
d858ecd
refactor api client (#641)
jimniels Aug 16, 2023
d70a4ec
fix: have global snackbar clear its search params
jimniels Aug 16, 2023
cbb76a9
remove unused var
jimniels Aug 16, 2023
a063ea4
rename "File" to "FileContext"
jimniels Aug 16, 2023
d500442
fix tests
jimniels Aug 16, 2023
1e08e09
Update Theme.tsx
jimniels Aug 16, 2023
0c51fec
remove console.log
jimniels Aug 16, 2023
cfdec9f
update comment
jimniels Aug 16, 2023
8d10ffd
Update FileRoute.tsx
jimniels Aug 16, 2023
b3a5002
centralize support email
jimniels Aug 16, 2023
9227172
more specific names for dashboard components
jimniels Aug 16, 2023
0880469
use constants for trigger snackbar via query params
jimniels Aug 16, 2023
ef90126
make dashhoard file list item a link
jimniels Aug 16, 2023
9042669
remove unused code
jimniels Aug 16, 2023
f80e08d
delete unused file
jimniels Aug 16, 2023
a37a68f
tweak syntax
jimniels Aug 16, 2023
edaf866
rename browser compaitility to be a layout route
jimniels Aug 16, 2023
ee32737
remove comments
jimniels Aug 16, 2023
c841394
more tweaks
jimniels Aug 16, 2023
a9f2190
remove logs
jimniels Aug 16, 2023
108288d
improve loading animation
davidkircos Aug 16, 2023
7a8bdfd
Merge branch 'share-file' of https://github.com/quadratichq/quadratic…
davidkircos Aug 16, 2023
e87c48a
cleanup view on mobile
jimniels Aug 16, 2023
6ab5c51
Merge branch 'share-file' of github.com:quadratichq/quadratic into sh…
jimniels Aug 16, 2023
fdbb1b1
update copy
davidkircos Aug 16, 2023
79dbccf
add mixpanel events around migration
jimniels Aug 17, 2023
5a5b305
Update CloudFilesMigrationRoute.tsx
davidkircos Aug 17, 2023
0689be2
Update CloudFilesMigrationRoute.tsx
jimniels Aug 17, 2023
988c0bb
fix migrations
davidkircos Aug 17, 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
27 changes: 27 additions & 0 deletions .github/workflows/test-api.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: API Tests
on:
push:
branches:
- main
pull_request:

jobs:
test_api:
runs-on: ubuntu-latest-4-cores

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '19'
cache: 'npm'

- name: Install Dependencies
run: |
cd quadratic-api
npm install

- name: Run Tests
run: |
cd quadratic-api
npm run docker:test:ci
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"openai",
"pixi",
"pixiapp",
"Signin",
"subquadrant",
"subquadrants"
],
Expand Down
22 changes: 17 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,32 @@ If you have any problems getting the project to run locally, please create an is
3. Install [wasm-pack](https://rustwasm.github.io/wasm-pack/installer/)
4. `rustup target add wasm32-unknown-unknown` to install the WASM toolchain

## Run Quadratic front-end locally
## Run Quadratic

In order to run the front-end and/or the server locally, you must have all the environment variables configured in `.env.local` (and `quadratic-api/.env.local` if you’re running a local server). You can grab the values from [our team Notion page](https://www.notion.so/Env-Variables-78b1a1da19d0421993abe8c449e51496?pvs=4) or by asking a team member.

### Run front-end locally

1. `npm run build:wasm` to compile the Rust code
2. `npm install` to install dependencies (run again when updating Rust)
3. `npm start` to run in browser or `npm run dev` to run with Electron
3. Configure `.env.local` values.
4. `npm start` to run in browser or `npm run dev` to run with Electron

### Run Quadrtic server locally
### Run server locally

1. `cd quadratic-api`
2. `npm i`
3. Install [postgress.app](https://postgresapp.com/) (follow instructions on website)
4. Configure `./.env` & `./quadratic-api/.env` values, including update to `DATABASE_ENV` variable to point at your local postgres db.
4. Create two environment files `.env.local` & `quadratic-api/.env.local`.

- For the `.env.local` react app ENV variables you will need to set the following variables:
`REACT_APP_AUTH0_DOMAIN` `REACT_APP_AUTH0_CLIENT_ID` `REACT_APP_AUTH0_AUDIENCE` `REACT_APP_AUTH0_ISSUER` `REACT_APP_QUADRATIC_API_URL`
You will need to ask your team for the appropriate values.

- For `quadratic-api/.env.local` you will need to set the `DATABASE_ENV` to point at your local postgres db. You will also need to copy `AUTH0_JWKS_URI` and `AUTH0_ISSUER` from `quadratic-api/.env_example` into your local `quadratic-api/.env.local` api env variables.

5. `npm run prisma:migrate`
6. `npm start`
6. Start both `npm run api:start` and `npm start`

### Run tests (TypeScript)

Expand Down
18 changes: 18 additions & 0 deletions app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"addons": [
{
"plan": "heroku-postgresql",
"options": {
"version": "15"
}
}
],
"buildpacks": [
{
"url": "https://github.com/timanovsky/subdir-heroku-buildpack"
},
{
"url": "heroku/nodejs"
}
]
}
7 changes: 6 additions & 1 deletion jest.config.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
{
"verbose": true,
"preset": "ts-jest",
"testPathIgnorePatterns": ["<rootDir>/tests-e2e/*"],
"testPathIgnorePatterns": [
"<rootDir>/tests-e2e/*",
"<rootDir>/node_modules/",
"<rootDir>/quadratic-api/*",
"<rootDir>/quadratic-core/*"
],
"transform": {
"^.+\\.(ts|tsx|js|jsx)?$": "ts-jest",
"\\.py$": "<rootDir>/jest-transformer-py"
Expand Down
Loading
Loading