Right now code coverage results in a lot of false positives for failing builds. This makes it really difficult to tell at a glance whether PRs are passing / failing something more important like linting or tests.
Disabling for now until we can find a better approach.
This undoes a recent change https://github.com/ianstormtaylor/slate/pull/2131
Which hooked up `this.handlers.onNativeSelectionChange` to `'selectionchange'` as well as `this.handlers.onBeforeInput` to `'beforeinput'`.
It turns out that in order to fix the iOS issues, we only needed the change to `onBeforeInput`. The corect handler for `'selectionchange'` is the instance method `this.onNativeSelectionChange`. This broke a whole bunch of focus related issues.
* fix(content): use handlers that actually exist in event listeners
In a recent change, handlers now only exist in `Content#handlers`, but there were still a couple of places where they were being dereferenced directly from the instance. This was causing some side effects in iOS.
Fixes#2125Fixes#2129
* fix(content): also fix removeEventListeners
#### Is this adding or improving a _feature_ or fixing a _bug_?
Debt.
#### What's the new behavior?
This removes almost all existing deprecations from previous API changes, to save on filesize and reduce complexity in the codebase going forward.
It also changes from using the `slate-dev-logger` to using the Facebook-inspired `slate-dev-warning` which can be compiled out of production builds with [`babel-plugin-dev-expression`](https://github.com/4Catalyzer/babel-plugin-dev-expression) to save even further on file size.
The only deprecations it keeps are in the `fromJSON` methods for data model changes like `.kind` and `.leaves` which may still may not have been migrated in databases, since this is a bigger pain point.
#### Have you checked that...?
* [x] The new code matches the existing patterns and styles.
* [x] The tests pass with `yarn test`.
* [x] The linter passes with `yarn lint`. (Fix errors with `yarn prettier`.)
* [x] The relevant examples still work. (Run examples with `yarn watch`.)
#### Does this fix any issues or need any specific reviewers?
Fixes: #1922Fixes: #2105Fixes: #646Fixes: #2109Fixes: #2107Fixes: #2018
#### Is this adding or improving a _feature_ or fixing a _bug_?
Improvement.
#### What's the new behavior?
This introduces two new models: `Decoration` and `Selection`, which both implement the simpler `Range` interface. This way we can introduce properties to these concepts without having to have them live on all ranges, and we can start to introduce more helpful methods specific to each one's needs.
It also means we don't need to move `isFocused` to value, which saves some complexity on the operations side, retaining `set_selection` as the only way selections are modified.
In the process, it also cleans up a lot of the existing model logic for implementing the `Node` interface, and introduces another `Common` interface for shared properties of all Slate models.
#### How does this change work?
It introduces a new `interfaces/` directory where common sets of properties can be declared, and mixed in to the models with the new (simple) `mixin` utility.
#### Have you checked that...?
* [x] The new code matches the existing patterns and styles.
* [x] The tests pass with `yarn test`.
* [x] The linter passes with `yarn lint`. (Fix errors with `yarn prettier`.)
* [x] The relevant examples still work. (Run examples with `yarn watch`.)
#### Does this fix any issues or need any specific reviewers?
Fixes: #1952Fixes: #1807
Fixes: https://github.com/ianstormtaylor/slate/issues/2110
* use fragment instead of node transfer type on drag
* remove the range.isCollapsed check in Changes.deleteAtRange so that it will also remove the selection when only a void node is selected
* fix selection before starting the drag
* fix linting errors
* review fixes
* align with new way of handling void nodes via schema
#### Is this adding or improving a _feature_ or fixing a _bug_?
Improvement.
#### What's the new behavior?
This deprecates the `node.isVoid` property in favor of using `schema.isVoid(node)`, which will allow us to remove the hardcoded "void" concept from the data model, and have it depend on the schema instead.
This allows you to build different kinds of editors, with different void semantics, depending on your use case, without having this information hardcoded in the data itself. Even switching the `isVoid` semantics on the fly based on a user toggling a setting for example.
#### How does this change work?
This is the first step, which just deprecates `node.isVoid`, and provides the new alternative of `schema.isVoid(node)`, while still using the `isVoid` value of nodes under the covers.
The next step is to change the logic to search the schema for real, and completely remove the `isVoid` value from nodes.
#### Have you checked that...?
<!--
Please run through this checklist for your pull request:
-->
* [x] The new code matches the existing patterns and styles.
* [x] The tests pass with `yarn test`.
* [x] The linter passes with `yarn lint`. (Fix errors with `yarn prettier`.)
* [x] The relevant examples still work. (Run examples with `yarn watch`.)