- 14 Dec, 2020 1 commit
-
-
Eduardo Sanz García authored
The text in the input element of the `annotation-share-control` is selected and focused when the element is created. This is to facilitate copy/paste via keyboard shorcuts. This selection/focus mechanism is working well except for iOS (both Chrome and Safari) where: * the selection/focus is not shown in the input field except by clicking on the input element. * the selection overflows the right margin of the input field I tested `overflow: hidden` on the input element but that causes the selection to overflow on the left margin Because of these two issues, I recommend to supress selection/focus on iOS devices.
-
- 11 Dec, 2020 9 commits
-
-
Robert Knight authored
For consistency, and because it is useful/straightforward to do, all of the `TextQuoteAnchor` tests now mock `matchQuote` but not `TextRange`, except for one integration test that is labeled as such.
-
Robert Knight authored
-
Robert Knight authored
Check the properties of the `TextQuoteAnchor` instance have expected values.
-
Robert Knight authored
-
Robert Knight authored
-
Robert Knight authored
Use the new matching algorithm for anchoring text quote selectors. This is faster than the existing one when many quote selectors fail to exactly match and gives us more insight into and control over the fuzzy matching process. - Use the `matchQuote` function to do find the best match for the quote in the text, replacing the `dom-anchor-text-quote` library. This resolves a problem where the browser could become unresponsive for a significant period of time when anchoring large numbers of annotations (hundreds) on pages where there have been significant changes in the content. In the "Public" group on http://www.americanyawp.com/text/01-the-new-world/ for example the client spends a total of ~2.4 seconds running JS in between starting the client and anchoring completing compared to ~11 seconds with the previous implementation. The new implementation also provides more control over the degree of mismatch between quote selector and document text that is allowed. The current settings provide higher recall (larger proportion of "correct" approximate matches found) than the previous implementation. On http://www.americanyawp.com/text/01-the-new-world/ for example the number of orphans dropped from 137 to 63. Finally the new library is also smaller. The minified `annotator.bundle.js` size is reduced by 15% (25KB). - Change `TextQuoteAnchor.fromSelector(...)` to generate the selector directly rather than delegating to `dom-anchor-text-quote`. This gives us more control over how quote selectors are generated and more easily change factors such as the amount of context included.
-
Robert Knight authored
All consumers now use the replacement `useStoreProxy` hook.
-
Robert Knight authored
Implement a `matchQuote` function which will be used to replace `dom-anchor-text-quote` for finding the best match for annotation quotes in the document text. The new implementation is based on the `approx-string-match` library and provides several improvements over the existing one: - Better performance when there are many differences between the quote and closest document text - It will be easier for us to tune the degree of mismatch allowed between the quote and document text and how candidate matches are ranked
-
dependabot-preview[bot] authored
Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.7. **This update includes a security fix.** - [Release notes](https://github.com/isaacs/ini/releases) - [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.7) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
- 10 Dec, 2020 2 commits
-
-
Robert Knight authored
Change `useRootThread` hook to use the new API for reading data from the store.
-
Robert Knight authored
-
- 09 Dec, 2020 12 commits
-
-
Robert Knight authored
Make several improvements following PR review.
-
Robert Knight authored
Implement a new `useStoreProxy` hook that provides access to read and update the store in UI components. This will replace the existing `useStore` hook. The new hook has a more ergonomic API which should also prevent some of the common mistakes made when using the previous hook. `useStoreProxy` returns an ES proxy for the store. The UI component can use the proxy as if it were using the store directly. The proxy however tracks and caches the results of store selector calls. When the store state changes the proxy checks whether any of the cached calls would return different results and if so invalidates the cache and re-renders the component.
-
Robert Knight authored
This makes store updates faster in debug builds when a lot of data is loaded into the client. In this case most sub-trees in the store are already frozen after an update (since they are objects from the previous state) and only the new parts need to be frozen.
-
Robert Knight authored
Replace remaining uses of `store.getState()` in UI components with selectors. This will avoid unnecessary re-rendering after we change components to use the new `useStoreProxy` hook for reading from the store. It also simplifies the tests.
-
Robert Knight authored
Profiling anchoring of large numbers of annotations in Chrome showed that there was significant overhead for scheduling and executing `requestAnimationFrame` callbacks. In the case of `Guest.anchor`, the callback often did nothing (it called `removeHighlights` with an empty array). There isn't a need for this any more AFAICS so just invoke the logic synchronously, which is much cheaper.
-
Robert Knight authored
This was recomputing frequently even though the result only changes when the selected tab changes.
-
Lyza Danger Gardner authored
Also convert `selectionState` to use `createSelector` to avoid it returning a different reference on each call.
-
Lyza Danger Gardner authored
Remove unused selector and tidy up reference ordering
-
Lyza Danger Gardner authored
Refactor selectors for evaluating `hasAppliedFilter` to remove cross-module state dependencies.
-
Lyza Danger Gardner authored
Eliminate the enormous `threadState` `rootSelector` and re-implement as multiple selectors. Refactor `useRootThread` and threading integration tests to account for these changes.
-
Lyza Danger Gardner authored
Refactor the computation of "filter state", that is, all of the store state that impacts what constitutes applied filters on annotations.
-
Lyza Danger Gardner authored
The `selection` store module has become overlong and its responsibilities aren't clear. We know we'll be adding some more filtering capabilities to the app in the next short while, and that would make `selection` even more complex and heavy. Split into two store modules: `selection` and `filters`. Temporarily re-implement `rootSelector`s that are needed for generating thread and filter state for components.
-
- 08 Dec, 2020 2 commits
-
-
Robert Knight authored
The name `dir` is arguably ambiguous in this context.
-
Robert Knight authored
When resolving a `TextRange` to a DOM `Range` there is an edge case where the `start` or `end` position have an `offset` of `0` and the element contains no text nodes. Before this commit `toRange` would throw an `Offset exceeds text length` error. A more useful behavior though is: - For the `start` position, to resolve it to the start of the next text node after `this.start.element` - For the `end` position, to resolve it to the end of the previous text node before `this.end.element` This commit implements this behavior by first adding a `dir` option to `TextPosition.resolve` to control what happens when the position's offset is 0 and the element has no text and then specifying this option when calling `this.{start, end}.resolve` in `TextRange.toRange`.
-
- 07 Dec, 2020 9 commits
-
-
dependabot-preview[bot] authored
Bumps [mustache](https://github.com/janl/mustache.js) from 4.0.1 to 4.1.0. - [Release notes](https://github.com/janl/mustache.js/releases) - [Changelog](https://github.com/janl/mustache.js/blob/master/CHANGELOG.md) - [Commits](https://github.com/janl/mustache.js/compare/v4.0.1...v4.1.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
dependabot-preview[bot] authored
Bumps [cross-env](https://github.com/kentcdodds/cross-env) from 7.0.2 to 7.0.3. - [Release notes](https://github.com/kentcdodds/cross-env/releases) - [Changelog](https://github.com/kentcdodds/cross-env/blob/master/CHANGELOG.md) - [Commits](https://github.com/kentcdodds/cross-env/compare/v7.0.2...v7.0.3) 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.6 to 5.29.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.27.6...5.29.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
dependabot-preview[bot] authored
Bumps [postcss](https://github.com/postcss/postcss) from 8.1.10 to 8.1.14. - [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.1.10...8.1.14) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
dependabot-preview[bot] authored
Bumps [core-js](https://github.com/zloirock/core-js) from 3.8.0 to 3.8.1. - [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.8.0...v3.8.1) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
dependabot-preview[bot] authored
Bumps [sass](https://github.com/sass/dart-sass) from 1.29.0 to 1.30.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.29.0...1.30.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.799.0 to 2.804.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.799.0...v2.804.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
dependabot-preview[bot] authored
Bumps [eslint](https://github.com/eslint/eslint) from 7.14.0 to 7.15.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.14.0...v7.15.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
dependabot-preview[bot] authored
Bumps [@octokit/rest](https://github.com/octokit/rest.js) from 18.0.9 to 18.0.12. - [Release notes](https://github.com/octokit/rest.js/releases) - [Commits](https://github.com/octokit/rest.js/compare/v18.0.9...v18.0.12) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
- 04 Dec, 2020 1 commit
-
-
Eduardo Sanz García authored
On iOS the element must be an `input` (or `textarea`) and with attribute `'contenteditable'` Closes #858
-
- 03 Dec, 2020 4 commits
-
-
Lyza Danger Gardner authored
Previously, tab selection for direct-linked annotations was happening before anchoring was complete—that means that orphaned annotations had not yet been marked as being orphans (`$orphan`). Make sure that direct-linked tab selection is checked any time the direct-linked annotation changes. Also fix a UI confusion in which the "Show All" button would show the count of all annotations in this (direct-linked) state, which is confusing because orphans don't count toward "All annotations" (nor do page notes, FWIW). Fixes #2686
-
Eduardo Sanz García authored
As indicated by @robertknight `document.styleSheets` is complete only when stylessheets are processed. This can take a while for certain heavy pages. The alternative approach presented here to find `annotation.css` is warranted to find the url when the code is run. Closes #2752
-
Robert Knight authored
- Add comment to explain purpose of `index.js` - Use a template string for readability
-
Robert Knight authored
This feature is now enabled by default.
-