-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
Data table previews #1758
Comments
As part of the markdown editor, I created a |
This would be a great addition. Seems like we might want to tweak the behavior of |
I think partial reads should definitely count as view events, but not as download events, which they currently would be. |
We also recently had a request via #1969 to display previews of .txt files as well. We should include that in our overall design for previewing data tables, too. |
Hi there @robyngit I would like to +1 this issue ticket. |
Thanks @vchendrix, looking into what would be involved to implement this |
@vchendrix we discussed this as a team today. There are some backend changes required before we're able to move forward with this in MetacatUI. These are implied in the comments above, but to summarize:
I've made in new a new Metacat issue to cover this. It's on the roadmap, but not currently a high priority for us. |
What about something simpler? Like a preview of an entire file of
certain types? e.g html, pdf, csv ( with a size threshold), text,
images.
|
Previewing only smaller and simple files was my initial thought as well @vchendrix! There would still be a problem with inflating the metrics though. We can't retrieve files without adding a "download" event to the metrics counts. So anytime someone viewed a dataset with some of the data previewed, download events would be recorded, and eventually those statistics would be inflated and not very representative anymore. If the preview wasn't automatic, for example, a user had to click a button to explore a file, then perhaps there's an argument for counting that as a download... But probably something to get some feedback on and discuss. What do you think? |
That is what I had in mind. Not an automatic preview but an intentional one. And maybe "preview" is the wrong term if they are downloading and viewing the file in their browser. I was thinking that there doesn't need to be any additional javascript for viewing the file just use the browser capabilities as most browsers can render files of different types in their native format. |
I think the MVP for this feature is:
|
and remove unused imports Issue #1758
- Separate out the logic for getting the data from DataONE from the logic for downloading that data onto the user's machine. - Allows us to use the same data fetching logic in other parts of the app, i.e. the DataONEObjectView. - Also separate out the logic for getting the file name. - Add a tests for the new functions Issue #1758
- MVP, shows CSVs in a table (no other file types yet, no loading spinner, or error handling) - Ensure TableEditorView returns the view from render() Issue #1758
- Move rendering of the download button & view data button to a new method - Render both buttons in a container div Issue #1758
- 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
MetadataView & TableEditorView cleanup (Step 1 of issue #1758)
Support rendering TableEditorView from csv (Step 2 of issue #1758)
Add a view-only mode to the Table Editor View (Step 3 of issue #1758)
Create the DataObject View (Step 4 of issue #1758)
Create the ViewObjectButtonView and use in Metadata View (Step 5 of issue #1758)
Final misc. tasks to support data previews (Step 6 of issue #1758)
Display a preview of the data table so researchers can browse a few rows of data before downloading.
Milestone CI-14 in ADC proposal.
The text was updated successfully, but these errors were encountered: