mathesar-foundation / mathesar

Web application providing an intuitive user experience to databases.
https://mathesar.org/
GNU General Public License v3.0
2.35k stars 323 forks source link

Front end implementation for importing JSON and Excel files #3031

Open IamEzio opened 1 year ago

IamEzio commented 1 year ago

Problem

When we import data from a file (or via URL or copy-paste), we are redirected to the table preview page that looks something like this:

preview-page

Currently, our frontend assumes that every data file object is a CSV/TSV file and hence, it shows the checkbox for Use first row as header option (that corresponds to header attribute in data file object). However, after we expand our import feature for JSON and Excel files, we'll be introducing new parameters (like max_level for JSON files and sheet_number for Excel files) that need to be shown on the preview page.

Proposed solution

The frontend should recognize the type of datafile we are dealing with currently and accordingly show param option. For example, while dealing with Excel files, it should show a checkbox for Use first row as header and a number input for sheet_number param.

seancolsen commented 10 months ago

Next steps: We need a UI design phase including mockups, specs, and review