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(discoverability): add class to bp-content if FF is enabled #1256

Merged
merged 18 commits into from
Sep 17, 2020

Conversation

ChenCodes
Copy link
Contributor

@ChenCodes ChenCodes commented Sep 15, 2020

  • add bp-annotatons-discoverable to bp-content if FF is enabled in setup method
  • add bp-annotations-create--region to bp-content if FF is enabled and mode was explicitly changed to REGION
  • remove bp-annotations-create--region from bp-content if FF is enabled and mode was changed to anything other than REGION
  • update tests

@ChenCodes ChenCodes requested a review from a team as a code owner September 15, 2020 21:54
src/lib/viewers/BaseViewer.js Outdated Show resolved Hide resolved
src/lib/viewers/BaseViewer.js Outdated Show resolved Hide resolved
src/lib/viewers/BaseViewer.js Outdated Show resolved Hide resolved
src/lib/viewers/BaseViewer.js Outdated Show resolved Hide resolved
src/lib/viewers/BaseViewer.js Outdated Show resolved Hide resolved
src/lib/viewers/BaseViewer.js Outdated Show resolved Hide resolved
src/lib/viewers/BaseViewer.js Outdated Show resolved Hide resolved
src/lib/viewers/__tests__/BaseViewer-test.js Outdated Show resolved Hide resolved
add: sandbox.stub(),
remove: sandbox.stub(),
},
removeEventListener: sandbox.stub(),
Copy link
Contributor

Choose a reason for hiding this comment

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

Is removeEventListener needed?

Copy link
Contributor Author

@ChenCodes ChenCodes Sep 16, 2020

Choose a reason for hiding this comment

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

Yeah it looks like it's needed as this error shows up if I remove that line:

 undefined is not a constructor (evaluating 'this.containerEl.removeEventListener('contextmenu', this.preventDefault)')

src/lib/viewers/BaseViewer.js Outdated Show resolved Hide resolved
src/lib/viewers/__tests__/BaseViewer-test.js Outdated Show resolved Hide resolved
@ChenCodes ChenCodes changed the title feat(discoverability): add class to docEl if FF is enabled feat(discoverability): add class to bp-content if FF is enabled Sep 17, 2020
ConradJChan
ConradJChan previously approved these changes Sep 17, 2020
src/lib/constants.js Outdated Show resolved Hide resolved
mxiao6
mxiao6 previously approved these changes Sep 17, 2020
@mergify mergify bot merged commit c6e3379 into box:master Sep 17, 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.

3 participants