FEATURE: open a system file picker directly instead of opening the import modal #126
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
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 eventonFilesChosen
, 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.