- 26 Mar, 2021 5 commits
-
-
Lyza Danger Gardner authored
-
Lyza Danger Gardner authored
Add shared button components in a temporary "shared/components" directory. The plan is to extract this to the `frontend-shared` package once it has been more further integrated into the client preact app(s) and the kinks are worked out. This will replace `src/sidebar/components/Button` and will be reusable in other apps
-
Lyza Danger Gardner authored
Update project typecheck configuration so that typechecking may be additionally applied to the `dev-server` area of the project. This helps for typechecking usage of components in the "UI Playground" app. * Add `tsconfig.json` for `dev-server` area of project * Add "project references" at root level See https://www.typescriptlang.org/docs/handbook/project-references.html * Update `package.json` `typecheck` script
-
Robert Knight authored
Move the functionality that PdfSidebar implements elsewhere and remove the class. This mainly consists of side-by-side mode, but there is also the logic to get the scrollable document container for use with the bucket bar. The PDF-specific logic has been moved to the `PDF` class in `src/annotator/plugin/pdf.js` and the generic logic has been moved to the `Sidebar` or `Guest` classes. This change is a step towards creating an common interface between the Guest/Sidebar and the document-type/viewer specific functionality. In future the `PDF` class will evolve into the implementation of this interface for PDFs. For HTML documents the logic is currently contained directly in the `Guest` class and this will be extracted out into a class that implements the same interface. - Move the PDF-specific parts of side-by-side mode into `PDF#fitSideBySide` - Move the generic parts of side-by-side mode into the `Sidebar` class. This will allow it to be reused for HTML documents or other document types in future - Move the logic for determining the scrollable container into `PDF#contentContainer` - Change the annotator setup code in `annotator/index.js` to always instantiate the `Sidebar` class, regardless of document type
-
Eduardo Sanz García authored
When the `adder` is hidden reposition the outer container to the top-left corner of the host page.
-
- 25 Mar, 2021 3 commits
-
-
Robert Knight authored
-
Robert Knight authored
Add a PDF document link on the dev server homepage which uses a URL that has a random suffix parameter added on page load and each time the link is clicked. This is useful for testing the behavior of client features (eg. annotation fetch and real time updates) which should show the same content/notifications etc. across copies of the "same" document presented at different URLs. This will aid with testing changes such as https://github.com/hypothesis/h/pull/6542.
-
Eduardo Sanz García authored
-
- 24 Mar, 2021 2 commits
-
-
Kyle Keating authored
This changes the sorting in the notebook to sort by date created rather than last edited date ("updated"). This prevents root threads from resorting to the top after they are edited in the notebook. This also changes the way the sidebar orders root threads when using Newest/Oldest sorting filter in the same manner.
-
Eduardo Sanz García authored
`Notebook` and `Sidebar` components create `<hypothesis-...>` elements that attach shadow DOMs. This PR makes the `Adder` class responsible of creating its own outer element.
-
- 23 Mar, 2021 3 commits
-
-
Eduardo Sanz García authored
While there is no mechanism to sync new annotations in the notebook, we force re-rendering of the iframe on every 'openNotebook' event, so we fetch the new annotations. This is a temporary fix that is intended to be removed.
-
Lyza Danger Gardner authored
Add some pattern structure to the playground app and a placeholder "Menu" demo
-
Eduardo Sanz García authored
Added a11y tests to these components: - NotebookView - FilterSelect - NotebookResultCount - PaginationNavigation To following components I didn't add a11y tests because they are wrappers of one or several components already tested: - PaginatedThreadList (ThreadList + PaginationNavigation) - NotebookFilters (FilterSelect)
-
- 22 Mar, 2021 9 commits
-
-
Robert Knight authored
This ensures that GitHub Actions checks run for PRs submitted from forks, which includes all PRs submitted by people outside the Hypothesis organization. Note that this change which commit the checks run on. See [1] for details. This change also matches how GitHub CI is set up in other projects (eg. lms, h). [1] https://docs.github.com/en/actions/reference/events-that-trigger-workflows#pull_request
-
dependabot[bot] authored
Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.863.0 to 2.868.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.863.0...v2.868.0) Signed-off-by: dependabot[bot] <support@github.com>
-
dependabot[bot] authored
Bumps [@sentry/browser](https://github.com/getsentry/sentry-javascript) from 6.2.2 to 6.2.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/6.2.2...6.2.3) Signed-off-by: dependabot[bot] <support@github.com>
-
dependabot[bot] authored
Bumps [postcss-url](https://github.com/postcss/postcss-url) from 10.1.1 to 10.1.3. - [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.1.1...10.1.3) Signed-off-by: dependabot[bot] <support@github.com>
-
dependabot[bot] authored
Bumps [terser](https://github.com/terser/terser) from 5.6.0 to 5.6.1. - [Release notes](https://github.com/terser/terser/releases) - [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md) - [Commits](https://github.com/terser/terser/commits) Signed-off-by: dependabot[bot] <support@github.com>
-
dependabot[bot] authored
Bumps [commander](https://github.com/tj/commander.js) from 7.1.0 to 7.2.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/v7.1.0...v7.2.0) Signed-off-by: dependabot[bot] <support@github.com>
-
Robert Knight authored
-
Matthew King authored
-
Robert Knight authored
We have had Google Analytics disabled for the Hypothesis client for over a year and do not plan to re-enable it. We may need analytics for other purposes in future (for example, to help inform product design). In that case we will likely implement a solution that is a better fit for whatever those needs end up being. This commit removes the existing analytics code in the meantime so that we don't spend time maintaining something that is not used. Fixes #3027
-
- 19 Mar, 2021 3 commits
-
-
Robert Knight authored
-
Robert Knight authored
-
Robert Knight authored
Display a visual error message if fetching the client's configuration fails, eg. due to a failure to fetch a grant token in the LMS app.
-
- 18 Mar, 2021 7 commits
-
-
Eduardo Sanz García authored
Notebook class creates the container element and instantiates the preact component NotebookModal. NotebookModal listens to the openNotebook event sent through the eventBus and hides and shows the modal accordingly. The creation of the iframe is a costly operation: it involves several backend calls and the rendering of it in the DOM. Therefore, we delay the creation of the iframe element until the NotebookModal listens for the `openNotebook` event. The useEffect's cleanup of the NotebookModal componente has significant effects because it resets the overflow CSS property of document.body. As pointed by @robertknight, `render(null, container)` destroys the component triggering the useEffect's cleanup function.
-
Lyza Danger Gardner authored
Emit a `ResultSizeError` when encountering too many annotations to load. Update `NotebookView` to display a message when this happens.
-
Lyza Danger Gardner authored
-
Lyza Danger Gardner authored
-
Lyza Danger Gardner authored
Add a basic Panel component to be used by `SidebarPanel` and for other basic panel-y needs.
-
Lyza Danger Gardner authored
-
Eduardo Sanz García authored
We have done a little investigation on the number of threads that are visible on a pages in notebook: - on mobile: up to 4 threads - on tables: up to 7 threads - on mobile: up to 8 threads These numbers are just rough estimates since zoom level and screen orientation affects these numbers. Our aim: we want to display the larger number of threads without forcing users to do excessive scrolling. We are going to test with 25 threads per page and see what are users think about that.
-
- 16 Mar, 2021 8 commits
-
-
Robert Knight authored
Per PR feedback, rename the `pageSize` option to something that sounds more like a function/callback, which is what this value now is.
-
Robert Knight authored
When fetching annotations from the backend there is a trade-off between the time taken to generate a page (less if the page size is smaller) and the time taken to fetch all pages (less if the page size is larger). To optimize the perceived loading time we can pick a smaller page size for the first page, enabling the first screenful of annotations/threads to appear quickly, and then use a larger page size for the remaining pages. - Change the `pageSize` option for `SearchClient` from a fixed number to a callback that returns the page size for a given page index - Set the default value for the `pageSize` option to use a small page size (50) for the first page and a larger size (200) for remaining pages
-
Robert Knight authored
Consistently use the term "page" to refer to a subset of results fetched from the search API instead of "batch" or "chunk". This is more consistent within the rest of the client code and also consistent with the API documentation. - Rename `chunkSize` constructor argument to `pageSize` - Change internal references to "batch" or "chunk" in SearchClient to "page"
-
Eduardo Sanz García authored
Reordered fields according to the UI and capitalised properties.
-
Eduardo Sanz García authored
I have tested successfully on the latest version of Chrome, Safari and Firefox. I also tested successfully on an Android and iOS devices. I couldn't tested more exhaustively on other desktop/mobile browser versions because SauceLabs didn't allowed me to retrieve the pasted text. Closes https://github.com/hypothesis/product-backlog/issues/1180
-
Robert Knight authored
Reword this comment to try and make the intent of the code clearer.
-
Robert Knight authored
It is safe to call `load` while annotations are already being loaded, in that it does all the necessary cleanup/interruption of the existing fetch. However it wasn't immediately clear to me from the code that this was the case.
-
Robert Knight authored
Currently both the sidebar and notebook wait until the user's profile and groups are fetched before fetching annotations. This is because the search query to fetch annotations depends on the focused group. The groups query may take several hundred ms to complete, so this ends up delaying the initial fetch and display of annotations by that amount of time. In the notebook the common case is that the user is already logged in and the notebook is configured to display a specific group ("the direct linked group"): whatever the user had previously selected in the sidebar. In this scenario it is very likely that the direct-linked group will end up being the focused one after groups are fetched. Based on these assumptions, we can speed up the initial annotation by loading annotations from the direct-linked group. If the focused group ends up being different, annotations will just be re-fetched from the correct group once that is known.
-