-
Notifications
You must be signed in to change notification settings - Fork 159
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: File Browser Update (urls, examples, etc) #308
Merged
Merged
Changes from all commits
Commits
Show all changes
123 commits
Select commit
Hold shift + click to select a range
a50326d
open file from url
davidkircos 2967aab
file menu updates
jimniels a4f1001
scaffolding UI
jimniels 06fd849
more tweaks
jimniels b77af0f
more tweaks
jimniels a44cad2
more tweaks
jimniels 3256779
merge latest from main
jimniels 1305b78
update topbar menu lost in merge
jimniels a494ff8
more tweaks
jimniels 3ca1481
initial refactor
davidfig b1d67ef
file loads
davidfig c20d18f
Merge branch 'main' into load-from-url-david
davidfig 431ce44
prettier
davidfig abfa922
working through useLocalFiles changes
davidfig cc9c445
sample load and save works
davidfig 6deba9b
prettier
davidfig 262262e
added query string for loading files
davidfig 7c94f3b
name untitled files
davidfig b4a7b48
rename file functionality (no UI)
davidfig 23c735f
import file (WIP)
davidfig 1cf0652
importLocalFile
davidfig b70ed93
prettier
davidfig b550e63
import file from URL
davidfig 41f0740
cleaning up files
davidfig b47800c
default open file dialog unless first time or query string
davidfig fb79b6d
Merge branch 'main' into load-from-url-david
davidfig 969afde
merge latest from main
jimniels 5cdb4dd
merge latest from load-from-url
jimniels 752beb4
Merge pull request #340 from quadratichq/load-from-url-david
jimniels 15759b5
fix: don't wrap tab panel in typography
jimniels 17a3ba3
fix: sentence case
jimniels eb6759e
fix: tweak language
jimniels a8943e9
Update TopBar.tsx
jimniels 1fe0434
Update TopBar.tsx
jimniels 6edef8e
default currentFilename to empty string
jimniels 882487e
Update useLocalFiles.ts
jimniels cbff6e8
tweaks
jimniels 2e318e7
remove console
jimniels 433f2fa
Update useLocalFiles.ts
jimniels e2ca8fb
Update useLocalFiles.ts
jimniels 3582a12
Update useLocalFiles.ts
jimniels 5142234
use favicon
jimniels e6a7c3e
Merge pull request #342 from quadratichq/load-from-url-filename
jimniels 44343b0
feat: add indicator when file is open
jimniels 31a9e85
fix: match sorting
jimniels 417e916
support delete file
jimniels c30153c
add comment
jimniels aadda01
update description
jimniels bd3fc22
fix: make language match
jimniels 80f735a
responsive layout
jimniels fa73d09
add new, delete
jimniels d4f6b48
fix: application/json + .grid
jimniels 346960a
bunch 'o stuff
jimniels c7b8485
fix: file commands
jimniels d337d6b
fix todos
jimniels 9a30851
fix: file rename and extensions
jimniels dc6a7a3
fixes
jimniels 5c9a568
rename file
jimniels e1fd4ab
run reset at the right time
jimniels 1302746
more tweaks
jimniels fafcc12
remove console
jimniels 19c771a
tweaks
jimniels 68b1030
initial changes
jimniels 147d119
refactor useLocalFiles hook
jimniels f803734
refactor
jimniels c4d957f
merge latest changes
jimniels 107116e
Merge branch 'load-from-url' into load-from-url-context
jimniels 12f1c59
tweaks
jimniels 38a1588
Merge pull request #348 from quadratichq/load-from-url-context
jimniels b7c74ab
more tweaks
jimniels 5d2d8a4
more tweaks/updates
jimniels d668c65
update examples to be based off main
jimniels b6a42bb
remove extra app.save()
jimniels 092248e
update to support multiple schemas
jimniels 92515a0
initial run at converting typescript types to zod types
jimniels f17b91f
add zod to deps
jimniels e516ab3
rename GridFileSchema type to GridFile
jimniels 65590bf
pull version from the schema
jimniels b62101b
Update useLocalFiles.ts
jimniels e12c437
more tweaks
jimniels cb90c4f
further tweaks
jimniels 37ebb5f
Update useLocalFiles.ts
jimniels d1dfbcc
refactor: app structure at load time
jimniels 4d88914
feat: add support for downloading any file in memory
jimniels 3265203
Merge branch 'main' into load-from-url
jimniels 1b6b774
revert flags change
jimniels d4760ea
refactor: sort type keys optionally, then alphabetically
jimniels 793e617
Delete FileLoadingComponent.tsx
jimniels 38e2f53
rename generic "things"
jimniels d3e0a8d
tweak download icons
jimniels 6c7e278
remove unused code
jimniels 9c41f90
remove unused prop
jimniels e24812e
Update FileMenu.tsx
jimniels b9892d3
Update useLocalFiles.ts
jimniels 3639491
more tweaks
jimniels 69f649e
Update useLocalFiles.ts
jimniels 9649b23
don't throw when you can't find the grid
jimniels 346dc59
change error to warning
jimniels 3ac1659
Merge branch 'main' into load-from-url
jimniels c624aa3
tweaks
jimniels 289025a
Update useLocalFiles.ts
jimniels 34b76ac
Update app.ts
jimniels 91d8280
update typescript
jimniels b1cd720
Merge branch 'main' into load-from-url
davidkircos 242a019
Update useLocalFiles.ts
jimniels 293f990
Update QuadraticMenu.tsx
jimniels 39754e3
fix logo on mobile
jimniels 1c4504b
fix firefox bg problem
jimniels 25b39ec
refine CMD + O functionality
jimniels 6e6203f
Merge branch 'main' into load-from-url
jimniels 7f03995
Update FileMenu.tsx
jimniels a157e6a
Merge branch 'load-from-url' of github.com:quadratichq/quadratic into…
jimniels 4849b7f
more tweaks
jimniels b993540
rename variables
davidkircos eb5ad2f
Update useLocalFiles.ts
jimniels 94e0e72
rename pixi to pixi-assets
davidkircos 9ab06ba
Merge branch 'load-from-url' of https://github.com/quadratichq/quadra…
davidkircos 151c0b7
Update useLocalFiles.ts
jimniels f1b9298
Merge branch 'load-from-url' of github.com:quadratichq/quadratic into…
jimniels 91f1b08
fixes a bug deleting the wrong cell when deleting a single cell
davidkircos 674f3e5
Merge branch 'load-from-url' of https://github.com/quadratichq/quadra…
davidkircos b5c4762
bugfix
jimniels a85a68f
Merge branch 'load-from-url' of github.com:quadratichq/quadratic into…
jimniels File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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 |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
"cSpell.words": [ | ||
"dgraph", | ||
"Fuzzysort", | ||
"pixi", | ||
"pixiapp", | ||
"subquadrant", | ||
"subquadrants" | ||
|
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
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,3 +1,34 @@ | ||
import { isMobile } from 'react-device-detect'; | ||
|
||
export const IS_READONLY_MODE = isMobile; | ||
export const DEFAULT_FILE_NAME = 'Untitled'; | ||
export const EXAMPLE_FILES = [ | ||
{ | ||
name: 'Default (example)', | ||
description: 'Quick overview of basic usage of the app.', | ||
file: 'default.grid', | ||
}, | ||
{ | ||
name: 'Python (example)', | ||
file: 'python.grid', | ||
description: 'Advanced examples of how to use Python in the app.', | ||
}, | ||
// Leaving this one out, as it has nothing useful for users | ||
// { name: 'Airports large (example)', file: 'airports_large.grid', description: 'Lorem ipsum santa dolor.' }, | ||
{ | ||
name: 'Airports distance (example)', | ||
file: 'airports_distance.grid', | ||
description: 'Example of filtering data and calculating values in the app.', | ||
}, | ||
{ name: 'Expenses (example)', file: 'expenses.grid', description: 'Example of spreadsheet-style budgeting.' }, | ||
{ | ||
name: 'Monte Carlo simulation (example)', | ||
file: 'monte_carlo_simulation.grid', | ||
description: 'Example of working with large sets of data.', | ||
}, | ||
{ | ||
name: 'Startup portfolio (example)', | ||
file: 'startup_portfolio.grid', | ||
description: 'Example with calculations from formulas and Python.', | ||
}, | ||
]; |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we need this dependency....
It looks like you can create IDs with
crypto.randomUUID()
which is a native browser feature. Support appears to be good enough (better than probably other things in our app)So I'm thinking: maybe we just strip out this dependency and use
crypto.randomUUID()
instead. Objections?cc @davidfig @davidkircos