-
Notifications
You must be signed in to change notification settings - Fork 492
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
Checksum truncation, click to copy + file metadata fragment code consolidation #7312
Conversation
…from file replace pg [ref #7081]
TO-DO
See line 55 of file-info-fragment.xhtml, for an outstanding to-do, as I had to comment out the file metadata download count because it resulted in a nullPointer on the dataset pg.
|
…up thumbnail code [ref #7081]
Resolved nullPointer resulting from getGuestbookResponseCount in the file-info-fragment with the supervision of @pdurbin. Pointed the include to the guestbookResponseServiceBean instead. Removed no longer necessary backing bean code from DatasetPage. Also cleaned up the thumbnail code in the include, as it was pointing to EditDatafilesPage for render logic, so pointed it to dataFileServiceBean instead. Removed no longer necessary backing bean code, including |
…et pg file table [ref #7081]
We can put these changes up against the develop branch as independent code cleanup after Kebabs are merged |
This PR has been updated to include truncating of the checksum and click to copy in the file table on the dataset pg and in the file result card on the dataverse pg. There is considerable code clean up and responsive improvements included, but more work to do on both of those front, so this PR will only be linked to the already consolidated and closed issue Long (e.g. SHA-512) fixity checksums are too long for display #5210. |
…t add src/main/java/edu/harvard/iq/dataverse/UserNotification.javagit add src/main/java/edu/harvard/iq/dataverse/UserNotification.java
Things noticed, not necessarily bugs:
|
Based on the demo feedback, I've cleaned up the follow...
Sending back to QA. |
Works great @mheppler |
What this PR does / why we need it:
Long checksums (see SHA512) are too long to display in the file table, so they are truncated to only display first 3 and last 3 characters, with a hover tooltip to display the entire checksum/UNF string and provide "click to copy" directions for the user. Added word-break CSS to wrap long checksums to another line within container widths across dataset, file and upload/edit pg metadata views.
Overwrite css property from PrimeFaces component.css that was applying the hidden value to the overflow property of table cells in the dataTable component. Applied a new style attribute to the file dataTable on the dataset pg, so that it no longer cuts off long strings when the overflow is hidden by the width of the containing table cell.
Consolidated file metadata on dataset pg by using file-info-fragment from file replace pg. For the files table on the dataset pg, filesFragment.xhtml uses 87 lines code that can also be found on files-info-fragment.xhtml, which was created as part of file replace. This is an attempt to clean up and consolidate that code, making it easier to manage going forward. Already there was not-all-that-recently added file metadata displayed on the dataset pg that was not added to the file replace pg (e.g. file path/hierarchy).
There were also other responsive layout improvements to the file table, as part of the constant effort to improve the UI and UX for all users, on all devices.
Which issue(s) this PR closes:
Closes #5210 Long (e.g. SHA-512) fixity checksums are too long for display (NOTE, this issue was already closed and consolidated into #6685, but this PR does not address all issues outlined in that effort)
Closes #5215 Search Result Cards - Missing UNF + Variables, Observations for tabular files
Special notes for your reviewer:
This will effect the file metadata, thumbnails, tags, unfs, downloads on the dataset pg and file replace pg and S3-download dataverse package popup.
All checksums/UNF's in the file table on the dataset pg and file cards on the dataverse pg, will now be truncated, displaying just the type label (e.g. MD5, SHA512, UNF:6:, et al), then the first three unique characters, then "..." in place of the truncated middle portion of the string, and then the last three unique characters (NOTE: UNF strings end with either a "=" or "==" suffix, so three characters will be displayed prior to those characters).
Suggestions on how to test this:
Hover over the truncated checksum in the file table on the dataset pg, as well as file result cards on the dataverse pg, to see the full checksum. Click to copy to clipboard. You can also see the checksum info logged in the browser console.
Check out the dataset version differences popup and make sure all long checksums are displayed in full.
Make sure the file metadata, thumbnails, tags, unfs, downloads on the dataset pg and file replace pg and download dataverse package on S3 popup are all kosher still.
Does this PR introduce a user interface change? If mockups are available, please link/include them here:
No mockups. Checksum is truncated to only show first 3 and last 3 digits. Hover to see full checksum displayed in a browser title tooltip.
Is there a release notes update needed for this change?:
N/A
Additional documentation:
N/A