This spec is a starting point and has been through basic engineering and product reviews. It is not ready for implementation yet. It will have further updates and reviews before we are ready to start implementing this.
Adding a new table from a file import allows users to input data into Mathesar without populating tables manually. This feature is also convenient for users who need to import data for testing Mathesar’s functionality.
Data import navigation link will be found on the active schema page. Once clicked the user will be taken to select upload method screen.
The import screen has a detailed description on what file types are allowed and information about processing and next steps.
There is a link for user to download sample files for reference of valid files to be uploaded.
There are three radio buttons for selecting an upload method. Each radio button has a small description for the choice. Once the user select an option, the rectangular area on the right side has that respective upload method view.
Once the user selects this upload method, the user gets clickable area where the user can drag & drop a local file or click on it for browsing the file locally.
Once the user selects this upload method, the user gets an input text block for URI where they can paste valid URI and click on continue to upload the file.
Once the user selects this upload method, the user gets a textarea to paste data for the table. Once the data is valid, the user can upload by clicking on the continue button.
This is the stage where the uploaded file is processed. The user sees the progress and updates related to the import here.
On the processing screen there is a progress bar which indicates where the upload and import process is. There will also be small messages below the progress bar to keep user informed about the process/status.
The user can also cancel the import by clicking on the cancel button. But the user will have to confirm the cancellation by the modal in Abandon scenario
If there is any error in the import, the user will see an error message modal with the import screen in background. Cancelling the modal will take users back to import screen.
The user can rename the table on the confirmation stage.
This is a check box. If checked, the user can use the first row as the header.
There is a small table summary above the table.
The table’s first row are headers. This row has checkbox which is when checked the column is included in the table. The second row has the data type of the column.
Since multiple scrolls on the screen is a bad UX. I propose limiting table’s height to a certain percentage of the screen height. The percentage might be more clearer when we include styling part here. But as far as I think 25-35% of screen height for the table would suffice.
When the settings beside the data types is clicked, the user is presented with a choice of compatible data types. The compatible data types will be similar to the table view. The data options will not be available at this point.
The user can abandon import process at ceratin points in the journey.
If the user abandons the import at the processing stage, the user will be given a warning in form of modal to notify that if they abandon this they will lose the file.
If the user abandons the import at the confirmation stage, the user will be given a warning in form of modal to notify that if they want to abandon it or not.
If the table is unconfirmed, there will be a warning icon on the side of table listing which when hovered on will have a confirm warning. When clicked on the table listing the user will be taken to confirmation stage.
If the user tries to use an unconfirmed table, there will be a modal for confirming the table where the user can directly confirm the table or go to the confirmation view. They won’t be able to use it without confirming it.