- 13 Nov, 2020 3 commits
-
-
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 11 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>
-
dependabot-preview[bot] authored
Bumps [@octokit/rest](https://github.com/octokit/rest.js) from 18.0.8 to 18.0.9. - [Release notes](https://github.com/octokit/rest.js/releases) - [Commits](https://github.com/octokit/rest.js/compare/v18.0.8...v18.0.9) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
- 06 Nov, 2020 2 commits
-
-
Robert Knight authored
Rewrite the selection change observer in `src/annotator/selections` to make it easier to understand how this functionality works and change it in future. The major change is to remove the dependency on the `Observable` class provided by `zen-observable`, which adds cognitive overhead here, isn't used elsewhere and is stuck on an old version due to subtle breaking changes in newer releases. Replace it instead with a `SelectionObserver` class which is modeled after DOM APIs like `MutationObserver`. It takes a callback in the constructor that is invoked with the selected `Range` or `null` when the selection changes and provides a `disconnect` method which stops watching for future changes. The implementation only uses DOM APIs.
-
dependabot-preview[bot] authored
Bumps [sinon](https://github.com/sinonjs/sinon) from 9.2.0 to 9.2.1. - [Release notes](https://github.com/sinonjs/sinon/releases) - [Changelog](https://github.com/sinonjs/sinon/blob/master/CHANGELOG.md) - [Commits](https://github.com/sinonjs/sinon/commits) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
- 05 Nov, 2020 3 commits
-
-
Robert Knight authored
All of the browsers we currently support, as specified by the `browserslist` key in package.json, fully support ES 2015 and ES 2016. The only exception I'm aware of is that Edge Legacy v17 and v18 do not support using string regex search/match methods with custom (non-regex) types via `Symbol.{match, search, replace}`. That's not something we've ever used AFAIK.
-
Robert Knight authored
`make build` is a more obvious name for a command that creates a production build of the client. It also resolves an issue that `make build/manifest.json` did nothing if `node_modules/` was up to date but other dependencies had changed.
-
Robert Knight authored
`make dev` would unnecessarily create a production build before starting the development server if `package.json` or `yarn.lock` had been touched since the previous run of `make dev`. This was happening because `make dev` had a dependency on `build/manifest.json`, which triggers a production build, rather than `node_modules/.uptodate`, which just runs `yarn install`. I can't remember the historical reason why it was this way, but it doesn't make sense any more. Fix this by changing `make dev` to only depend on `node_modules/` being up to date before starting the dev server.
-
- 04 Nov, 2020 1 commit
-
-
Robert Knight authored
It is confusing to have a Babel plugin with an Angular-related name and Angular-sounding annotations (`@ngInject`) in the code, even though we're not using AngularJS. Although we're not using AngularJS any more, we still have services that are instantiated by a dependency injection container. The container reads dependency names from a `$inject` property on service functions/classes. This `$inject` property is added by `babel-plugin-angularjs-annotate`. This commit replaces the `angularjs-annotate` Babel plugin with one maintained by us [1]. The new plugin provides only the functionality that we need (eg. only processes explicitly annotated functions) and uses a more generic `@inject` annotation. [1] https://github.com/hypothesis/babel-plugin-inject-args
-
- 03 Nov, 2020 3 commits
-
-
Robert Knight authored
This catches a few minor errors which the previous configuration did not. See https://www.typescriptlang.org/tsconfig#strict. `noImplicitAny` is turned off because we still have a lot of un-annotated variables/parameters in the code.
-
Robert Knight authored
-
Robert Knight authored
Move the list of supported browsers from `.babelrc` to the `browserslist` key in `package.json`. This enables other browserslist-enabled tools such as autoprefixer to adapt their output to the target browsers. This reduces the size of the production CSS bundles slightly by reducing the number of unnecessary vendor prefixed rules that are generated. See https://github.com/postcss/autoprefixer#browsers, https://github.com/browserslist/browserslist#queries and https://babeljs.io/docs/en/babel-preset-env#browserslist-integration.
-
- 02 Nov, 2020 6 commits
-
-
Lyza Danger Gardner authored
Previously, the `AnnotationHeader` component checked the equivalency of `annotation.created` and `annotation.updated` to determine if an annotation had been updated subsequent to its creation. This is problematic if an annotation has a very small difference between its `created` and `updated` dates. `created` and `updated` are returned by the API as ISO-8601 date strings with microsecond resolution. These days, annotations created by the `h` service will have exactly equivalent `created` and `updated` timestamps (assuming they haven't actually been edited subsequently, of course). In the past, however, annotations often had negligible (sub-second) differences in their `created` and `updated` dates. This resulted in an edited timestamp misleadingly appearing in the UI for older annotations. These changes add a `hasBeenEdited` function to the `annotation-metadata` util module that considers an annotation edited only if `created` and `updated` differ by at least 2 seconds. Tests for `annotation-metadata` have also been modernized somewhat here. Fixes #2684
-
dependabot-preview[bot] authored
Bumps [@sentry/browser](https://github.com/getsentry/sentry-javascript) from 5.27.1 to 5.27.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.27.1...5.27.2) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
dependabot-preview[bot] authored
Bumps [sass](https://github.com/sass/dart-sass) from 1.27.0 to 1.28.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.27.0...1.28.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
dependabot-preview[bot] authored
Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 5.4.0 to 5.4.1. - [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/v5.4.0...v5.4.1) 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.779.0 to 2.783.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.779.0...v2.783.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.6 to 18.0.8. - [Release notes](https://github.com/octokit/rest.js/releases) - [Commits](https://github.com/octokit/rest.js/compare/v18.0.6...v18.0.8) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
- 30 Oct, 2020 4 commits
-
-
Robert Knight authored
Fix a false negative in the test for whether the current browser is supported if the Hypothesis boot script is included in the `<head>` of the page (before the `<body>`). In this case `document.body` is `null`.
-
Lyza Danger Gardner authored
Refactor `BucketBar` to render preact `Buckets` component. Lightly refactor `anchorBuckets` utility function to return above and below buckets as separate properties. Use SASS mixin for indicator button styling.
-
Lyza Danger Gardner authored
Extract styling for indicator buttons in bucket bar, organize and comment it
-
Lyza Danger Gardner authored
Create a preact component `Buckets`, and sub-components `BucketButton` and `NavigationBucketButton`. This refactors buckets to add some HTML semantics and accessibility.
-