-
Notifications
You must be signed in to change notification settings - Fork 164
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
Conversation
This pull request is automatically being deployed by Amplify Hosting (learn more). |
When processing old files to new the order is reversed: (not a big deal) Have you seen this "SCROLLABLE"? thing in the console before? What do you think about chaing the Quadratic menu to have a "back to files" option at the top the way Figma does? Still testing file actions, but haven't noticed any problems so far. @jimniels |
Ctrl + O on Windows opens the browser popup. I'm not sure if it's possible for us to override that. |
|
✅ Fixed in 242a019
I have not seen that. Was that on the preview branch environment?
✅ I like it. Updated.
✅ Fixed. Due to the responsive nature of the screen, I went with a background on both those items, so now on mobile they float over any content that scrolls under them. It could use more refinment, but it’s the quickest way to get responsive on this and i’m happy enough with it. |
It should be possible, we're overriding it in the other browsers. Not sure why this code isn't working on windows but it is on Mac. However, that said,
Hm...I can't reproduce this on Firefox for Mac. Loading a file using Whereas loading a file using
This one makes me nervous, but I haven't been able to reproduce it. I did add a check in the code that will only delete stuff when updating old files if it successfully imports it. Again, i'm not sure how this was triggered. Delete actions are only accessible in the code when triggered by a user action and confirmation via the UI. The other deletes happen only on migration files. So i'm not sure how this even happened...?
Agree. I was actually wanting to do that while I was working on this branch. But figured we'd push that for a later feature. I opened an issue for it. |
@davidkircos I added a check to the code that makes sure we only delete a file in memory when we are sure it's been imported/migrated to this new way of saving/storing files. However, it is worth noting that if a file in memory fails to migrate/import, that fails silently to the user (there's an error logged to the console). So, right now, that file just stays there in localstorage but is inaccessible to the user via the application UI. We don't tell them one of their files failed to import and there's no UI for trying to retrieve it somehow. This is less than ideal but i'm not really sure how much it happens? Maybe we should log this as a specific event in sentry just to see if it happens a lot? |
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.
Resolves #323
Functionality / things to test:
/
loads the file menu unless it's the first visit, then it loads the default file/?local={valid-file-id}
loads a file from memory/?local={invalid-text}
loads the file menu with an error/?local=foo
/?file={valid-url}
loads the.grid
file over the networkv0.3.0-beta
pulled from jsdeliver:/?file={invalid-url}
loads the file menu with an error/?file=https://google.com
CMD
+O
, Toolbar "File -> Open...", or Command Palette "File: Open..."ESC
orX
in UI.grid
URL: https://cdn.jim-nielsen.com/files/sample-file.grid.grid
URL from an old file.grid
extensionmain
onlocalhost:3000
and create a couple different files in memory, then checkout this branch and load the app and the files you created should be accessible in the file menuTodos:
main
?{File Name} - Quadratic
app
andsheetConroller
Nice to haves:
useLocalFiles
hook has an async action to load the file from memory. Would require re-architecting how this works...Leaving out:
sheetController
andapp
refactor: use react context for sheetController and pixi app #387