- 29 Apr, 2021 1 commit
-
-
Robert Knight authored
The name was vestigial. Rename it to `_bucketsContainer` to be more meaningful and indicate that it is private. Several other private fields have also been prefixed accordingly.
-
- 28 Apr, 2021 1 commit
-
-
Robert Knight authored
When a PDF page transitions from a rendered to non-rendered state the text layer element is removed and existing highlights in that layer briefly become disconnected from the document. As a result they have an empty/zero client rect as returned by `element.getBoundingClientRect()`. This caused the bucket-building logic to think that the anchor had moved to the top of the screen as the `top` and `bottom` coordinates of the anchor box became zero. This could lead to anchors which should be in the "below screen" bucket briefly jumping to the "above screen" bucket. Once re-anchoring completes and the highlight is anchored into a placeholder element for the non-rendered page, its anchor box becomes non-empty again and the anchor "jumps back" to the "below screen" box. This commit adds logic to ignore any highlights which have zero height, including highlight elements that are disconnected from the document.
-
- 27 Apr, 2021 7 commits
-
-
Eduardo authored
Co-authored-by: Robert Knight <robertknight@gmail.com>
-
Eduardo Sanz García authored
Delegator does no longer exits. The new comment explains the source of the events and its final destination.
-
Eduardo Sanz García authored
A few lines have been removed as a result of the code simplification.
-
Robert Knight authored
If the user hovered an annotation card before anchoring in the document completed, or if an annotation was re-anchored in a PDF after the card was hovered, then the highlight in the document was incorrectly shown in an un-focused rather than focused state. Fix the issue by keeping track of the current set of focused annotations in the Guest and setting the focus state correctly for new highlights added by `anchor`. Part of https://github.com/hypothesis/client/issues/3269
-
Robert Knight authored
- Revise the documentation for `createPlaceholder` to better explain what a placeholder is and the 1:N relationship between placeholders and highlights for a given page. Also clarify what the "approximate location" means - Rename a variable `isPlaceholder` => `inPlaceholder` as this is more accurate
-
Robert Knight authored
Fix incorrect result if the passed node has no parent.
-
Robert Knight authored
Several different parts of the code need to know about placeholder elements used to anchor annotations that refer to not-yet-rendered pages of a document in a PDF. Centralize the logic for creating placeholders and testing whether a node is inside a placeholder in one module. A trivial changes it that the "Loading annotations" text now ends with an ASCII "..." instead of unicode ellipsis "…". This is easier to type since the text is not intended to be seen by the user.
-
- 26 Apr, 2021 17 commits
-
-
Robert Knight authored
-
Robert Knight authored
-
Robert Knight authored
Move the logic for scrolling the content to the highlights associated with an anchor from `Guest` to the content-type specific integration (`HTMLIntegration`, `PDFIntegration`). The implementations of this logic in `HTMLIntegration` and `PDFIntegration` are currently the same as before, but in future this will allow adapting the scrolling logic to the content type. In the case of PDFs the logic will need to allow for the fact that an annotation may be re-anchored to a different element as the document is scrolled due to the page containing the annotation changing between an un-rendered and rendered state. - Add `scrollToAnchor` method to `Integration` interface and implement it for `HTMLIntegration`, `PDFIntegration` - Replace `scrollIntoView` call in guest with a call to the active integration's `scrollToAnchor` method
-
Robert Knight authored
-
dependabot[bot] authored
Bumps [katex](https://github.com/KaTeX/KaTeX) from 0.13.2 to 0.13.3. - [Release notes](https://github.com/KaTeX/KaTeX/releases) - [Changelog](https://github.com/KaTeX/KaTeX/blob/master/CHANGELOG.md) - [Commits](https://github.com/KaTeX/KaTeX/compare/v0.13.2...v0.13.3) Signed-off-by: dependabot[bot] <support@github.com>
-
dependabot[bot] authored
Bumps [gulp-replace](https://github.com/lazd/gulp-replace) from 1.0.0 to 1.1.1. - [Release notes](https://github.com/lazd/gulp-replace/releases) - [Commits](https://github.com/lazd/gulp-replace/commits) Signed-off-by: dependabot[bot] <support@github.com>
-
dependabot[bot] authored
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.13.15 to 7.13.16. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.13.16/packages/babel-core) Signed-off-by: dependabot[bot] <support@github.com>
-
dependabot[bot] authored
Bumps [postcss](https://github.com/postcss/postcss) from 8.2.10 to 8.2.12. - [Release notes](https://github.com/postcss/postcss/releases) - [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md) - [Commits](https://github.com/postcss/postcss/compare/8.2.10...8.2.12) Signed-off-by: dependabot[bot] <support@github.com>
-
dependabot[bot] authored
Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.888.0 to 2.892.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.888.0...v2.892.0) Signed-off-by: dependabot[bot] <support@github.com>
-
dependabot[bot] authored
Bumps [@octokit/rest](https://github.com/octokit/rest.js) from 18.5.2 to 18.5.3. - [Release notes](https://github.com/octokit/rest.js/releases) - [Commits](https://github.com/octokit/rest.js/compare/v18.5.2...v18.5.3) Signed-off-by: dependabot[bot] <support@github.com>
-
dependabot[bot] authored
Bumps [core-js](https://github.com/zloirock/core-js/tree/HEAD/packages/core-js) from 3.10.1 to 3.11.0. - [Release notes](https://github.com/zloirock/core-js/releases) - [Changelog](https://github.com/zloirock/core-js/blob/master/CHANGELOG.md) - [Commits](https://github.com/zloirock/core-js/commits/v3.11.0/packages/core-js) Signed-off-by: dependabot[bot] <support@github.com>
-
dependabot[bot] authored
Bumps [eslint](https://github.com/eslint/eslint) from 7.24.0 to 7.25.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.24.0...v7.25.0) Signed-off-by: dependabot[bot] <support@github.com>
-
dependabot[bot] authored
Bumps [terser](https://github.com/terser/terser) from 5.6.1 to 5.7.0. - [Release notes](https://github.com/terser/terser/releases) - [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md) - [Commits](https://github.com/terser/terser/commits) Signed-off-by: dependabot[bot] <support@github.com>
-
dependabot[bot] authored
Bumps [sass](https://github.com/sass/dart-sass) from 1.32.10 to 1.32.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.32.10...1.32.11) Signed-off-by: dependabot[bot] <support@github.com>
-
dependabot[bot] authored
Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 8.0.0 to 9.0.0. - [Release notes](https://github.com/puppeteer/puppeteer/releases) - [Changelog](https://github.com/puppeteer/puppeteer/blob/main/CHANGELOG.md) - [Commits](https://github.com/puppeteer/puppeteer/compare/v8.0.0...v9.0.0) Signed-off-by: dependabot[bot] <support@github.com>
-
dependabot[bot] authored
Bumps [@sentry/browser](https://github.com/getsentry/sentry-javascript) from 6.2.5 to 6.3.1. - [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/6.2.5...6.3.1) Signed-off-by: dependabot[bot] <support@github.com>
-
dependabot[bot] authored
Bumps [redux](https://github.com/reduxjs/redux) from 4.0.5 to 4.1.0. - [Release notes](https://github.com/reduxjs/redux/releases) - [Changelog](https://github.com/reduxjs/redux/blob/master/CHANGELOG.md) - [Commits](https://github.com/reduxjs/redux/compare/v4.0.5...v4.1.0) Signed-off-by: dependabot[bot] <support@github.com>
-
- 22 Apr, 2021 14 commits
-
-
Robert Knight authored
Part of https://github.com/hypothesis/client/issues/3298
-
Robert Knight authored
Checking `typeof <var>` is only needed when the variable may not exist (eg. some browser global).
-
Robert Knight authored
Put the logic for getting the grant token in one place so it can be better documented. Also remove or simplify some other code slightly upon a second reading.
-
Robert Knight authored
A call to `refreshAccessToken` is not the only way that the token can change while waiting for a response to the `POST /api/token` endpoint.
-
Robert Knight authored
The previous name was a vestige from the days of Angular 1.x in the client. Use a clearer name instead.
-
Robert Knight authored
Refactor and better document the `tokenGetter` method to make it easier to follow: - Split some sub-steps out into helper methods - Add comments to call out the high-levels steps in the flow
-
Robert Knight authored
Extract a helper from a long async method to shorten it.
-
Robert Knight authored
Make several functions/methods in the service easier to follow by refactoring promise chains to async/await.
-
Robert Knight authored
- Add tests for `scrollToAnnotation` - Add test for failed `getDocumentInfo` request to host page
-
Robert Knight authored
Convert the `frameSync` service to an ES class and rewrite the documentation that explains what the service does. Some internal `frameSync` methods are still set up in the constructor with closures. These can be converted to ES class methods in later refactoring. Part of https://github.com/hypothesis/client/issues/3298.
-
Eduardo Sanz García authored
Chrome 89 printed the following warnings on the console: ``` shadow-root.js:67 [Violation] Added non-passive event listener to a scroll-blocking 'touchstart' event. Consider marking event handler as 'passive' to make the page more responsive ``` See also: https://www.chromestatus.com/feature/5745543795965952 I have removed a listener that it isn't no longer needed, because it is wrapped in a shadow DOM that already stop the bubbling up of the event. Another 'touchstart' listener had the potential to slow down scrolling on the host page on mobile devices. To avoid that we have made listener passive. These changes remove the warnings without affecting the current behaviour of the application.
-
Robert Knight authored
Move the logic for retrying API metadata fetching into the `getJSON` helper function so that it is used both when fetching the API index (`/api`) and the service links (`/api/links`).
-
Robert Knight authored
-
Robert Knight authored
-