tldraw icon indicating copy to clipboard operation
tldraw copied to clipboard

[Feature]: Import functionality

Open ya332 opened this issue 2 years ago • 5 comments

What's the feature?

Can we have a feature to import files that we exported previously?

Contact Details

No response

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

ya332 avatar Aug 25 '23 20:08 ya332

Oh good—we discussed importing when we worked on the file export feature but decided to wait on this feature until "at least someone asks for it". Congrats @ya332, you're that someone!

A couple of questions, some of which you might answer, some of which we might have to answer:

  • would you expect the whole saved file to be uploaded at once, or specific pages from the saved file?
  • if there are two pages with the same name, would you expect the contents to be merged into the existing page, or have the previous page replaced by the importing page, or have a new page created so that we can keep both pages? (i.e. "My Page" and "My Page 2")
  • if there are offline assets, we'd need to upload these, which might take some time and might even fail—would you expect a loading indicator? If the uploads fail, should we fail the whole import, or just those images?

steveruizok avatar Aug 28 '23 20:08 steveruizok

I would expect whole file to be uploaded. I think My page and My page 2 approach is common. If offline assets fail, it is ok. I don't think whole import should fail.

Best


From: Steve Ruiz @.> Sent: Monday, August 28, 2023 1:52:42 PM To: tldraw/tldraw @.> Cc: Yigit Alparslan @.>; Mention @.> Subject: Re: [tldraw/tldraw] [Feature]: Import functionality (Issue #1828)

Instead of opening them? We discussed this when we worked on the file export feature but decided to wait on this feature until "at least someone asks for it". Congrats @ya332https://github.com/ya332, you're that someone!

A couple of questions, some of which you might answer, some of which we might have to answer:

  • would you expect the whole saved file to be uploaded at once, or specific pages from the saved file?
  • if there are two pages with the same name, would you expect the contents to be merged into the existing page, or have the previous page replaced by the importing page, or have a new page created so that we can keep both pages? (i.e. "My Page" and "My Page 2")
  • if there are offline assets, we'd need to upload these, which might take some time and might even fail—would you expect a loading indicator? If the uploads fail, should we fail the whole import, or just those images?

— Reply to this email directly, view it on GitHubhttps://github.com/tldraw/tldraw/issues/1828#issuecomment-1696395486, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGGSBVFOYWYRMHXBRMKN7UTXXUAJVANCNFSM6AAAAAA367C2IM. You are receiving this because you were mentioned.Message ID: @.***>

ya332 avatar Aug 28 '23 23:08 ya332

When this feature going to be added? D:

GodDoesNotPlayDice avatar Jul 07 '24 18:07 GodDoesNotPlayDice

@steveruizok

would you expect the whole saved file to be uploaded at once, or specific pages from the saved file?

I expect to export all pages by default, but it would be nice if there's a popup that allows me to select which pages to include/exclude.

if there are two pages with the same name, would you expect the contents to be merged into the existing page, or have the previous page replaced by the importing page, or have a new page created so that we can keep both pages? (i.e. "My Page" and "My Page 2")

I think it's better to keep both pages. But I think the name of new page could have the import time like this My Page (2024-07-20T09:30:00Z

if there are offline assets, we'd need to upload these, which might take some time and might even fail—would you expect a loading indicator? If the uploads fail, should we fail the whole import, or just those images?

I think offline assets failure should not prevent the whole import. I expect to have a list of failures and be able to reupload each of them manually later.

xuanswe avatar Jul 20 '24 07:07 xuanswe

For me this works perfect: https://github.com/tldraw/tldraw/issues/1650

metamn avatar Aug 01 '24 12:08 metamn

This issue has been marked as stale because it has been open for 150 days with no activity. If there's no further discussion, it'll be closed in 30 days time. If you would like to ensure it stays open, you can comment on the issue and revive the discussion. Or, you can add the 'keep' label to prevent it from being closed.

github-actions[bot] avatar Jan 01 '25 00:01 github-actions[bot]

This issue was closed because it has been inactive for 30 days since being marked as stale.

github-actions[bot] avatar Mar 01 '25 00:03 github-actions[bot]