konveyor / tackle2-ui

Tackle (2nd generation) UI component.
Apache License 2.0
8 stars 43 forks source link

:sparkles: Enhance ImportApplicationsForm: support for XLS, XLSX, ODS file formats #2104

Open Shevijacobson opened 2 months ago

Shevijacobson commented 2 months ago

adds support for uploading Excel (.xlsx, .xls) and OpenDocument Spreadsheet (.ods) formats in addition to CSV. It extends the file import functionality to support more common spreadsheet formats.

Before the Changes

Successful Upload of Supported File: This screenshot shows a successful upload of a CSV file, which was the only supported format in the original version.

Screenshot from 2024-10-30 12-39-03

Selecting an Unsupported File: Attempting to upload a file that is not in CSV format results in an error.

Screenshot from 2024-10-30 13-53-31

Error Message for Unsupported File: An error message is shown, as only CSV files were supported prior to this update.

Screenshot from 2024-10-30 12-58-25

After the Changes

Successful Upload of Supported File: The interface now accepts and processes files with .xlsx, .xls, and .ods extensions.

Screenshot from 2024-10-30 12-40-18

Selecting an Unsupported File: Attempting to upload a file that is still unsupported, triggering an error.

Screenshot from 2024-10-30 12-38-52

Error Message for Unsupported File: The system accurately displays an error when an unsupported file is chosen.

Screenshot from 2024-10-30 12-36-18

List of Uploaded Files with Supported Extensions: Successfully uploaded files, including .xlsx and .ods, now appear in the upload list.

Screenshot from 2024-10-30 12-40-48

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 41.98%. Comparing base (b654645) to head (e3b1f6f). Report is 244 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2104 +/- ## ========================================== + Coverage 39.20% 41.98% +2.78% ========================================== Files 146 175 +29 Lines 4857 5630 +773 Branches 1164 1415 +251 ========================================== + Hits 1904 2364 +460 - Misses 2939 3145 +206 - Partials 14 121 +107 ``` | [Flag](https://app.codecov.io/gh/konveyor/tackle2-ui/pull/2104/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=konveyor) | Coverage Δ | | |---|---|---| | [client](https://app.codecov.io/gh/konveyor/tackle2-ui/pull/2104/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=konveyor) | `41.98% <ø> (+2.78%)` | :arrow_up: | | [server](https://app.codecov.io/gh/konveyor/tackle2-ui/pull/2104/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=konveyor) | `?` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=konveyor#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Shevijacobson commented 3 weeks ago

Looks good! Please attach some screenshots presenting the change and error message.

I have added screenshots that present the changes and the error message as requested.

Shevijacobson commented 3 weeks ago

Does the hub support file uploads of those types? What issue or ticket is this PR fixing? Is it #2112?

The hub currently only supports CSV files, so I handle the file format conversion in the UI. Now, supported file types (like Excel and OpenDocument) are converted to CSV in the UI before being uploaded to the server. This approach avoids needing to add additional format support on the server. Done in 9114f1e6c808bab70716c8acfafb473885a82ee6

The issue related is: https://github.com/konveyor/enhancements/issues/121 Regarding issue #2112 - we could not reproduce it.