Skip to content
This repository has been archived by the owner on Oct 29, 2024. It is now read-only.

Drag and drop a tar.gz over the app to import it #92

Closed
wants to merge 1 commit into from
Closed

Drag and drop a tar.gz over the app to import it #92

wants to merge 1 commit into from

Conversation

eigengravy
Copy link

Closes #69

@eigengravy
Copy link
Author

@benja-M-1 Currently detects .tar.gz, .tar.zst and .tar.bz2 being dropped and opens the normal ImportDialog, however it doesn't currently load the dropped file into the local file field. how should i go about implementing that? from what i gather, i have to extend the AppContext to include a setFile action.

@benja-M-1
Copy link
Member

benja-M-1 commented Oct 11, 2022

Hi @eigengravy it looks promising!

i have to extend the AppContext to include a setFile action.

What do you mean by AppContext?

how should i go about implementing that?

I don't know I thought some libraries would do it. I think @felipecruz91 gave it a try and didn't managed to get the file path.

@eigengravy
Copy link
Author

Yeah, I was not able to get the file path. I plan to look into it more.

interface IAppContext {
store: {
volume: IVolumeRow | null;
};
actions: {
setVolume(v: IVolumeRow | null): void;
};
}

If I do figure it out, I would have to extend the above right?

@benja-M-1
Copy link
Member

@eigengravy I think @lucbpz might have better knowledge than me on this question :)

@eigengravy eigengravy marked this pull request as ready for review October 12, 2022 17:47
@eigengravy
Copy link
Author

There doesn't seem to be an API to access the file path.

@benja-M-1
Copy link
Member

benja-M-1 commented Oct 17, 2022

Arf, well, in this case, I don't think we should do anything when dropping a file in the extension. I fear it will be misleading. Users will think there is a bug because it doesn't fill the file path. They might even try again thinking something was wrong and have to select it with the file picker in the end, which will add more frustration and make things even worse

@felipecruz91 WDYT?

In any case, thanks @eigengravy for spending some time on that. We really appreciate that :)

@eigengravy
Copy link
Author

Should I add a notification that dragging and dropping files is not supported?

@felipecruz91
Copy link
Contributor

Given that as of today it doesn't seem possible to get the absolute host path of the file imported when dragging it from the host to the extension view, I'm closing this PR.

Thank you @eigengravy for your time and effort in investigating this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Drag and drop a tar.gz over the app to import it
3 participants