-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2158 from quadratichq/qa
QA: Jan 6th
- Loading branch information
Showing
40 changed files
with
815 additions
and
123 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.6.0 | ||
0.6.1 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "quadratic", | ||
"version": "0.6.0", | ||
"version": "0.6.1", | ||
"author": { | ||
"name": "David Kircos", | ||
"email": "[email protected]", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "quadratic-client", | ||
"version": "0.6.0", | ||
"version": "0.6.1", | ||
"author": { | ||
"name": "David Kircos", | ||
"email": "[email protected]", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,36 @@ | ||
import getActiveTeam from '@/dashboard/shared/getActiveTeam'; | ||
import { apiClient } from '@/shared/api/apiClient'; | ||
import { ROUTES } from '@/shared/constants/routes'; | ||
import { ROUTES, SEARCH_PARAMS } from '@/shared/constants/routes'; | ||
import { LoaderFunctionArgs, redirect } from 'react-router-dom'; | ||
|
||
export const loader = async ({ request }: LoaderFunctionArgs) => { | ||
const url = new URL(request.url); | ||
const prompt = url.searchParams.get('prompt'); | ||
|
||
// Get the active team | ||
const { teams } = await apiClient.teams.list(); | ||
const { teamUuid } = await getActiveTeam(teams, undefined); | ||
|
||
const redirectUrl = ROUTES.CREATE_FILE(teamUuid, { prompt, private: true }); | ||
// Ensure the active team is _writeable_. If it's not, redirect them to the dashboard. | ||
// (They may have write access to another team, but not the 'active' one.) | ||
const team = teams.find(({ team }) => team.uuid === teamUuid); | ||
if (!team?.userMakingRequest.teamPermissions.includes('TEAM_EDIT')) { | ||
return redirect( | ||
`/?${SEARCH_PARAMS.SNACKBAR_MSG.KEY}=${encodeURIComponent('Failed to create file. You can only view this team.')}` | ||
); | ||
} | ||
|
||
// Are they trying to duplicate an example file? Do that. | ||
const example = url.searchParams.get('example'); | ||
if (example) { | ||
return redirect(ROUTES.CREATE_FILE_EXAMPLE(teamUuid, example)); | ||
} | ||
|
||
// Otherwise, start a new file by redirecting them to the file creation route | ||
const redirectUrl = ROUTES.CREATE_FILE(teamUuid, { | ||
// Are they creating a new file with a prompt? | ||
prompt: url.searchParams.get('prompt'), | ||
// Creating via this route is _always_ private | ||
private: true, | ||
}); | ||
return redirect(redirectUrl); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "quadratic-connection" | ||
version = "0.6.0" | ||
version = "0.6.1" | ||
edition = "2021" | ||
authors = ["David DiMaria <[email protected]>"] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "quadratic-core" | ||
version = "0.6.0" | ||
version = "0.6.1" | ||
authors = ["Andrew Farkas <[email protected]>"] | ||
edition = "2021" | ||
description = "Infinite data grid with Python, JavaScript, and SQL built-in" | ||
|
@@ -86,6 +86,7 @@ bincode = "1.3.3" | |
flate2 = "1.0.30" | ||
serde_with = "3.8.1" | ||
dateparser = "0.2.1" | ||
fancy-regex = "0.14.0" | ||
|
||
[dev-dependencies] | ||
criterion = { version = "0.4", default-features = false } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.