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

feat(preview): Add currentFileVersionId in preview options #2249

Merged
merged 1 commit into from
Jul 22, 2020

Conversation

mxiao6
Copy link
Contributor

@mxiao6 mxiao6 commented Jul 22, 2020

The prerequisite of box/box-annotations#542

@@ -761,6 +761,11 @@ class ContentPreview extends React.PureComponent<Props, State> {

if (selectedVersion) {
setProp(fileOpts, [fileId, 'fileVersionId'], selectedVersion.id);
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems like the logic here is the same as what was in box-annotations, just moved up a level. Why isn't it working as-is?

Copy link
Contributor Author

@mxiao6 mxiao6 Jul 22, 2020

Choose a reason for hiding this comment

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

box-content-preview fetches file version and modifies file.file_version to be the file version that user is viewing. So they're always the same in box-annotations.

Copy link
Contributor

Choose a reason for hiding this comment

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

Gotcha. Should we pass down the "current" file version id as a separate property rather than the derived boolean value?

@mxiao6 mxiao6 changed the title feat(preview): Add isCurrentFileVersion in preview options feat(preview): Add currentFileVersionId in preview options Jul 22, 2020
@mergify mergify bot merged commit b527df8 into box:master Jul 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants