- 01 Dec, 2021 3 commits
-
-
Lyza Danger Gardner authored
Update menu-arrow styling rules to accommodate.
-
Lyza Danger Gardner authored
Use `LabeledButton` instead of a `<button>` element in AdderToolbar buttons, and extract pattern to `frontend-shared` SASS module.
-
Lyza Danger Gardner authored
Move the `frontend-shared` module up a level so it can be used by annotator styles.
-
- 30 Nov, 2021 2 commits
-
-
Robert Knight authored
In `Ref<T>` the `current` property is now a readonly field. The correct type (`MutableRef<T>`) is inferred automatically, so we don't need to specify it.
-
dependabot[bot] authored
Bumps [preact](https://github.com/preactjs/preact) from 10.5.15 to 10.6.1. - [Release notes](https://github.com/preactjs/preact/releases) - [Commits](https://github.com/preactjs/preact/compare/10.5.15...10.6.1) --- updated-dependencies: - dependency-name: preact dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
-
- 29 Nov, 2021 21 commits
-
-
Robert Knight authored
Call `listen` immediately after creating the PortProvider, before creating the sidebar. This will allow us to rule out the possibility that the sidebar sometimes fails to connect to the PortProvider because an error occurred in the annotator code after creating the sidebar iframe but before calling `PortProvider.listen`, resulting in the PortProvider listener not being created.
-
Robert Knight authored
This has been replaced by the `hostURL` value in the `host_config` metadata, which comes from the `#config` fragment. The `hostURL` value should always contain the full URL, whereas `document_url` gets truncated to the origin in many browsers. Also the term `hostURL` more accurately reflects what the value is, since it may be different than the document for which the client is displaying annotations.
-
Robert Knight authored
- Add the client version to the config so that we can rule out problems in the sidebar app because caused by a mismatch between the version of the client used in the annotator and the version used in the sidebar app. - Add the host URL to the config so that we can tell in Sentry reports which page embedded the client. Sentry reports currently have `document_url` metadata that is set using `document.referrer` in the sidebar app, but this gets truncated to the origin in some browsers.
-
Robert Knight authored
These are ignored by the sidebar app anyway, and they add noise to Sentry reports and logs.
-
Robert Knight authored
Rename the function that prepares configuration to be passed from the annotator to the sidebar and notebook apps, since it is no longer used exclusively by the sidebar, and add tests.
-
Robert Knight authored
Fix a regression after e7cdcc0d, which added the client's standard CSS reset to the annotator CSS bundle. The font-family used by the adder buttons was changed from the user agent's default for `<button>` elements to `inherit` by this reset. The result was that the font family would vary depending on the web page. Fix this by adding a `:host > *` selector which sets style properties for all shadow roots created by the annotator. This is the equivalent of the `body` selector in sidebar.scss.
-
dependabot[bot] authored
Bumps [prettier](https://github.com/prettier/prettier) from 2.4.1 to 2.5.0. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/2.4.1...2.5.0) --- updated-dependencies: - dependency-name: prettier dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
-
Eduardo Sanz García authored
For debugging purposes having a prefix to indicate whether the annotation was created locally ('a:' for the annotator, 's:' for the sidebar) or fetched from the server may be useful.
-
dependabot[bot] authored
Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.1034.0 to 2.1038.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.1034.0...v2.1038.0) --- updated-dependencies: - dependency-name: aws-sdk dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
-
dependabot[bot] authored
Bumps [postcss](https://github.com/postcss/postcss) from 8.3.11 to 8.4.4. - [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.3.11...8.4.4) --- updated-dependencies: - dependency-name: postcss dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
-
dependabot[bot] authored
Bumps [reselect](https://github.com/reduxjs/reselect) from 4.1.4 to 4.1.5. - [Release notes](https://github.com/reduxjs/reselect/releases) - [Changelog](https://github.com/reduxjs/reselect/blob/master/CHANGELOG.md) - [Commits](https://github.com/reduxjs/reselect/compare/v4.1.4...v4.1.5) --- updated-dependencies: - dependency-name: reselect dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
-
dependabot[bot] authored
Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 11.0.0 to 12.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/v11.0.0...v12.0.0) --- updated-dependencies: - dependency-name: puppeteer dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
-
dependabot[bot] authored
Bumps [redux-thunk](https://github.com/reduxjs/redux-thunk) from 2.4.0 to 2.4.1. - [Release notes](https://github.com/reduxjs/redux-thunk/releases) - [Commits](https://github.com/reduxjs/redux-thunk/compare/v2.4.0...v2.4.1) --- updated-dependencies: - dependency-name: redux-thunk dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
-
dependabot[bot] authored
Bumps [sass](https://github.com/sass/dart-sass) from 1.43.4 to 1.43.5. - [Release notes](https://github.com/sass/dart-sass/releases) - [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md) - [Commits](https://github.com/sass/dart-sass/compare/1.43.4...1.43.5) --- updated-dependencies: - dependency-name: sass dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
-
Robert Knight authored
Add the parsed app configuration from the `#config=<JSON blob>` URL fragment to Sentry reports. This makes it easier to read that the URL-encoded, JSON-stringified form in which it currently appears.
-
Eduardo Sanz García authored
-
Eduardo Sanz García authored
Adopt `generateHexString` instead of varios `Math.random()` in various places. `Math#random` maybe faster than `window#crypto#getRadomValues` but there is value on having a centralised way to generate random hex strings.
-
Eduardo Sanz García authored
* import only the `generateHexString` function * declare the `typdef` on one common JSDoc comment after the imports * remove unnecessary helper function
-
Eduardo Sanz García authored
This file will be useful for components in `src/annotator` so it will be better to move it to common path for both the sidebar and annotator.
-
Robert Knight authored
Replace the scoped CSS reset in the annotator CSS bundle with the same un-scoped reset that the sidebar uses, as well as associated specificity hacks in other modules. The scoped reset was needed when the annotator CSS was loaded directly into the host page. It is no longer needed as annotator UI elements now always use Shadow DOM for style isolation from the host page.
-
Robert Knight authored
The logic for generating the `#config=<URI-encoded JSON blob>` fragment, that is used to pass configuration from the annotator to the sidebar application, was duplicated in several places in the code. Add a shared module in `shared/config-fragment.js` with functions for adding configuration to and extracting it from the URL.
-
- 26 Nov, 2021 11 commits
-
-
Robert Knight authored
In an earlier iteration of the code it was called in multiple places.
-
Robert Knight authored
A call to `updateBoxSizes` was scheduled on every `resize` event after a delay, instead of being debounced as intended. Fix this by using the lodash debounce utility.
-
Robert Knight authored
When reading the code top to bottom, the `expectedBoxOffsetAndSize` function will make more sense after reading `createCharBoxes`.
-
Robert Knight authored
This makes it easier to see what arguments are expected reading the code.
-
Robert Knight authored
-
Robert Knight authored
-
Robert Knight authored
-
Robert Knight authored
Mapping each line in the text data in the test to a line in the generated bounding boxes is more natural and also lets us test multiple words on a single line.
-
Robert Knight authored
Use fractions instead of percentages for the character and line metrics in ImageTextLayer tests, for consistency with the ImageTextLayer API.
-
Robert Knight authored
Support VitalSource books which are created from PDFs rather than EPUBs. These books have the same frame structure as EPUBs, but use one HTML page per PDF page in the inner frame, rather than one HTML page per chapter as is more common for EPUBs. VS PDFs do not contain a selectable text layer. Instead they consist of a high-resolution rendered image of the current page plus data about the content and location of text characters embedded in a script tag in the page which sets a `window.innerPageData` variable. To support this in Hypothesis, we generate a hidden text layer from the `innerPageData` data and overlay it on top of the rendered image. This hidden text layer is similar to what PDF.js creates for us in our standard PDF viewer.
-
Robert Knight authored
Implement a class that creates a transparent text layer on top of an image containing text. This is useful for supporting annotation in documents which are rendered images or canvases that don't have browser-accessible text in them, such as VitalSource. It is the caller's responsibility to determine the location and character value of text in the image.
-
- 25 Nov, 2021 3 commits
-
-
Robert Knight authored
-
Robert Knight authored
This class is used by elements created by placeholder.js in the host page, not a shadow root.
-
Robert Knight authored
-