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: save and restore workspaces, add menu bar #79

Merged
merged 12 commits into from
Jun 4, 2024
Merged

feat: save and restore workspaces, add menu bar #79

merged 12 commits into from
Jun 4, 2024

Conversation

j4k0xb
Copy link
Owner

@j4k0xb j4k0xb commented May 17, 2024

Closes #78

Copy link

netlify bot commented May 17, 2024

Deploy Preview for webcrack ready!

Name Link
🔨 Latest commit 12fb255
🔍 Latest deploy log https://app.netlify.com/sites/webcrack/deploys/665f6f97675831000887b5c9
😎 Deploy Preview https://deploy-preview-79--webcrack.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

@0xdevalias 0xdevalias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few questions/comments/thoughts.

See also my feedback in this comment:


function restoreSavedModels() {
batch(() => {
models().forEach((model) => model.dispose());

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this clear any currently open tabs? If so, I wonder if that might be unexpected for users sometimes?

Realistically (at least with the current 5sec countdown on the restore dialog) it's probably rare (but not impossible) that you would get in a state of having open work that gets lost via this.

I wonder if making it so it only closes if it's the default/empty 'new tab' might be safer?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this clear any currently open tabs

Yes, they can't be kept because each model needs to have an unique URI (path)
A possibility would be saving them before or showing a confirm dialog

apps/playground/src/App.tsx Outdated Show resolved Hide resolved
apps/playground/src/App.tsx Outdated Show resolved Hide resolved
@j4k0xb j4k0xb changed the title feat: save and restore models with indexedDB feat: save and restore workspaces, add menu bar Jun 4, 2024
@j4k0xb j4k0xb merged commit 4863fda into master Jun 4, 2024
6 checks passed
@j4k0xb j4k0xb deleted the indexeddb branch June 24, 2024 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants