- 08 Mar, 2021 9 commits
-
-
dependabot[bot] authored
Bumps [axe-core](https://github.com/dequelabs/axe-core) from 4.1.2 to 4.1.3. - [Release notes](https://github.com/dequelabs/axe-core/releases) - [Changelog](https://github.com/dequelabs/axe-core/blob/develop/CHANGELOG.md) - [Commits](https://github.com/dequelabs/axe-core/compare/v4.1.2...v4.1.3) Signed-off-by: dependabot[bot] <support@github.com>
-
dependabot[bot] authored
Bumps [mocha](https://github.com/mochajs/mocha) from 8.3.0 to 8.3.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.3.0...v8.3.1) Signed-off-by: dependabot[bot] <support@github.com>
-
Eduardo Sanz García authored
The @hypothesis/frontend-shared lives now in another repo. The recommended way to test the package in the context of the client is using yalc. Therefore, it is better to ignores yalc related files so they are not committed by mistake.
-
dependabot[bot] authored
Bumps [chai](https://github.com/chaijs/chai) from 4.3.1 to 4.3.3. - [Release notes](https://github.com/chaijs/chai/releases) - [Changelog](https://github.com/chaijs/chai/blob/main/History.md) - [Commits](https://github.com/chaijs/chai/compare/4.3.1...4.3.3) Signed-off-by: dependabot[bot] <support@github.com>
-
Robert Knight authored
Check that non-empty tags are assigned when expected.
-
Robert Knight authored
`createAnnotation` used to accept a partially filled-out annotation object with arbitrary properties. However the argument was only ever used to set the `$highlight` flag. Therefore we can simplify the interface by making the method accept just a `highlight` flag instead. - Simplify `createAnnotation` argument - Add tests for handling of `highlight` option to `createAnnotation` - Remove the `createHighlight` method in guest as it was just a trivial wrapper around `createAnnotation({ highlight: true })`
-
Robert Knight authored
Add missing tests for this critical property of new annotations. In the process revise some variable names in `createAnnotation` that were misleading.
-
Robert Knight authored
Add tests for the main code paths in `Guest` that call `createAnnotation`.
-
Robert Knight authored
Convert the `createAnnotation` method of `Guest` to use async/await instead of manual chaining of Promise operations. This makes it easier to follow the logic and see that document metadata is assigned to the annotation before it is broadcast to other parts of the annotator in the `beforeAnnotationCreated` event. It also makes it easier to external code (eg. the tests) to determine when `createAnnotation` is "done" and has finished updating the annotation. - Convert `Guest#createAnnotation` to use async/await - Update tests for `createAnnotation` to await the returned Promise instead of a fixed timeout - Add a missing check in `createAnnotation` tests for the argument passed to the `beforeAnnotationCreated` event
-
- 05 Mar, 2021 9 commits
-
-
Lyza Danger Gardner authored
-
Lyza Danger Gardner authored
Open links to documents in a new tab. This is important in the Notebook view at present to "escape" the Notebook's frame, but makes sense in all contexts as it more closely adheres to our pattern of opening links to external properties in new windows.
-
Lyza Danger Gardner authored
Make sure document titles that are not linked don't look like links.
-
Lyza Danger Gardner authored
Make `AnnotationTimestamps` align with changes to `ShowDocumentInfo`; it is now a dumb component. Centralize logic in `AnnotationHeader`.
-
Lyza Danger Gardner authored
- Refactor `ShowDocumentInfo`: don't link to documents for third-party annotations. This is a possibly-temporary measure to prevent linking to documents that are not directly accessible, e.g. in an LMS context. - Remove unnecessary forwarding of `showDocumentInfo` through several components. - Centralize some logic in `AnnotationHeader` and make `ShowDocumentInfo` a dumb component.
-
Eduardo Sanz García authored
These changes enforce that the bucket-bar is destroyed and allows multiple creations of the bucket bar, if needed.
-
Robert Knight authored
The sidebar is not the only other frame that may be interested in new annotations. The notebook is too.
-
Robert Knight authored
- Extract the repeated logic for checking the data passed to the event's callback into a `createCallback` helper - Add separate tests for HTML and PDF documents - Add test for the error path when getting the URL of a PDF fails
-
Robert Knight authored
Replace the "plugin" functionality in the Guest that indirectly instantiates the `DocumentMeta`, `PDF` and `CrossFrame` classes with direct instantiation of those classes. The annotator part of the Hypothesis client is no longer a pluggable toolbox which can be arbitrarily extended by user-provided plugins. Removing the "plugins" logic and replacing it with direct construction of the necessary classes removes a lot of indirection that made the code harder to follow and also makes it easier for TypeScript to statically check the code. It will also enable the `config` object that is passed to `Guest` to be paired down to just the fields that are actually needed and properly typed. In future we will need some kind of plugin/integration facility to support different document viewers. For we will build a more specific document type integration facility when the time comes. - Remove `this.plugins` field from `Guest` class and `pluginClasses` config and replace with direct construction of `PDFIntegration`, `DocumentMeta` and `CrossFrame` classes - Update the `AnchoringImpl` typedef to correctly reflect that some anchoring implementations (HTML) have a synchronous `describe` method - Remove unnecessary `config` argument to `PDF` constructor - Replace the `PDF: {}` content in the guest config with `documentType: 'pdf'` as a more obvious way for the annotator entry point to configure which document viewer integration is loaded. In future we can generalize this to support different types of viewer integration.
-
- 03 Mar, 2021 13 commits
-
-
Eduardo Sanz García authored
-
Eduardo Sanz García authored
This PR prevents scrolling of the body of the host when the notebook is opened. Reported [here](https://github.com/hypothesis/client/pull/3024#pullrequestreview-592240569). This solution doesn't work for iOS < 13.
-
Eduardo Sanz García authored
- made the button stick on the top without taking space from the notebook. I re-enabled the original padding of the notebook. - fixed an issue with window resizing that caused the notebook to disappear. - on touch devices closing the notebook, closed the sidebar too.
-
Eduardo Sanz García authored
The sidebar component directs the opening of the notebook. This is for two reasons: * it's a little bit easier to save the UI state of the current sidebar (immediately before the notebook is opened), in case in the future we want to restored it. * to avoid adding additional events, like `show/hideSidebarControls`, that probably would be needed for granular control of the sidebar, in case the notebook would be directing the process of closing/re-opening the sidebar.
-
Eduardo Sanz García authored
Because I am planning to introduce another method to hide the controls, I renamed the hide/show methods in the sidebar and notebook components to open/close. I also feel it describes better the visual outcome. For consistency, I renamed the show/hideNotebook to open/closeNotebook.
-
Robert Knight authored
Render the bucket bar immediately using the Guest's current set of anchors when it is constructed. This resolves an issue introduced in 68d44395 that the background of the bucket bar did not appear until after the first batch of annotations had been fetched from the API and synced from the sidebar to the annotator. It also ensures that buckets are drawn for any anchors that already exist in the Guest when the BucketBar is initialized.
-
Robert Knight authored
- Move `annotator-bucket-bar-width` variable down into the one file that uses it - Remove unused `annotator-bucket-bar-line-height` variable
-
Robert Knight authored
Rename CSS classes used by the bucket bar to match the `Buckets` component name and move the corresponding styles into src/styles/annotator/components/Buckets.scss. As was recently done with the sidebar's vertical toolbar, the styles on the bucket bar container were moved to an element rendered by the `Buckets` component itself, so that there is a 1:1 association between JS modules and SASS modules for the bucket bar.
-
dependabot[bot] authored
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.13.8 to 7.13.9. - [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.13.9/packages/babel-preset-env) Signed-off-by: dependabot[bot] <support@github.com>
-
dependabot[bot] authored
Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.853.0 to 2.854.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.853.0...v2.854.0) Signed-off-by: dependabot[bot] <support@github.com>
-
dependabot[bot] authored
Bumps [@octokit/rest](https://github.com/octokit/rest.js) from 18.3.0 to 18.3.1. - [Release notes](https://github.com/octokit/rest.js/releases) - [Commits](https://github.com/octokit/rest.js/compare/v18.3.0...v18.3.1) Signed-off-by: dependabot[bot] <support@github.com>
-
dependabot[bot] authored
Bumps [@sentry/browser](https://github.com/getsentry/sentry-javascript) from 6.2.0 to 6.2.1. - [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/6.2.0...6.2.1) Signed-off-by: dependabot[bot] <support@github.com>
-
dependabot[bot] authored
Bumps [chai](https://github.com/chaijs/chai) from 4.3.0 to 4.3.1. - [Release notes](https://github.com/chaijs/chai/releases) - [Changelog](https://github.com/chaijs/chai/blob/main/History.md) - [Commits](https://github.com/chaijs/chai/compare/4.3.0...4.3.1) Signed-off-by: dependabot[bot] <support@github.com>
-
- 02 Mar, 2021 6 commits
-
-
Kyle Keating authored
-
Kyle Keating authored
- Remove github actions related to frontend-shared - Remove scripts and gulp commands related to frontend-shared - frontend-shared is now managed from its own repository.
-
Kyle Keating authored
There was a version issue between the current installed version 1.4.0 and the local copy being using in the subfolder (/frontend-shared). The newest shared package exports an _index.scss file which is required by the client, but it was not formally importing a version of the shared package which exported the _index.scss file. The client now imports 1.9.0 which has _index.scss and now the frontend-shared folder can be fully removed from the client. TL;DR, This is just more reason to move the shared package to its own repo because this issue was being masked.
-
Robert Knight authored
Fix a regression introduced in b52f00e0 where clicking in a PDF when side-by-side is active would cause the sidebar to close instead of remaining open. That PR made `PdfSidebar` no longer inherit (indirectly) from Guest but did not update the references to the `closeSidebarOnDocumentClick` property of the Guest.
-
Robert Knight authored
This handler sets the `document` property of new annotations to metadata extracted from `<meta>` and `<link>` tags on the page. It is unnecessary however because the `Guest` class sets this property using either `DocumentMeta.metadata` or `PDF.getMetadata`, depending on the document type, before it emits the `beforeAnnotationCreated` event. In PDFs this code is a serious hazard because if the `beforeAnnotationCreated` event subscriber in `DocumentMeta` runs before `AnnotationSync`'s corresponding event handler then DocumentMeta will overwrite the PDF document-specific annotation metadata with generic HTML document metadata - losing the critical `documentFingerprint` property. Fortunately this problem did not occur because the `Guest` constructor instantiates the `AnnotationSync` class before the `DocumentMeta` class. Consequently AnnotationSync's `beforeAnnotationCreated` event handler runs before DocumentMeta's and pushes new annotations to the sidebar with the correct document metadata before `DocumentMeta` overwrites it.
-
Kyle Keating authored
The ThreadList component has a required felid `threads` but its value was undefined in tests. The value comes from the mocked version of `useRootThread.children`
-
- 01 Mar, 2021 3 commits
-
-
Robert Knight authored
The recent refactor to change the relationship between the `Guest` and `Sidebar` classes broke PDF.js integration because the `PdfSidebar` class is no longer able to modify the config that is passed to the `Guest` class. Previously it would pass `PDF: {}` in the config to the `super()` call which would then result in the `Guest` class loading the PDF integration. This now has to be done in the `index.js` module. We already had to do this previously for ebooks. Now it has to be done for all scenarios.
-
Eduardo Sanz García authored
If `make sure` or `make checkformatting` are the first command that are run after version update that included prettier, the commands will use the previous version of prettier.
-
Eduardo Sanz García authored
With the recent changes in the gulp test command (#2989), everything that could be achieved by `make servetest` can be done by options to the `make test` target.
-