- 05 Oct, 2020 3 commits
-
-
Lyza Danger Gardner authored
-
Robert Knight authored
Previously plugin initialization happened in several steps: 1. The plugin constructor was called with the root element and config options 2. The plugin's `annotator` property was set to a reference to the `Guest` instance for the current document 3. The plugin's `pluginInit` method was called There was no real need for this multi-step process. This commit simplifies it by removing the `pluginInit` method and passing the guest reference as a third argument to the constructor in step 1. As a result, the `Plugin` base class is no longer needed. Plugins now extend the parent `Delegator` class instead.
-
Eduardo Sanz García authored
-
- 02 Oct, 2020 3 commits
-
-
Kyle Keating authored
- Convert types to js - Add missing test coverage in types module
-
Robert Knight authored
Respond to PR feedback by updating comments
-
Robert Knight authored
For reasons that AFAIK are no longer relevant, there were two implementations of XPath generation for use in serializing range selectors. Since we're removing jQuery from the Hypothesis client, this removes the jQuery implementation and simplifies the remaining DOM-only one. - Remove jQuery XPath generation - Change the non-jQuery implementation to take DOM Nodes as input rather than jQuery collections - Simplify and add type documentation for the remaining implementation - Correct the documentation for `xpathFromNode`. The previous comments said that it _evaluated_ XPaths but actually it _generates_ them.
-
- 30 Sep, 2020 1 commit
-
-
Robert Knight authored
The `el` property of PDF pages was removed from PDF.js in February 2015 in eed67ea8bbba61a05877a99dc2f03b5adad5a288 so we can remove this check while still supporting older versions of PDF.js that we care about. Also rewrite an unnecessarily complex loop header. The `pagesCount` property cannot be negative, so there is no need to check for this.
-
- 29 Sep, 2020 12 commits
-
-
Kyle Keating authored
This was to be deleted with recent changes to range and xpath coffescript to js conversions but omitted by mistake at that time.
-
Robert Knight authored
-
dependabot-preview[bot] authored
Bumps [postcss](https://github.com/postcss/postcss) from 8.0.7 to 8.1.1. - [Release notes](https://github.com/postcss/postcss/releases) - [Changelog](https://github.com/postcss/postcss/blob/master/CHANGELOG.md) - [Commits](https://github.com/postcss/postcss/compare/8.0.7...8.1.1) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
dependabot-preview[bot] authored
Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 5.3.0 to 5.3.1. - [Release notes](https://github.com/puppeteer/puppeteer/releases) - [Commits](https://github.com/puppeteer/puppeteer/compare/v5.3.0...v5.3.1) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
dependabot-preview[bot] authored
Bumps [preact](https://github.com/preactjs/preact) from 10.4.8 to 10.5.3. - [Release notes](https://github.com/preactjs/preact/releases) - [Commits](https://github.com/preactjs/preact/compare/10.4.8...10.5.3) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
dependabot-preview[bot] authored
Bumps [vinyl](https://github.com/gulpjs/vinyl) from 2.2.0 to 2.2.1. - [Release notes](https://github.com/gulpjs/vinyl/releases) - [Commits](https://github.com/gulpjs/vinyl/compare/v2.2.0...v2.2.1) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
dependabot-preview[bot] authored
Bumps [karma](https://github.com/karma-runner/karma) from 5.2.2 to 5.2.3. - [Release notes](https://github.com/karma-runner/karma/releases) - [Changelog](https://github.com/karma-runner/karma/blob/master/CHANGELOG.md) - [Commits](https://github.com/karma-runner/karma/compare/v5.2.2...v5.2.3) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
dependabot-preview[bot] authored
Bumps [terser](https://github.com/terser/terser) from 5.3.2 to 5.3.3. - [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.2...v5.3.3) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
dependabot-preview[bot] authored
Bumps [eslint](https://github.com/eslint/eslint) from 7.9.0 to 7.10.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.9.0...v7.10.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.757.0 to 2.762.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.757.0...v2.762.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.20.6 to 7.21.2. - [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/commits) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
dependabot-preview[bot] authored
Bumps [dompurify](https://github.com/cure53/DOMPurify) from 2.0.17 to 2.1.1. - [Release notes](https://github.com/cure53/DOMPurify/releases) - [Commits](https://github.com/cure53/DOMPurify/compare/2.0.17...2.1.1) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
- 28 Sep, 2020 3 commits
-
-
Lyza Danger Gardner authored
Remove check for experimental config option—always lay out PDF side-by-side with sidebar when there is enough room to do so. Fixes https://github.com/hypothesis/product-backlog/issues/1139
-
Robert Knight authored
Convert the PDF.js document viewer plugin from CoffeeScript to JS and add some basic tests - the previous implementation did not have any. Also add initial types for anchors, anchoring modules and the subset of the `Guest` class that is used by various plugins via their `annotator` property.
-
Robert Knight authored
Remove jQuery in places where it can easily be replaced with DOM APIs.
-
- 25 Sep, 2020 7 commits
-
-
Kyle Keating authored
- Remove xpath.coffee as it is no longer needed - Add missing unit tests for range.js module
-
Kyle Keating authored
-
Lyza Danger Gardner authored
Debounce the `_update` method to improve browser performance in responding to DOM mutations (PDF annotation highlights re-draw more smoothly).
-
Robert Knight authored
Bug #2502 arises from an issue with the asynchronous code in guest that relies on `requestAnimationFrame` before drawing highlights for a particular anchor range. When the DOM is being mutated in multiple ways, the range present in the synchronous `highlight` code can be different from the range once the `requestAnimationFrame` — i.e. it could have changed again since the range was sniffed in the `highlight` method. The call to `range.normalize` in the rAF callback in these cases might be operating on a range that is effectively invalid per the `normalize` method's (unwritten) expectations. That in turn throws and then causes a failure of highlight drawing until the document is reloaded. Some brittleness in `range` methods and other dependencies makes this challenging to fix easily in an asynchronous manner. It's unclear exactly why rAF asynchronicity was added (see ca87c1c5 ). As such, we've elected for now to remove `rAF` and make `highlight` code synchronous here. Fixes #2502
-
Robert Knight authored
-
Robert Knight authored
- Replace usage of jQuery for the event bus in `Delegator` with `tiny-emitter`, which we use in various other places in the application - Change the `element` property from a jQuery wrapper to a DOM element and adapt the places in `Guest` that referenced it - Remove the `on` alias for the `subscribe` method and change existing users to just use `subscribe` - Convert the one remaining use of the legacy alternative approach to passing configuration to `Delegator` to instead pass options in the `super(...)` call. This allows removing support for this from the `Delegator` constructor. - Add basic tests for the `Delegator` base class
-
Lyza Danger Gardner authored
Extract munging details of `bucket-bar`'s `scrollToClosest` function into a temporary JS-migration module; refactor and comment for clarity.
-
- 24 Sep, 2020 9 commits
-
-
Robert Knight authored
Add comments in response to PR feedback.
-
Robert Knight authored
Move the code for finding the highlight(s) which contain a given node into `highlighter.js`, so that all the logic that deals with the details of creating and manipulating highlights is in one place.
-
Robert Knight authored
The logic for handling details of the highlights layer was spread between the `highlighter` module and the `Guest` class. This commit moves the remaining highlighting logic in the `Guest` class to the `highlighter` module and rewrites it to use plain DOM APIs rather than jQuery. As a bonus, this makes it easy to remove the remaining direct usage of jQuery in the `Guest` class, so that has also been done in this commit.
-
dependabot-preview[bot] authored
Bumps [autoprefixer](https://github.com/postcss/autoprefixer) from 9.8.6 to 10.0.0. - [Release notes](https://github.com/postcss/autoprefixer/releases) - [Changelog](https://github.com/postcss/autoprefixer/blob/master/CHANGELOG.md) - [Commits](https://github.com/postcss/autoprefixer/compare/9.8.6...10.0.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
dependabot-preview[bot] authored
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.0.2 to 4.0.3. - [Release notes](https://github.com/Microsoft/TypeScript/releases) - [Commits](https://github.com/Microsoft/TypeScript/compare/v4.0.2...v4.0.3) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
dependabot-preview[bot] authored
Bumps [sass](https://github.com/sass/dart-sass) from 1.26.10 to 1.26.11. - [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.10...1.26.11) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
dependabot-preview[bot] authored
Bumps [@sentry/browser](https://github.com/getsentry/sentry-javascript) from 5.23.0 to 5.24.2. - [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.23.0...5.24.2) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
dependabot-preview[bot] authored
Bumps [terser](https://github.com/terser/terser) from 5.3.1 to 5.3.2. - [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.1...v5.3.2) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
dependabot-preview[bot] authored
Bumps [postcss](https://github.com/postcss/postcss) from 8.0.3 to 8.0.7. - [Release notes](https://github.com/postcss/postcss/releases) - [Changelog](https://github.com/postcss/postcss/blob/master/CHANGELOG.md) - [Commits](https://github.com/postcss/postcss/compare/8.0.3...8.0.7) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
- 23 Sep, 2020 2 commits
-
-
Lyza Danger Gardner authored
Fixes #2561
-
Eduardo Sanz García authored
resolves 2538
-