- 16 Oct, 2020 1 commit
-
-
Robert Knight authored
f96af43d added support for PDF.js >= v2.5.207 by changing an event listener to use PDF.js's internal event bus rather than DOM events. However there was another DOM event listener for the `pagesloaded` event in `src/annotator/anchoring/pdf.js` that should also have been updated but was overlooked. This didn't cause a problem in testing with the dev server because the test documents load quickly enough that they are already loaded by the time the client's anchoring logic ran. This commit updates the way that the client listens for events from PDF.js to use the event bus where available and only fall back to the DOM in versions of PDF.js that don't support it. - Use PDF.js's event bus to listen for `documentload`/`documentloaded` and `pagesloaded` events - Add a fallback method to wait for event bus to become available in versions of PDF.js which support the eventBus but don't have the `initializedPromise` API - Improve the documentation around which versions of PDF.js support different event types and event dispatch methods - Add tests to cover the behavior from different releases of PDF.js For an overview of the different versions of PDF.js that the client needs to support, see https://github.com/hypothesis/client/issues/2643.
-
- 15 Oct, 2020 1 commit
-
-
Robert Knight authored
`TagEditor` tested if the browser was IE 11 to determine whether to check the `inputType` property of `InputEvent`. However it is not only IE 11 that did not support this property. From reading the comments in https://github.com/hypothesis/client/pull/1558 it appears that the `inputType` checks was originally added to resolve an issue with accepting suggestions by pressing Enter in an earlier version of `TagEditor` that used the `<datalist>` element. As far as I can tell this is no longer applicable. `<datalist>` was replaced by a custom UI and accepting suggestions by pressing Enter works without this logic. Therefore this commit removes it entirely.
-
- 14 Oct, 2020 8 commits
-
-
Robert Knight authored
The sidebar application failed to load in Safari 10 due to the ES 2018 polyfill bundle, which contains a polyfill for `Promise.prototype.finally`, not being loaded in that browser. The issue was that 'es2018' was not listed in the polyfill bundles to build in `gulpfile.js` or in the list of bundles required by the sidebar app in `boot.js`. This commit fixes these issues and makes the issue less likely to occur in future by: - Removing the need to manually list each polyfill bundle in `gulpfile.js`. Instead the `src/shared/polyfills` dir is listed and every non-`index.js` file is used as the root of a bundle. - Factoring out the polyfills common to the sidebar and annotator app into a variable and including "es2018" there
-
Robert Knight authored
Element.closest is natively supported [1] by our minimum browser targets. [1] https://developer.mozilla.org/en-US/docs/Web/API/Element/closest#Browser_compatibility
-
Robert Knight authored
This API is available in Edge Legacy but with a quirk that arguments that are optional in the spec are required in this browser. This fixes an issue that the client would incorrectly abort startup in Edge Legacy with a warning that the browser is unsupported.
-
Robert Knight authored
This polyfilled the optional-ness of the `filter` and deprecated `expandEntityRefrences` arguments of `document.createNodeIterator` in IE 11, which is no longer supported.
-
Robert Knight authored
This was only needed for IE 11, which is no longer supported.
-
Robert Knight authored
This was only needed for IE 11, which is no longer supported.
-
Robert Knight authored
This was only needed for IE 11, which is no longer supported.
-
Robert Knight authored
Run a series of feature tests at the very start of the boot process and abort with a console warning if they fail. We display a console warning rather than a louder warning to avoid being disruptive on sites maintained by publishers which embed Hypothesis and which still want to support older browsers. On those sites the Hypothesis annotation feature will simply be missing.
-
- 13 Oct, 2020 9 commits
-
-
Robert Knight authored
The sidebar app failed to start in Edge Legacy due to `element.dir = "auto` assignments causing an exception during Preact component rendering. We already had a fix for this that applied to IE 11, so the fix for this problem is to change the check to test for the bug specifically rather than testing the user agent.
-
dependabot-preview[bot] authored
Bumps [sass](https://github.com/sass/dart-sass) from 1.26.12 to 1.27.0. - [Release notes](https://github.com/sass/dart-sass/releases) - [Changelog](https://github.com/sass/dart-sass/blob/master/CHANGELOG.md) - [Commits](https://github.com/sass/dart-sass/compare/1.26.12...1.27.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
dependabot-preview[bot] authored
Bumps [terser](https://github.com/terser/terser) from 5.3.4 to 5.3.5. - [Release notes](https://github.com/terser/terser/releases) - [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md) - [Commits](https://github.com/terser/terser/compare/v5.3.4...v5.3.5) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
dependabot-preview[bot] authored
Bumps [@sentry/browser](https://github.com/getsentry/sentry-javascript) from 5.25.0 to 5.26.0. - [Release notes](https://github.com/getsentry/sentry-javascript/releases) - [Changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md) - [Commits](https://github.com/getsentry/sentry-javascript/compare/5.25.0...5.26.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
dependabot-preview[bot] authored
Bumps [focus-visible](https://github.com/WICG/focus-visible) from 5.1.0 to 5.2.0. - [Release notes](https://github.com/WICG/focus-visible/releases) - [Commits](https://github.com/WICG/focus-visible/compare/v5.1.0...v5.2.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
dependabot-preview[bot] authored
Bumps [sinon](https://github.com/sinonjs/sinon) from 9.1.0 to 9.2.0. - [Release notes](https://github.com/sinonjs/sinon/releases) - [Changelog](https://github.com/sinonjs/sinon/blob/master/CHANGELOG.md) - [Commits](https://github.com/sinonjs/sinon/compare/v9.1.0...v9.2.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
dependabot-preview[bot] authored
Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.767.0 to 2.771.0. - [Release notes](https://github.com/aws/aws-sdk-js/releases) - [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-js/compare/v2.767.0...v2.771.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
dependabot-preview[bot] authored
Bumps [eslint-plugin-react](https://github.com/yannickcr/eslint-plugin-react) from 7.21.3 to 7.21.4. - [Release notes](https://github.com/yannickcr/eslint-plugin-react/releases) - [Changelog](https://github.com/yannickcr/eslint-plugin-react/blob/master/CHANGELOG.md) - [Commits](https://github.com/yannickcr/eslint-plugin-react/compare/v7.21.3...v7.21.4) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
dependabot-preview[bot] authored
Bumps [eslint](https://github.com/eslint/eslint) from 7.10.0 to 7.11.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v7.10.0...v7.11.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
- 12 Oct, 2020 6 commits
-
-
Eduardo Sanz García authored
Code reorganisation: * Adder has a simplified API: added a public method display that internally calls private methods _target and _showAt * Performance improvement in _target method by removing multiple calls to this._width() and this._height() * More strict type for arrowDirection
-
Eduardo Sanz García authored
resolves #2009
-
Robert Knight authored
This makes it easier to use the dev server for testing Hypothesis on mobile devices with smaller screens (ie. phones).
-
Robert Knight authored
The issue is not specific to Chrome-based browsers on Android, although it does cause much more of a problem in that browser than Safari on iOS.
-
Robert Knight authored
Expand and revise several JSDoc comments following feedback from Lyza in https://github.com/hypothesis/client/pull/2622.
-
Robert Knight authored
Improves the documentation of parameter types and class and method descriptions.
-
- 09 Oct, 2020 2 commits
-
-
Kyle Keating authored
When selecting text on the android, it was possible to also highlight the text inside the buttons in the adder. When this happened, the range would grab everything from where you started to highlight to the very end of the dom because the adder is attached as the last node inside body. The simple fix is to prohibit text selection inside the adder which prevents the selection from getting the adder itself.
-
Lyza Danger Gardner authored
Add a non-OCR'd PDF available to the local dev server to aid developers
-
- 08 Oct, 2020 4 commits
-
-
Robert Knight authored
As one of the final parts of removing the client's jQuery dependency, use DOM APIs to defer annotator initialization until the document has loaded.
-
Robert Knight authored
-
Robert Knight authored
There is no CoffeeScript code left in the codebase so we don't need this any more.
-
Kyle Keating authored
-
- 07 Oct, 2020 6 commits
-
-
Lyza Danger Gardner authored
Make current set of tests pass
-
Lyza Danger Gardner authored
-
Lyza Danger Gardner authored
-
Lyza Danger Gardner authored
-
Lyza Danger Gardner authored
* Add tests for extracted code * Skip a couple of `BucketBar` tests that are difficult to patch up during migration
-
Robert Knight authored
Remove the logic that was intended to ignore Hypothesis UI when generating range selectors. We don't need this any more because all Hypothesis UI elements in the host page which contain text have `user-select` set to prevent text selection. This affects the bucket bar, vertical toolbar and adder. In addition, the logic did not serve its intended purpose as it only applied to range selector generation. If the user did somehow succeed in selecting text in the bucket bar for example the client would still generate quote and position selectors that referred to that content. What the client would need to do instead is modify the range from which the annotation's selectors were generated. As a side effect this fixes a regression introduced in a5540581 which caused range selector generation to fail in Chrome and Firefox due to use of `:not(<inner selector>)` selector where `<inner selector>` is a list of selectors (the `IGNORE_SELECTOR` value from `guest.js`).
-
- 06 Oct, 2020 3 commits
-
-
Lyza Danger Gardner authored
The recently-added `button-hover` mixin, used by the base `button` mixin and thus inherited by other button mixins, applied hover styling to focused buttons, but other button mixins that adjust hover styling were not applying hover styling to focused buttons. Update mixins to consistently apply hovered styling to focused buttons Fixes #2610
-
Kyle Keating authored
-
Robert Knight authored
Handle scenarios flagged by type checking where `nodeFromXPath` may return `null` or a non-Element node. Previously it could never return `null` but would throw an exception if the node was not found. In the new code a check is needed. The case where `nodeFromXPath` returned a non-Element node would never happen with XPaths generated by the client but could happen if an annotation was created via the API with a non-simple XPath.
-