-
Notifications
You must be signed in to change notification settings - Fork 47
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
refactor(feature): remove discoverability feature check #684
refactor(feature): remove discoverability feature check #684
Conversation
78e5e3a
to
c5a6106
Compare
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 these be separate PRs?
test/index.html
Outdated
|
||
/* global Box */ | ||
var preview = new Box.Preview(); | ||
|
||
preview.show(fileid, token, { | ||
container: '.preview-container', | ||
boxAnnotations: annotations, | ||
enableAnnotationsDiscoverability: true, | ||
enableAnnotationsImageDiscoverability: true, |
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 remove the image discoverability feature, as well?
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 spoke with @ConradJChan , seems like a good idea, will update!
test/index.html
Outdated
@@ -56,15 +56,14 @@ | |||
} | |||
|
|||
/* global BoxAnnotations */ | |||
var annotations = new BoxAnnotations(null, { features: { discoverability: true, drawing: true } }); | |||
var annotations = new BoxAnnotations(null, { features: {} }); |
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.
It looks like we can remove the features
object now.
I figure the cleanup of the feature checks was pretty small, so I didn't split them into separate prs. If you see something that I missed please let me know! I'm all for splitting them up if it makes the change more organized. |
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, should this be a refactor
commit instead?
src/document/DocumentAnnotator.ts
Outdated
@@ -95,8 +95,7 @@ export default class DocumentAnnotator extends BaseAnnotator { | |||
managers.add(new RegionManager({ location: pageNumber, referenceEl: pageReferenceEl, resinTags })); | |||
|
|||
const canvasLayerEl = pageEl.querySelector<HTMLElement>('.canvasWrapper'); | |||
const referenceEl = | |||
this.isFeatureEnabled('discoverability') && canvasLayerEl ? canvasLayerEl : pageReferenceEl; | |||
const referenceEl = canvasLayerEl || pageReferenceEl; |
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.
We could probably inline this in the object literal below, if desired.
This reverts commit 0160d0a.
No description provided.