- 05 Nov, 2019 1 commit
-
-
Robert Knight authored
Convert excerpt (1/n) - Fix several issues with Angular <-> Preact wrapper
-
- 04 Nov, 2019 4 commits
-
-
Robert Knight authored
Change approach to mocking components in unit tests
-
Robert Knight authored
-
Robert Knight authored
Shallow rendering with Enzyme's `shallow` function conflates two changes in rendering behavior: 1. Only rendering "one level deep" so that a test for a component is isolated from the details of any child components 2. In React (but not Preact) rendering to a data structure instead of real DOM nodes. Even though Preact still renders real DOM nodes, Enzyme's shallow rendering API removes many of the features of `mount` rendering In practice, we only used shallow rendering for (1) and we have found that there are use cases where we want (1) but still want to be able to interact with the real DOM nodes (ie. we don't want (2)). The need to use different mocking approaches and understand the conflated behaviors mentioned above has been a source of confusion for developers. This commit changes the mocking approach to always use a pattern that we have until now only used selectively. Enzyme's `mount` rendering mode is always used, but a utility function, `mockImportedComponents`, is used with our existing import mocking (via babel-plugin-mockable-imports) to semi-automatically mock all imported components. Each test has been changed as follows: 1. Replace `shallow` with `mount` 2. Call `ComponentUnderTest.$imports.$mock(mockImportedComponents())` in the test setup to mock all imported components, but not helper components defined in the same file. 3. Call `ComponentUnderTest.$imports.$restore()` in test cleanup, if the test was not already doing that. 4. Replace uses of (`wrapper.find(SomeChildComponent)`) with (`wrapper.find('SomeChildComponent')`. This is necessary because the mocked component no longer has the same identity as the original, so we look it up by name instead.
-
Robert Knight authored
This will be used as an alternative to shallow rendering to facilitate unit-testing of Preact components.
-
- 29 Oct, 2019 4 commits
-
-
Robert Knight authored
This fixes an issue with `useLayoutEffect` where it could run before a component's DOM node became connected to the document, preventing the effect from measuring the node.
-
Robert Knight authored
It turns out that `$onChanges` is invoked both when the component is initially created as well as subsequent updates. Therefore `$onInit` and `$onChanges` duplicated work and components were rendered twice during initial creation.
-
Robert Knight authored
Allow function props passed to Preact components wrapped with `wrapReactComponent` to be invoked when a digest cycle is already active for some reason. In that case using `$scope.$apply` triggers an error. This scenario is rare, as callbacks are usually invoked in response to events that happen outside of Angular, but changes made by Angular code can indirectly cause Preact components to invoke callbacks. For example, in layout effects which run at the end of a `render` call.
-
Robert Knight authored
Fix PDF anchoring when annotation refers to last text on a page
-
- 28 Oct, 2019 17 commits
-
-
Robert Knight authored
Bump eslint from 6.5.1 to 6.6.0
-
Robert Knight authored
Bump sass from 1.23.0 to 1.23.1
-
Robert Knight authored
Whether to add commas after the final argument in array and object literals or function argument lists is handled by Prettier.
-
Robert Knight authored
Bump scroll-into-view from 1.11.0 to 1.12.2
-
Robert Knight authored
Bump autoprefixer from 9.6.5 to 9.7.0
-
Robert Knight authored
Merge pull request #1460 from hypothesis/dependabot/npm_and_yarn/babel-plugin-transform-async-to-promises-0.8.15 Bump babel-plugin-transform-async-to-promises from 0.8.14 to 0.8.15
-
Robert Knight authored
Bump puppeteer from 1.20.0 to 2.0.0
-
dependabot-preview[bot] authored
-
dependabot-preview[bot] authored
Bumps [autoprefixer](https://github.com/postcss/autoprefixer) from 9.6.5 to 9.7.0. - [Release notes](https://github.com/postcss/autoprefixer/releases) - [Changelog](https://github.com/postcss/autoprefixer/blob/master/CHANGELOG.md) - [Commits](https://github.com/postcss/autoprefixer/compare/9.6.5...9.7.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
dependabot-preview[bot] authored
-
dependabot-preview[bot] authored
Bumps [eslint](https://github.com/eslint/eslint) from 6.5.1 to 6.6.0. - [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/v6.5.1...v6.6.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
dependabot-preview[bot] authored
Bumps [@octokit/rest](https://github.com/octokit/rest.js) from 16.33.1 to 16.34.0. - [Release notes](https://github.com/octokit/rest.js/releases) - [Commits](https://github.com/octokit/rest.js/compare/v16.33.1...v16.34.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
dependabot-preview[bot] authored
Bumps [puppeteer](https://github.com/GoogleChrome/puppeteer) from 1.20.0 to 2.0.0. - [Release notes](https://github.com/GoogleChrome/puppeteer/releases) - [Commits](https://github.com/GoogleChrome/puppeteer/compare/v1.20.0...v2.0.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
dependabot-preview[bot] authored
Bumps [babel-plugin-transform-async-to-promises](https://github.com/rpetrich/babel-plugin-transform-async-to-promises) from 0.8.14 to 0.8.15. - [Release notes](https://github.com/rpetrich/babel-plugin-transform-async-to-promises/releases) - [Commits](https://github.com/rpetrich/babel-plugin-transform-async-to-promises/compare/v0.8.14...v0.8.15) 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.553.0 to 2.556.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.553.0...v2.556.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
dependabot-preview[bot] authored
Bumps [sass](https://github.com/sass/dart-sass) from 1.23.0 to 1.23.1. - [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.23.0...1.23.1) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
dependabot-preview[bot] authored
Bumps [scroll-into-view](https://github.com/KoryNunn/scroll-into-view) from 1.11.0 to 1.12.2. - [Release notes](https://github.com/KoryNunn/scroll-into-view/releases) - [Changelog](https://github.com/KoryNunn/scroll-into-view/blob/master/CHANGELOG.md) - [Commits](https://github.com/KoryNunn/scroll-into-view/commits) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
-
- 25 Oct, 2019 6 commits
-
-
Lyza Gardner authored
Help & Tutorial 2/n: Add `isSidebar`, `versionData` utilities
-
Lyza Danger Gardner authored
Add a utility for organizing information about the current user session and app version. This will be used by the updated help panel.
-
Lyza Danger Gardner authored
The client application has several existing tests to see if the app is “in sidebar mode” currently. This utility is a first step to harmonizing this and making things consistent.
-
Robert Knight authored
Improve accessability for toggle buttons
-
Robert Knight authored
These don't cover all of the functionality but they do at least cover the main buttons. A small change to `toolbar.coffee` was needed so that the button states are updated correctly when the toolbar is not added to `document.body`.
-
Lyza Gardner authored
Help & Tutorial 1/n: Add and update SVG icons
-
- 24 Oct, 2019 2 commits
-
-
Lyza Danger Gardner authored
-
Kyle Keating authored
- Add aria attribute for show / hide side bar - Add aria attribute for show / hide highlights - Fix a bug that prevents the correct class from showing on the highlight icon when highlights are initially disabled
-
- 22 Oct, 2019 6 commits
-
-
Kyle Keating authored
Remove unroll and convert its use cases to use forEach instead
-
Kyle Keating authored
`unroll()` is not necessary to maintain as it didn't offer any value when writing tests over a simple `forEach()` call over a list of test parameter sets for a common testing function.
-
Robert Knight authored
-
Robert Knight authored
Change PDF anchoring to use the new text position => Range implementation from the `src/annotator/anchoring/text-position` module which fixes an issue when the last text in a PDF page is selected. Fixes #1329
-
Robert Knight authored
Add a new implementation of conversion from text positions (that is, offsets within an element's `textContent`) to DOM `Range`s along with test cases. This addresses an issue with the existing implementation of `toRange` in the `dom-anchor-text-position` package where conversion fails when the text position includes the end of the element's text. Even if/when the issue is addressed upstream, I think it would be useful to retain these test cases to guard against future regressions. See #1329
-
Robert Knight authored
This currently fails to a bug on `dom-anchor-text-position`'s `toRange` implementation. See #1329
-