-
Notifications
You must be signed in to change notification settings - Fork 116
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
feat(archive-viewer): add archive loader, viewer, and archive explorer #1112
Conversation
Verified that @mxiao6 has signed the CLA. Thanks for the pull request! |
import { Column } from 'react-virtualized/dist/es/Table/index'; | ||
import { TABLE_COLUMNS } from './constants'; | ||
|
||
const { KEY_NAME, KEY_MODIFIED_AT } = TABLE_COLUMNS; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think destructuring is necessary here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think destructuring is necessary here.
why? isn't TABLE_COLUMNS.KEY_NAME
too long?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM overall.
3d298f0
to
ac0fbf8
Compare
@@ -89,6 +91,8 @@ | |||
"raw-loader": "^3.1.0", | |||
"react": "^16.7.0", | |||
"react-dom": "^16.7.0", | |||
"react-intl": "^2.9.0", | |||
"react-tether": "^1.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is react-tether used in the virtualized table?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is react-tether used in the virtualized table?
If I don't add it, the building process gives me error about dropdown-menu. I guess it's because one of the renderers uses breadcrumb and breadcrumb imports dropdown-menu.
src/lib/ThumbnailsSidebar.js
Outdated
@@ -311,7 +311,7 @@ class ThumbnailsSidebar { | |||
* @return {Promise} - promise reolves with the image HTMLElement or null if generation is in progress | |||
*/ | |||
createThumbnailImage(itemIndex) { | |||
const cacheEntry = this.thumbnailImageCache.get(itemIndex); | |||
const cacheEntry = this.thumbnailImageCache && this.thumbnailImageCache.get(itemIndex); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change seems unrelated to the archive viewer. Is it meant to address a separate bug?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change seems unrelated to the archive viewer. Is it meant to address a separate bug?
This change is to fix a sanity test. The thumbnailImageCache
is sometimes not initialized in time because the travis testing machine is too slow. Should I open another pr for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we revert this change since we have the other PR open?
src/lib/constants.js
Outdated
@@ -93,7 +93,7 @@ export const STATUS_SUCCESS = 'success'; | |||
export const STATUS_VIEWABLE = 'viewable'; | |||
|
|||
// X-Rep-Hints for Representations API | |||
export const X_REP_HINT_BASE = '[3d][pdf][text][mp3]'; | |||
export const X_REP_HINT_BASE = '[3d][pdf][text][mp3][json]'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this have any immediate performance/capacity implications for existing file types or for the representations service? We'll be requesting json reps for all file types, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job.
Current demo video: https://cloud.box.com/s/93t1mxinwx3apngl2ahx16g1pfwfjpbq