- 27 Oct, 2020 1 commit
-
-
dependabot-preview[bot] authored
Bumps [eslint](https://github.com/eslint/eslint) from 7.11.0 to 7.12.1. - [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.11.0...v7.12.1) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
- 23 Oct, 2020 3 commits
-
-
Robert Knight authored
Attempt to fix a prod deployment failure when initial build step happens in a different workspace directory than the prod deploy step. This typically happens when two or more builds are in progress concurrently and then all of the earlier builds finish before the last one is deployed. In this scenario the initial build step happens in a directory such as `master@2` whereas the prod deploy step will happen in a directory named `master`. The prod deploy step assumed that the workspace was still `master@2` and git commands would fail because the directory no longer existed.
-
Robert Knight authored
Remove polyfills for features that are supported by all of our target browsers: - `fetch` (https://caniuse.com/fetch) - The `URL` constructor (https://caniuse.com/url) - `String.prototype.normalize` (https://caniuse.com/mdn-javascript_builtins_string_normalize)
-
Robert Knight authored
The transform-async-to-promises Babel plugin has been replaced by native async/await support in most of the code, except for the boot script.
-
- 22 Oct, 2020 5 commits
-
-
Robert Knight authored
This resolves errors building some indirect dependencies in the most recent versions of Node.
-
Robert Knight authored
This fixes an error in production builds of the client in Safari 10: ``` SyntaxError: Cannot declare a let variable twice: 't'. ``` Fixes #2664
-
Robert Knight authored
- Remove `seamless` attribute which has not been supported by major browsers for years [1] - Remove the `name="hyp_sidebar_frame"` attribute which is not referenced anywhere else in the code. I did find a couple of references to it in Google, but only in scripts written by Hypothesis team members which are not run regularly. [1] https://caniuse.com/iframe-seamless
-
Robert Knight authored
Update Babel compilation targets to match the browsers we currently support, rather than transpiling everything down to ES5. This reduces the size of our JS bundles and improves performance by using native implementations of ES2015+ language features. It should also avoid occassional issues in development caused by interactions of Babel plugins that compile native features to older syntax (eg. `transform-async-to-promises`). The client's boot script has a different configuration than the rest of the client because it needs to be able to run in older browsers in order to show a warning when the browser is not supported. The production bundle size changes resulting from this are: Sidebar bundle: 398 KB => 329 KB Annotator bundle: 219 KB => 169 KB
-
Robert Knight authored
Native (non-transpiled) arrow functions cannot be used with the `new` operator. This commit fixes a couple of cases where that was happening.
-
- 21 Oct, 2020 2 commits
-
-
Robert Knight authored
The `Host` class is never constructed directly and only has one subclass, `Sidebar`. There wasn't a clear separation of responsibilities between `Host` and `Sidebar`. This commit therefore moves the functionality of `Host` into `Sidebar` and merges the tests.
-
Lyza Danger Gardner authored
Restructure the way that buckets are generated and represented. Simplify what `BucketBar` needs to do with the buckets. Fix a bug in which anchors can be occasionally included in multiple buckets. Fixes #397 Fixes #2618
-
- 20 Oct, 2020 14 commits
-
-
Robert Knight authored
Code in the `boot/` module needs to be compiled to work in older browsers than code shared between the annotator and sidebar applications in `src/shared`. To ensure this it helps to avoid dependencies from code in `src/boot` on code in `src/shared`, but the converse is OK. This commit moves the `jsonConfigsFrom` function from `shared/settings` to `boot/parse-json-config` so that it is compiled with the same settings as the rest of the code in the `boot/` module and to reduce the chances of someone accidentally introducing ES6+ features into this code in future and forgetting about older browsers. The function was also renamed to make it more obvious that it parses JSON config, and thus may fail, rather than returning a JSON string.
-
Robert Knight authored
The code in `polyfills/index.js` which determines which polyfills are needed are compiled as part of the boot script and not used by other parts of the application. Because this code is compiled as part of the boot script it needs to be compiled to parse in older browsers, even those which don't support the client (eg. IE 10/11). Putting the `polyfills/` dir in side `src/boot` means that it will inherit any custom Babel configuration for the `src/boot` directory.
-
Robert Knight authored
`document.currentScript` is supported by all browsers that we support. If it returns `null` this indicates that it was called in the wrong context and so fail loudly to make this obvious.
-
Robert Knight authored
Remove workarounds for IE that are no longer needed since IE 11 is not supported any more. - Remove optional and deprecated arguments to `document.createNodeIterator` - Update references to IE 11 for checks/code which is still applicable to other browsers - Remove `window.msCrypto` fallback for `window.crypto` - Remove unused `isIE11` helper - Remove IE 11 reference in `polyfills/index.js`. We don't actually need the check because the browser check in `boot/index.js` will fail if `Promise` is missing, but I left it in because that knowledge is contained in a separate part of the code and `shared/polyfills/index.js` is currently written as if it may be used in a pre-ES2015 environment.
-
Robert Knight authored
This banner is no longer needed because the client does not support IE 11 and aborts startup in that browser.
-
dependabot-preview[bot] authored
Bumps [preact](https://github.com/preactjs/preact) from 10.5.4 to 10.5.5. - [Release notes](https://github.com/preactjs/preact/releases) - [Commits](https://github.com/preactjs/preact/compare/10.5.4...10.5.5) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
dependabot-preview[bot] authored
Bumps [postcss](https://github.com/postcss/postcss) from 8.1.1 to 8.1.2. - [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.1...8.1.2) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
dependabot-preview[bot] authored
Bumps [terser](https://github.com/terser/terser) from 5.3.5 to 5.3.7. - [Release notes](https://github.com/terser/terser/releases) - [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md) - [Commits](https://github.com/terser/terser/compare/v5.3.5...v5.3.7) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
dependabot-preview[bot] authored
Bumps [mocha](https://github.com/mochajs/mocha) from 8.1.3 to 8.2.0. - [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.1.3...v8.2.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
dependabot-preview[bot] authored
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.11.6 to 7.12.3. - [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.3/packages/babel-core) 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.10.4 to 7.12.1. - [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.1/packages/babel-preset-react) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
dependabot-preview[bot] authored
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.11.5 to 7.12.1. - [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.1/packages/babel-preset-env) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
dependabot-preview[bot] authored
Bumps [eslint-plugin-react](https://github.com/yannickcr/eslint-plugin-react) from 7.21.4 to 7.21.5. - [Release notes](https://github.com/yannickcr/eslint-plugin-react/releases) - [Changelog](https://github.com/yannickcr/eslint-plugin-react/blob/master/CHANGELOG.md) - [Commits](https://github.com/yannickcr/eslint-plugin-react/compare/v7.21.4...v7.21.5) 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.771.0 to 2.774.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.771.0...v2.774.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
- 16 Oct, 2020 9 commits
-
-
Robert Knight authored
Add comments to explain where the `#mainContainer` selector come from, when the warning banner size may change and what happens in older browsers.
-
Lyza Danger Gardner authored
-
Lyza Danger Gardner authored
Divide up `toast-message` styling for resuability. Use its base styles as a foundation for a full-width "banner" pattern.
-
Lyza Danger Gardner authored
This icon is an MIT-licensed SVG sourced from https://feathericons.com/
-
Robert Knight authored
- Add `documentHasText` helper in `anchoring/pdf.js` which checks if the document appears to have selectable text - Add logic in `plugin/pdf.js` which uses the `documentHasText` helper to check whether the PDF has selectable text and display a banner above the PDF viewer if not Fixes https://github.com/hypothesis/product-backlog/issues/1081
-
Robert Knight authored
Following #2645 jQuery is no longer used by the Hypothesis client.
-
Lyza Danger Gardner authored
Remove jQuery dependency from BucketBar, its tests and other relevant modules' tests involving BucketBar. Opportunistically add some type-checking, commenting and other small improvements but leave general structure as-is. Increase test coverage.
-
Lyza Danger Gardner authored
Previously, the `buildBuckets` function returned an object with two properties: `buckets` and `index`. Change to return an Array of `Bucket`s and type-define what a `Bucket` is—`Bucket` objects now include their `position` information, obviating the need for an `index` Array that could get out of sync.
-
Robert Knight authored
f96af43d added support for PDF.js >= v2.5.207 by changing an event listener to use PDF.js's internal event bus rather than DOM events. However there was another DOM event listener for the `pagesloaded` event in `src/annotator/anchoring/pdf.js` that should also have been updated but was overlooked. This didn't cause a problem in testing with the dev server because the test documents load quickly enough that they are already loaded by the time the client's anchoring logic ran. This commit updates the way that the client listens for events from PDF.js to use the event bus where available and only fall back to the DOM in versions of PDF.js that don't support it. - Use PDF.js's event bus to listen for `documentload`/`documentloaded` and `pagesloaded` events - Add a fallback method to wait for event bus to become available in versions of PDF.js which support the eventBus but don't have the `initializedPromise` API - Improve the documentation around which versions of PDF.js support different event types and event dispatch methods - Add tests to cover the behavior from different releases of PDF.js For an overview of the different versions of PDF.js that the client needs to support, see https://github.com/hypothesis/client/issues/2643.
-
- 15 Oct, 2020 1 commit
-
-
Robert Knight authored
`TagEditor` tested if the browser was IE 11 to determine whether to check the `inputType` property of `InputEvent`. However it is not only IE 11 that did not support this property. From reading the comments in https://github.com/hypothesis/client/pull/1558 it appears that the `inputType` checks was originally added to resolve an issue with accepting suggestions by pressing Enter in an earlier version of `TagEditor` that used the `<datalist>` element. As far as I can tell this is no longer applicable. `<datalist>` was replaced by a custom UI and accepting suggestions by pressing Enter works without this logic. Therefore this commit removes it entirely.
-
- 14 Oct, 2020 5 commits
-
-
Robert Knight authored
The sidebar application failed to load in Safari 10 due to the ES 2018 polyfill bundle, which contains a polyfill for `Promise.prototype.finally`, not being loaded in that browser. The issue was that 'es2018' was not listed in the polyfill bundles to build in `gulpfile.js` or in the list of bundles required by the sidebar app in `boot.js`. This commit fixes these issues and makes the issue less likely to occur in future by: - Removing the need to manually list each polyfill bundle in `gulpfile.js`. Instead the `src/shared/polyfills` dir is listed and every non-`index.js` file is used as the root of a bundle. - Factoring out the polyfills common to the sidebar and annotator app into a variable and including "es2018" there
-
Robert Knight authored
Element.closest is natively supported [1] by our minimum browser targets. [1] https://developer.mozilla.org/en-US/docs/Web/API/Element/closest#Browser_compatibility
-
Robert Knight authored
This API is available in Edge Legacy but with a quirk that arguments that are optional in the spec are required in this browser. This fixes an issue that the client would incorrectly abort startup in Edge Legacy with a warning that the browser is unsupported.
-
Robert Knight authored
This polyfilled the optional-ness of the `filter` and deprecated `expandEntityRefrences` arguments of `document.createNodeIterator` in IE 11, which is no longer supported.
-
Robert Knight authored
This was only needed for IE 11, which is no longer supported.
-