- 26 Oct, 2021 3 commits
-
-
Robert Knight authored
-
Robert Knight authored
The change to load the annotator bundle as a JS module script rather than a classic script broke re-loading of the client, eg. when toggling the browser extension on and off in a page. This is because module scripts are only evaluated the first time that they are loaded in a page, unlike classic scripts. This prevented the annotator entry module (src/annotator/index.js) from re-running when the client was reloaded. It turns out that it is possible to force re-evaluation of module scripts without a negative impact on browser or CDN caching by appending a dynamic fragment to the script URL. This commit applies this technique to force re-evaluation of all module scripts added to the host page by the boot script.
-
dependabot[bot] authored
Bumps [rollup](https://github.com/rollup/rollup) from 2.58.0 to 2.58.3. - [Release notes](https://github.com/rollup/rollup/releases) - [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md) - [Commits](https://github.com/rollup/rollup/compare/v2.58.0...v2.58.3) --- updated-dependencies: - dependency-name: rollup dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
-
- 25 Oct, 2021 10 commits
-
-
dependabot[bot] authored
Bumps [postcss](https://github.com/postcss/postcss) from 8.3.9 to 8.3.11. - [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.9...8.3.11) --- updated-dependencies: - dependency-name: postcss dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
-
dependabot[bot] authored
Bumps [karma](https://github.com/karma-runner/karma) from 6.3.4 to 6.3.5. - [Release notes](https://github.com/karma-runner/karma/releases) - [Changelog](https://github.com/karma-runner/karma/blob/master/CHANGELOG.md) - [Commits](https://github.com/karma-runner/karma/compare/v6.3.4...v6.3.5) --- updated-dependencies: - dependency-name: karma dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
-
dependabot[bot] authored
Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.1010.0 to 2.1013.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.1010.0...v2.1013.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 [@rollup/plugin-node-resolve](https://github.com/rollup/plugins/tree/HEAD/packages/node-resolve) from 13.0.5 to 13.0.6. - [Release notes](https://github.com/rollup/plugins/releases) - [Changelog](https://github.com/rollup/plugins/blob/master/packages/node-resolve/CHANGELOG.md) - [Commits](https://github.com/rollup/plugins/commits/node-resolve-v13.0.6/packages/node-resolve) --- updated-dependencies: - dependency-name: "@rollup/plugin-node-resolve" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
-
dependabot[bot] authored
Bumps [@hypothesis/frontend-build](https://github.com/hypothesis/frontend-build) from 1.0.1 to 1.1.0. - [Release notes](https://github.com/hypothesis/frontend-build/releases) - [Changelog](https://github.com/hypothesis/frontend-build/blob/main/CHANGELOG.md) - [Commits](https://github.com/hypothesis/frontend-build/compare/v1.0.1...v1.1.0) --- updated-dependencies: - dependency-name: "@hypothesis/frontend-build" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
-
dependabot[bot] authored
Bumps [commander](https://github.com/tj/commander.js) from 8.2.0 to 8.3.0. - [Release notes](https://github.com/tj/commander.js/releases) - [Changelog](https://github.com/tj/commander.js/blob/master/CHANGELOG.md) - [Commits](https://github.com/tj/commander.js/compare/v8.2.0...v8.3.0) --- updated-dependencies: - dependency-name: commander dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
-
dependabot[bot] authored
Bumps [@rollup/plugin-commonjs](https://github.com/rollup/plugins/tree/HEAD/packages/commonjs) from 21.0.0 to 21.0.1. - [Release notes](https://github.com/rollup/plugins/releases) - [Changelog](https://github.com/rollup/plugins/blob/master/packages/commonjs/CHANGELOG.md) - [Commits](https://github.com/rollup/plugins/commits/commonjs-v21.0.1/packages/commonjs) --- updated-dependencies: - dependency-name: "@rollup/plugin-commonjs" 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.2 to 1.43.3. - [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.2...1.43.3) --- updated-dependencies: - dependency-name: sass dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
-
dependabot[bot] authored
Bumps [@rollup/plugin-alias](https://github.com/rollup/plugins/tree/HEAD/packages/alias) from 3.1.5 to 3.1.8. - [Release notes](https://github.com/rollup/plugins/releases) - [Changelog](https://github.com/rollup/plugins/blob/master/packages/alias/CHANGELOG.md) - [Commits](https://github.com/rollup/plugins/commits/alias-v3.1.8/packages/alias) --- updated-dependencies: - dependency-name: "@rollup/plugin-alias" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
-
dependabot[bot] authored
Bumps [core-js](https://github.com/zloirock/core-js) from 3.18.3 to 3.19.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.18.3...v3.19.0) --- updated-dependencies: - dependency-name: core-js dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
-
- 22 Oct, 2021 2 commits
-
-
Robert Knight authored
Update lint config for .mjs files and remove unused variables in gulpfile.mjs.
-
Robert Knight authored
See also https://github.com/hypothesis/frontend-shared/pull/215.
-
- 20 Oct, 2021 1 commit
-
-
Eduardo Sanz García authored
There are two type of events: * command events (`openSidebar`, `closeSidebar`): direct the receiving frame to take an specific action. * information events ('sidebarOpened`, `helpRequested`): informs the receiving frame that an action _already_ took place, in case a follow up action needs to happen. The `destroyFrame` aligns more with the second type. Follow up of: https://github.com/hypothesis/client/pull/3838/files#r731077947
-
- 19 Oct, 2021 23 commits
-
-
Eduardo Sanz García authored
The new name reflects more obviously the meaning the purpose of the event.
-
Eduardo Sanz García authored
This is the event that creates the annotation, so it is better to name it in a more obvious way. Context: https://github.com/hypothesis/client/pull/3829#discussion_r726880585
-
Robert Knight authored
-
Robert Knight authored
Change the logic for making highlights visible when creating a new annotation, so that it works if the annotation was created in a non-host frame. This is done by moving the logic from the `beforeAnnotationCreated` handler in the Sidebar class, which was only called for annotations in the host frame, to the `beforeCreateAnnotation` handler in FrameSyncService, which is called for all frames. The sidebar app will then send a request to show highlights to the host frame, which will update the sidebar's controls and then relay the request to guest frames.
-
Robert Knight authored
Make the client's highlight visibility state work in a sane way in scenarios where there are multiple guests, or the main guest frame is not the host frame. Previously there were several problems in these scenarios: - It was unclear which component of the application "owned" the highlight visibility state. The state in the sidebar could be changed as a result of the `highlightsVisibleChanged` event emitted by a Guest, as well as the user toggling highlight controls in the sidebar. - In the sidebar's `open` and `close` methods it directly set the highlight visibility in the main guest if the `showHighlights` setting was set to `whenSidebarOpen`. This meant that it didn't work for guests that were not in the main frame. - Guest frames could be configured with different `showHighlights` settings. In this case it was unclear what should happen. This commit resolves this by making the `Sidebar` class in the host frame the central owner of this state. It handles configuring the initial state based on the `showHighlights` configuration setting, and reflecting this state to the sidebar application which in turn reflects it to guest frames. The initial visibility of highlights in a guest frame is synchronized with this state when the guest frame connects to the sidebar. This state is updated by the `Sidebar` class when: - The user toggles the highlight visibility control in the sidebar - A new highlight or annotation is created in a guest frame - The sidebar opens and closes, if the `showHighlights` configuration was set to `whenSidebarOpen` Additionally the inconsistency of `setHighlightsVisible` vs `setVisibleHighlights` in identifier and event names has been resolved by using `setHighlightsVisible`/`highlightsVisible` everywhere. Part of https://github.com/hypothesis/client/issues/3798
-
Robert Knight authored
There was an action to set this state but it was never read anywhere.
-
Eduardo Sanz García authored
Co-authored-by: Robert Knight <robertknight@gmail.com>
-
Eduardo Sanz García authored
I have created type definitions for all the event names that are sent across the different frames using various `Bridge`s. It is based on the previous `bridge-events.js`. I broke down the events in four sections based on the direction of the messages: * guest -> sidebar events * host -> sidebar events * sidebar -> guest/s events * sidebar -> host events For those events that didn't have a description I added one. This is more stringent and less verbose than the previous lookup system.
-
Robert Knight authored
Move the responsibility for opening the sidebar when there is a draft to edit from the guest into the sidebar's `FrameSyncService`. The initial motivation for this was to make the logic in the `beforeAnnotationCreated` event handler in the `Sidebar` class work if the annotation is created in a non-host guest frame. The plan was to make the sidebar send an `openSidebar` request with custom options that would trigger the logic that used to be in the `beforeAnnotationCreated` event handler. However it appears that focusing the sidebar frame is no longer necessary. In my testing the input field in the sidebar was successfully focused regardless of whether `iframe.contentWindow.focus()` was called or not. Therefore I have just removed the handler. Even though the original need no longer exists, moving the logic still seems sensible because logically it is the sidebar application that knows it is awaiting user input after a new draft is created. It also means that if we do find a need to re-introduce the frame-focusing logic that used to be in the `beforeAnnotationCreated` handler, we can do so in a way that works with annotations created in non-host frames.
-
Robert Knight authored
The initial un-hiding and opening of the sidebar was previously triggered by a `panelReady` event emitted by the Guest in the host frame when it connects. As part of eliminating the need for the host frame to also be a guest, change the initial sidebar open to use the `Sidebar.ready` promise instead, which is resolved when the sidebar applicaiton sends a `hypothesisSidebarReady` notice to the `Sidebar` app. Part of https://github.com/hypothesis/client/issues/3798
-
Robert Knight authored
Fix `gulp test --watch`. See https://github.com/hypothesis/frontend-shared/pull/214.
-
Robert Knight authored
Streamline the Karma configuration to remove obsolete settings and make it easier to see what non-default configuration we have supplied. - Remove `grep` option handling. The `--grep` option when running tests is now used in gulpfile.js to select which _files_ are included in the test. - Remove comments which add little value - Remove config settings that just set default values which are not expected to change in future
-
dependabot[bot] authored
Bumps [rollup](https://github.com/rollup/rollup) from 2.47.0 to 2.58.0. - [Release notes](https://github.com/rollup/rollup/releases) - [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md) - [Commits](https://github.com/rollup/rollup/compare/v2.47.0...v2.58.0) --- updated-dependencies: - dependency-name: rollup dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
-
dependabot[bot] authored
Bumps [babel-plugin-istanbul](https://github.com/istanbuljs/babel-plugin-istanbul) from 6.0.0 to 6.1.1. - [Release notes](https://github.com/istanbuljs/babel-plugin-istanbul/releases) - [Changelog](https://github.com/istanbuljs/babel-plugin-istanbul/blob/master/CHANGELOG.md) - [Commits](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v6.0.0...v6.1.1) --- updated-dependencies: - dependency-name: babel-plugin-istanbul dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
-
dependabot[bot] authored
Bumps [@rollup/plugin-commonjs](https://github.com/rollup/plugins/tree/HEAD/packages/commonjs) from 19.0.0 to 21.0.0. - [Release notes](https://github.com/rollup/plugins/releases) - [Changelog](https://github.com/rollup/plugins/blob/master/packages/commonjs/CHANGELOG.md) - [Commits](https://github.com/rollup/plugins/commits/commonjs-v21.0.0/packages/commonjs) --- updated-dependencies: - dependency-name: "@rollup/plugin-commonjs" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
-
dependabot[bot] authored
Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.1004.0 to 2.1010.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.1004.0...v2.1010.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 [@rollup/plugin-node-resolve](https://github.com/rollup/plugins/tree/HEAD/packages/node-resolve) from 13.0.0 to 13.0.5. - [Release notes](https://github.com/rollup/plugins/releases) - [Changelog](https://github.com/rollup/plugins/blob/master/packages/node-resolve/CHANGELOG.md) - [Commits](https://github.com/rollup/plugins/commits/node-resolve-v13.0.5/packages/node-resolve) --- updated-dependencies: - dependency-name: "@rollup/plugin-node-resolve" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
-
dependabot[bot] authored
Bumps [mocha](https://github.com/mochajs/mocha) from 9.1.2 to 9.1.3. - [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/v9.1.2...v9.1.3) --- updated-dependencies: - dependency-name: mocha 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.42.1 to 1.43.2. - [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.42.1...1.43.2) --- updated-dependencies: - dependency-name: sass dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
-
dependabot[bot] authored
Bumps [@rollup/plugin-alias](https://github.com/rollup/plugins/tree/HEAD/packages/alias) from 3.1.2 to 3.1.5. - [Release notes](https://github.com/rollup/plugins/releases) - [Changelog](https://github.com/rollup/plugins/blob/master/packages/alias/CHANGELOG.md) - [Commits](https://github.com/rollup/plugins/commits/alias-v3.1.5/packages/alias) --- updated-dependencies: - dependency-name: "@rollup/plugin-alias" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
-
dependabot[bot] authored
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.4.3 to 4.4.4. - [Release notes](https://github.com/Microsoft/TypeScript/releases) - [Commits](https://github.com/Microsoft/TypeScript/compare/v4.4.3...v4.4.4) --- updated-dependencies: - dependency-name: typescript dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
-
dependabot[bot] authored
Bumps [core-js](https://github.com/zloirock/core-js) from 3.18.2 to 3.18.3. - [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.18.2...v3.18.3) --- updated-dependencies: - dependency-name: core-js dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
-
dependabot[bot] authored
Bumps [@rollup/plugin-replace](https://github.com/rollup/plugins/tree/HEAD/packages/replace) from 2.4.2 to 3.0.0. - [Release notes](https://github.com/rollup/plugins/releases) - [Changelog](https://github.com/rollup/plugins/blob/master/packages/replace/CHANGELOG.md) - [Commits](https://github.com/rollup/plugins/commits/wasm-v3.0.0/packages/replace) --- updated-dependencies: - dependency-name: "@rollup/plugin-replace" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
-
- 18 Oct, 2021 1 commit
-
-
Robert Knight authored
Convert the Rollup config files to have a `.mjs` extension so that Node can natively load them as ES modules and then load them using `import(...)` rather than the `loadConfigFile` helper. This avoids a deprecation warning when importing `rollup/dist/loadConfigFile`: ``` (node:21339) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./dist/" in the "exports" field module ... ``` This also makes the way the config file is loaded more transparent, since its just a regular dynamic import. The downside of this change is that we don't get a `warnings` object back to print warnings that occur during bundling. Instead have to pass an `onwarn` handler to `rollup.{rollup, watch}`.
-