- 20 Nov, 2020 2 commits
-
-
Robert Knight authored
There is a difference between an empty selection and no selection at all. In the latter case APIs such as `selection.getRangeAt(0)` will throw an error.
-
Robert Knight authored
Content in a PDF's annotation layer, such as link annotations, can interfere with text selection and also cause creating annotations to fail [1]. This commit resolves the problem by temporarily hiding annotation layers when there is a non-empty selection. This allows the user to select text inside link annotations (for example) while still enabling the user to activate the link normally when there is no selection. Fixes https://github.com/hypothesis/client/issues/1464 [1] This is because the annotation layer is outside the text layer and the PDF anchoring code expects the selection to be within the text layer.
-
- 18 Nov, 2020 2 commits
-
-
Robert Knight authored
Optimize the case where `toRange` is used to resolve (start, end) offsets within the same element by only iterating over nodes in the element once, instead of iterating separately to resolve the start and end points.
-
Robert Knight authored
Add a method that converts a text position within an element to one where the offset is relative to some ancestor element. This operation will be needed for replacing existing Range => (element, start, end) conversions with a single one based on `TextRange` and `TextPosition`.
-
- 16 Nov, 2020 15 commits
-
-
Lyza Danger Gardner authored
This is the first version of Chrome that supports CSS Grid without a flag. Fixes #2739
-
Robert Knight authored
Following PR feedback split a parametrized test into three separate tests for ease of understanding. Also rename `previousSiblingTextLength` to `previousSiblingsTextLength` to clarify that it includes _all_ of the previous siblings of the node, not just one.
-
Robert Knight authored
After resolving an annotation's selectors to a `Range`, convert the range to a `TextRange` object which is stored with the anchor and later resolved to a concrete `Range` just before inserting highlights. Representing the anchored region using a `TextRange` allows for the correct text to be highlighted later if the region has been modified as a result of inserting other highlights, providing that the text content of the region has not been changed. Fixes https://github.com/hypothesis/h/issues/3278 Fixes https://github.com/hypothesis/client/issues/2326 Fixes https://github.com/hypothesis/h/issues/5997
-
Robert Knight authored
Add a `TextRange` class which represents a region of the document as an immutable start/end pair of (element, text position) points. Compared to a DOM `Range`, this representation of a document region is more robust to changes in the DOM structure of the region that don't affect the text content, such as wrapping parts of the range in elements to insert accessible highlights.
-
Robert Knight authored
Without the explicit annotation the type of `position` is inferred as `string` rather than `"relative"|"static"`.
-
dependabot-preview[bot] authored
Bumps [preact](https://github.com/preactjs/preact) from 10.5.5 to 10.5.7. - [Release notes](https://github.com/preactjs/preact/releases) - [Commits](https://github.com/preactjs/preact/compare/10.5.5...10.5.7) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
dependabot-preview[bot] authored
Bumps [@sentry/browser](https://github.com/getsentry/sentry-javascript) from 5.27.3 to 5.27.4. - [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.27.3...5.27.4) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
dependabot-preview[bot] authored
Bumps [codecov](https://github.com/codecov/codecov-node) from 3.8.0 to 3.8.1. - [Release notes](https://github.com/codecov/codecov-node/releases) - [Changelog](https://github.com/codecov/codecov-node/blob/master/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-node/compare/v3.8.0...v3.8.1) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
dependabot-preview[bot] authored
Bumps [autoprefixer](https://github.com/postcss/autoprefixer) from 10.0.1 to 10.0.2. - [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/10.0.1...10.0.2) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
dependabot-preview[bot] authored
Bumps [postcss](https://github.com/postcss/postcss) from 8.1.6 to 8.1.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.1.6...8.1.7) 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.787.0 to 2.792.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.787.0...v2.792.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
dependabot-preview[bot] authored
Bumps [eslint](https://github.com/eslint/eslint) from 7.12.1 to 7.13.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.12.1...v7.13.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
Robert Knight authored
-
Robert Knight authored
-
Robert Knight authored
Fix a bug that could cause pieces of text to be highlighted twice rather than once. For this bug to occur: 1. The anchored range had to start in the middle of a text node 2. The anchored range had to end _after_ the text node, so that the range's `commonAncestorContainer` property pointed to an ancestor of the text node In this scenario, the `wholeTextNodesInRange` function would split the text node where the range started and add the piece on the right-hand side of the split to the list of text nodes to wrap in highlight elements. The `forEachNodeInRange` iterator would then visit the right-hand text node a _second_ time because it is the _next node_ it its iteration order. This resulted in the text node being added twice to the `textNodes` list returned by `wholeTextNodesInRange`. To resolve this, rewrite the loop in `wholeTextNodesInRange` so that it visits each text node in the range only once, even if the node is split mid-iteration. In doing so a small optimization was made by setting the `NodeIterator`'s filter to `NodeFilter.SHOW_TEXT` in order to skip any non text nodes.
-
- 13 Nov, 2020 4 commits
-
-
Lyza Danger Gardner authored
Handle and rebroadcast events in Sidebar to support the opening and closing of the Notebook. Show option in user menu if feature flag is enabled.
-
Lyza Danger Gardner authored
-
Lyza Danger Gardner authored
-
Lyza Danger Gardner authored
Add env NOTEBOOK_APP_URL and support for it in build and config for annotator.
-
- 12 Nov, 2020 4 commits
-
-
Robert Knight authored
Make some small improvements in response to PR feedback.
-
Robert Knight authored
Add additional tests for `highlightRange` calls that requires splitting text nodes in order to wrap only the part inside the range. This turned up an edge case with handling collapsed ranges that start (and end) in the middle of a text node.
-
Robert Knight authored
Decouple `highlightRange` from the `NormalizedRange` class and make it work with ordinary DOM ranges. This decouples the highlighter implementation from the range wrapper types, which will make some future changes to highlighting easier.
-
Robert Knight authored
`isNodeInRange` in range would throw an exception if the passed node had no parent because `range.selectNode(...)` requires its argument to have a parent. This commit rewrites `isNodeInRange` to use `range.comparePoint` which avoids creating a temporary live range and handle exceptions that `comparePoint` may throw. It also updates the JSDoc to more accurately describe what the function does.
-
- 11 Nov, 2020 1 commit
-
-
Lyza Danger Gardner authored
Only show the relative time-since string for the annotation edited date if it is different from the relative time-since string for the created date. If they are the same, just show "edited" without further detail. Fixes https://github.com/hypothesis/product-backlog/issues/1156
-
- 10 Nov, 2020 2 commits
-
-
Robert Knight authored
When attempting to create a build of the browser extension using the local dev client and the production h service I encountered an issue where resolving the `sidebarAppUrl` setting in `src/boot/index.js` failed. This happens because the extension does not set this setting in the sidebar app so the boot script fell back to trying to resolve the URL template baked into the development client. This in turn failed because `document.currentScript` is not set in this context. The `sidebarAppUrl` setting is not actually needed when booting the sidebar app, so this commit refactors the boot code to avoid generating it in this context. This is done by moving the responsibility for determining which part of the client to load from `boot/boot.js` into `boot/index.js` and only resolving the necessary settings.
-
Eduardo Sanz García authored
Rely exclusively on `yarn`.
-
- 09 Nov, 2020 10 commits
-
-
dependabot-preview[bot] authored
Bumps [core-js](https://github.com/zloirock/core-js) from 3.6.5 to 3.7.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/compare/v3.6.5...v3.7.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
dependabot-preview[bot] authored
Bumps [@sentry/browser](https://github.com/getsentry/sentry-javascript) from 5.27.2 to 5.27.3. - [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.27.2...5.27.3) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
dependabot-preview[bot] authored
Bumps [mocha](https://github.com/mochajs/mocha) from 8.2.0 to 8.2.1. - [Release notes](https://github.com/mochajs/mocha/releases) - [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md) - [Commits](https://github.com/mochajs/mocha/compare/v8.2.0...v8.2.1) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
dependabot-preview[bot] authored
Bumps [postcss](https://github.com/postcss/postcss) from 8.1.4 to 8.1.6. - [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.1.4...8.1.6) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
dependabot-preview[bot] authored
Bumps [sass](https://github.com/sass/dart-sass) from 1.28.0 to 1.29.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.28.0...1.29.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
dependabot-preview[bot] authored
Bumps [postcss-url](https://github.com/postcss/postcss-url) from 10.0.0 to 10.1.0. - [Release notes](https://github.com/postcss/postcss-url/releases) - [Changelog](https://github.com/postcss/postcss-url/blob/master/CHANGELOG.md) - [Commits](https://github.com/postcss/postcss-url/compare/10.0.0...10.1.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
dependabot-preview[bot] authored
Bumps [diff](https://github.com/kpdecker/jsdiff) from 4.0.2 to 5.0.0. - [Release notes](https://github.com/kpdecker/jsdiff/releases) - [Changelog](https://github.com/kpdecker/jsdiff/blob/master/release-notes.md) - [Commits](https://github.com/kpdecker/jsdiff/compare/v4.0.2...v5.0.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
dependabot-preview[bot] authored
Bumps [@babel/preset-react](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-react) from 7.12.1 to 7.12.5. - [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.12.5/packages/babel-preset-react) 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.783.0 to 2.787.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.783.0...v2.787.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
dependabot-preview[bot] authored
Bumps [dompurify](https://github.com/cure53/DOMPurify) from 2.2.0 to 2.2.2. - [Release notes](https://github.com/cure53/DOMPurify/releases) - [Commits](https://github.com/cure53/DOMPurify/compare/2.2.0...2.2.2) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-