Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Final misc. tasks to support data previews (Step 6 of issue #1758) #2523

Merged
merged 12 commits into from
Sep 26, 2024

Conversation

robyngit
Copy link
Member

@robyngit robyngit commented Sep 12, 2024

  • Display loading & error msgs in data object view
  • Add a download button to the data object view to prevent inflating the metrics (downloads the already fetched data)
  • Limit rendering to supported formats and to maximum filesizes
  • Make rendering of table data more performant (slow right now for CSVS greated than 2 MB or so)

- Avoids inflating the download metrics, because the data has already been fetched. The download button simply triggers the download of the data file to the user's computer.
- Separate out logic for downloading fetched blob in SolrResult so it can be used independently of the DataObjectView
@robyngit robyngit changed the base branch from main to develop September 12, 2024 23:57
@robyngit robyngit changed the title Final misc. tasks to support data previews (Step 5 of issue #1758) Final misc. tasks to support data previews (Step 6 of issue #1758) Sep 12, 2024
- Instead of creating an empty table, then populating it, we now add table cell content as it's created
- Instead of rendering the table in editing mode then removing editing elements if the table is in view-mode, we now render the table without editing elements if the table is in view-mode
- Also use document fragment to append table rows to the table element, which is faster than appending each row individually

Issue #1758
- Truncate data and show a message when the table is too large

Issue #1758
- Add row numbers to parsed data rather than assuming the first column is the row number
- Handle parsing errors more gracefully
- Don't show empty CSV lines as data rows
- Allow multiple TableEditorView instances on the same page (Fix issues with dropdowns & unique IDs)
- Fix issue with adding new rows & cols in editor mode

Issue #1758
- Show error message when file type is not supported or file size is too large

Issue #1758
Can now initialize DataObjectView with a object ID or SolrModel

Issue #1758
Fixes SolrResult test
Fix a typo

Issue #1758
src/js/models/SolrResult.js Show resolved Hide resolved
src/js/models/SolrResult.js Show resolved Hide resolved
src/js/models/SolrResult.js Show resolved Hide resolved
@robyngit robyngit force-pushed the feature-1758-data-table-previews-6 branch from 2b6139d to 7ef5093 Compare September 18, 2024 21:14
@robyngit robyngit linked an issue Sep 18, 2024 that may be closed by this pull request
@robyngit robyngit marked this pull request as ready for review September 18, 2024 21:15
true,
);
},

getInfo: function (fields) {
var model = this;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [eslint] <no-var> reported by reviewdog 🐶
Unexpected var, use let or const instead.

Suggested change
var model = this;
let model = this;

Copy link
Member

@rushirajnenuji rushirajnenuji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @robyngit - this looks great, thank you for working on this. 🎉🥳

Good to have the loading and parsing indicator in the modal. 👍🏻

As we extend support for additional file formats in the upcoming release/s, may be we can consider including the file view icon to the actions panel in the data table. Thoughts?

@rushirajnenuji rushirajnenuji merged commit 85d4801 into develop Sep 26, 2024
1 check failed
@robyngit robyngit deleted the feature-1758-data-table-previews-6 branch September 26, 2024 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Data table previews
2 participants