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

FEATURE: open a system file picker directly instead of opening the import modal #126

Closed

Conversation

AndrewPrigorshnev
Copy link
Contributor

@AndrewPrigorshnev AndrewPrigorshnev commented Jul 7, 2021

To import a query into Data Explorer you need to push the button and then deal with the import modal:

Screenshot 2021-07-01 at 14 49 59

Screenshot 2021-07-01 at 14 50 05

Instead, we want just to be triggering a system file picker directly. This PR makes it happen.

In the beginning, I wanted just to move code around to fix this problem fastly but unfortunately, we have a big controller + template that makes it hard to do it without introducing technical debt. Eventually, I added a small component upload-files-button. This is a button that fires a system file picker and has an event onFilesChosen, the enclosing component (or controller) can subscribe to it. I think it's a low-pri thing but probably it's worth moving this component to core later to use it everywhere where we need a button that fires a system file-picker.

Sadly, tests are skipped. I was able to trigger an uploading event in tests, but for some reason when running tests the component receives an empty list of files. I couldn't make them work and I'm going to revisit them later.

@ZogStriP
Copy link
Member

ZogStriP commented Jul 7, 2021

I think it's a low-pri thing but probably it's worth moving this component to core later to use it everywhere where we need a button that fires a system file-picker.

I think we should do that first and then use it here in this plugin.

@AndrewPrigorshnev
Copy link
Contributor Author

AndrewPrigorshnev commented Jul 7, 2021

I think we should do that first and then use it here in this plugin

Cool, I'll do it then.

I'm closing this PR so nobody will spend time reviewing it. I'll open a new one here later when I merge the component into core.

AndrewPrigorshnev added a commit that referenced this pull request Aug 20, 2021
This is the new version of #126. Now the pick-files-button moved to core. To import a query into Data Explorer, you need to push the button and then deal with the import modal. Instead, we want just to be triggering a system file picker directly. This PR makes it happen.
@AndrewPrigorshnev AndrewPrigorshnev deleted the feature/get-rid-of-the-import-a-query-modal branch November 30, 2022 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants