- 25 Mar, 2022 1 commit
-
-
Lyza Danger Gardner authored
-
- 24 Mar, 2022 3 commits
-
-
Robert Knight authored
Introduce a pattern for creating store modules which are fully typed, using the "activity" module as a test case / example. This allows TypeScript to check both external usage of the module, as well as internal consistency between the different elements of it (initial state, reducers, action creators, selectors). The elements of this pattern are: - A `State` type is defined in each module, which is typically whatever shape the module's initial state has. - Each function in the `reducers` map specifies the type of its `state` parameter as `State` and defines the fields of the action. - Action creators use a new `makeAction` helper, which ensures that the type of dispatched actions matches what the reducer expects - The `createStoreModule` helper ties all the elements of the module (reducers, actions, selectors) together and makes sure they are consistent with one another. The general structure of a typed store module, to which the various existing modules will converge, is: ```js import { createStoreModule, makeAction } from '../create-store'; const initialState = { ... } /** @typedef {typeof initialState} State */ const reducers = { /** * @param {State} state * @param {{ id: string }} action */ SOME_ACTION(state, action) { ... } } /** * @param {string} id */ function someAction(id) { return makeAction(reducers, 'SOME_ACTION', { id }); } /** * @param {State} */ function someSelector(state) { ... } export someModule = createStoreModule(initialState, { namespace: 'someModule', reducers, actionCreators: { someAction }, selectors: { someSelector }, }); ```
-
Robert Knight authored
Remove a cryptic piece of code that is no longer needed given the ability to specify default values for template arguments [1] [1] https://github.com/microsoft/TypeScript/pull/45483
-
Lyza Danger Gardner authored
-
- 23 Mar, 2022 6 commits
-
-
Lyza Danger Gardner authored
-
Lyza Danger Gardner authored
-
Lyza Danger Gardner authored
* `onSetPrivacy` => `onSetPrivate` * internal `onEditTags` takes `tags` instead of `{ tags }`
-
Lyza Danger Gardner authored
Update tests for the changes to props and callbacks in `AnnotationEditor` and `AnnotationPublishControl` There were some mis-nested tests for `AnnotationEditor`; fix.
-
Lyza Danger Gardner authored
Make `AnnotationPublishControl` more of a controlled component by pulling callbacks and state up to `AnnotationEditor`. Provide a `draft` prop from `Annotation` to `AnnotationEditor`.
-
Lyza Danger Gardner authored
-
- 22 Mar, 2022 2 commits
-
-
Robert Knight authored
This pattern makes it clearer that we are testing for a callback not being invoked after a sequence of events.
-
Robert Knight authored
Fix various issues that could cause the callback to `onDocumentReady` to fire after the subscription had been canceled. - `pollOnUnload` was called twice for the initial document, once at the top level of the function and once by the first call to `checkForDocumentChange`. This resulted into "unload" listeners being added for the same window. - The initial async `checkForDocumentChange` call would still fire if the subscription was immediately canceled - If the current window's "unload" event fired after the subscription was canceled, polling would be restarted, effectively re-subscribing to document changes.
-
- 21 Mar, 2022 16 commits
-
-
Robert Knight authored
-
Robert Knight authored
-
Robert Knight authored
-
Robert Knight authored
-
Robert Knight authored
-
Robert Knight authored
-
Robert Knight authored
-
Robert Knight authored
-
Robert Knight authored
Add and improve types in src/sidebar/config/ so that this directory typechecks with `noImplicitAny` enabled. - Add "$rpc:requestGroups" as a possible value for the `groups` config in types/config.js, which code in sidebar/config/ needs to replace with a promise for a list of groups. This required a change in `sidebar/services/groups.js` to either check for or explicitly assert that `service.groups` is an array at this point (and not the string "$rpc:requestGroups"). - Replace various `object` types with `ConfigFromHost`, `ConfigFromSidebar` or `SidebarSettings` as appropriate - Rewrite the code at the bottom of `hostPageConfig` that copies configuration from the `config=` URL fragment into a sanitized `ConfigFromHost` object, so that it is easier to read and add types to.
-
dependabot[bot] authored
Bumps [autoprefixer](https://github.com/postcss/autoprefixer) from 10.4.2 to 10.4.4. - [Release notes](https://github.com/postcss/autoprefixer/releases) - [Changelog](https://github.com/postcss/autoprefixer/blob/main/CHANGELOG.md) - [Commits](https://github.com/postcss/autoprefixer/compare/10.4.2...10.4.4) --- updated-dependencies: - dependency-name: autoprefixer dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
-
dependabot[bot] authored
Bumps [@sentry/cli](https://github.com/getsentry/sentry-cli) from 1.73.2 to 1.74.2. - [Release notes](https://github.com/getsentry/sentry-cli/releases) - [Changelog](https://github.com/getsentry/sentry-cli/blob/master/CHANGELOG.md) - [Commits](https://github.com/getsentry/sentry-cli/compare/1.73.2...1.74.2) --- updated-dependencies: - dependency-name: "@sentry/cli" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
-
dependabot[bot] authored
Bumps [postcss](https://github.com/postcss/postcss) from 8.4.8 to 8.4.12. - [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.4.8...8.4.12) --- 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 [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.17.5 to 7.17.8. - [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.17.8/packages/babel-core) --- updated-dependencies: - dependency-name: "@babel/core" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
-
dependabot[bot] authored
Bumps [commander](https://github.com/tj/commander.js) from 9.0.0 to 9.1.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/v9.0.0...v9.1.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 [prettier](https://github.com/prettier/prettier) from 2.5.1 to 2.6.0. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/2.5.1...2.6.0) --- updated-dependencies: - dependency-name: prettier dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
-
dependabot[bot] authored
Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.1092.0 to 2.1096.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.1092.0...v2.1096.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>
-
- 17 Mar, 2022 12 commits
-
-
Robert Knight authored
-
Robert Knight authored
-
Robert Knight authored
-
Robert Knight authored
-
Robert Knight authored
-
Robert Knight authored
-
Robert Knight authored
-
Robert Knight authored
-
Robert Knight authored
-
Robert Knight authored
-
Robert Knight authored
-
Lyza Danger Gardner authored
Prevent body from jumping right in cases where `margin: auto` is set on the body. Body may move left to make room for sidebar, but should never move to the right. Fixes #4280
-