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

refactor(feature): remove discoverability feature check #684

Merged
merged 4 commits into from
Mar 16, 2021

Conversation

cweeii
Copy link
Contributor

@cweeii cweeii commented Mar 15, 2021

No description provided.

@cweeii cweeii marked this pull request as ready for review March 15, 2021 22:49
@cweeii cweeii requested a review from a team as a code owner March 15, 2021 22:49
@cweeii cweeii changed the title chore(feature): remove discoverability feature check chore(feature): remove discoverability and drawing feature checks Mar 15, 2021
@cweeii cweeii force-pushed the remove-discoverability-feature-check branch from 78e5e3a to c5a6106 Compare March 15, 2021 23:02
jstoffan
jstoffan previously approved these changes Mar 15, 2021
Copy link
Collaborator

@jstoffan jstoffan left a 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,
Copy link
Collaborator

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?

Copy link
Contributor Author

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: {} });
Copy link
Collaborator

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.

@cweeii
Copy link
Contributor Author

cweeii commented Mar 16, 2021

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.

ConradJChan
ConradJChan previously approved these changes Mar 16, 2021
Copy link
Contributor

@ConradJChan ConradJChan left a 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?

@cweeii cweeii changed the title chore(feature): remove discoverability and drawing feature checks chore(feature): remove discoverability feature check Mar 16, 2021
jstoffan
jstoffan previously approved these changes Mar 16, 2021
@@ -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;
Copy link
Collaborator

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.

@cweeii cweeii changed the title chore(feature): remove discoverability feature check refactor(feature): remove discoverability feature check Mar 16, 2021
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.

3 participants