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 new technical debt. So eventually I’ve 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.