Skip to content

Commit

Permalink
Android 8 and 9 Support (#2565)
Browse files Browse the repository at this point in the history
* Allow the dev server to work for non localhost host

* Refactored set-selection-from-dom into utils as prep for Android support

* Show debug onInput at start if triggered

* Added and refactored to use set-text-from-dom-node with improved set selection after input

* Remove unnecessary console.log in set-text-from-dom-node

* Fixes to pass linter

* Adds basic composition to Android API27 including fixing one bug where compositionStart does not fire

* Fix some of the enter handling in API 27 and 28

* Add fixes for API 25

* Add debug for slate:update instead of separate render and updateSelection

* Add API 26 fix for ignoring all but Enter in onKeyDown

* Fix enter on Android 26 and 27

* Revert onSelect bug. Editor API 26 and 27 stable-ish

* Fix enter at beginning and end of word in API 26 and 27

* Fix enter handling at end of line API 26 and 27

* Fix reversion of enter bug when not at end of line

* Rename enter to linefeed which is more accurate

* Fix backspace on Android 27 and 28

* Fix enter at end of line then backspace then enter bug in API 26 and 27

* Refactor to simplify reading code

* Refactor to use executor and fix the suggestion problem

* Fix multi point edit in API 27/28

* Update Android documentation on enter handling

* Fix enter in API 26/27 and document 4 different enter cases

* Refactor partial into SlateSnapshot

* Complete SlateSnapshot refactor

* Remove unnecessary plugin comments

* Add smoke tests

* Rename smoke tests to composition in exmaples

* Fix API28 split join and insertion

* Fix space then backspace in middle of word bug in API 28

* Add text for middle word space and backspace bug

* Add note that the space backspace bug does not exist on API 27

* Fix 'It me. No.' bug in API 26/27

* Fix comments

* Update comments to fit Slate style guide

* Move a debug statement

* Fix zero-width selection placement bug.

* Fix 'it is' then enter in middle of 'it' bug

* Partial fix of enter, backspace, enter in word

* Add and fix comments. Fix selection in zero-width for API26-27

* Fix linting

* Fix documentation

* Remove snapback from packages

* Remove snapback from yarn.lock

* Rename SlateSnapshot to DomSnapshot

* Remove guard on DomSnapshot apply method

* Remove debug plugin from plugins/dom

* Remove unnecessary comment in content.js componentDidUpdate

* Remove closest and add function into dom-snapshot directly

* Remove unused DebugPlugin

* Move Android detection related code into slate-dev-environment

* Capitalize to Number in JSDoc

* Add API version and Input Events Level 2 for Android

* Add input events level 2 for android without matching api version

* Fix line failures
  • Loading branch information
thesunny authored Mar 8, 2019
1 parent e0fa493 commit 89adf63
Show file tree
Hide file tree
Showing 23 changed files with 2,090 additions and 81 deletions.
14 changes: 9 additions & 5 deletions examples/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import RTL from './rtl'
import ReadOnly from './read-only'
import RichText from './rich-text'
import SearchHighlighting from './search-highlighting'
import Composition from './composition'
import InputTester from './input-tester'
import SyncingOperations from './syncing-operations'
import Tables from './tables'
Expand All @@ -43,6 +44,7 @@ import Mentions from './mentions'
const EXAMPLES = [
['Check Lists', CheckLists, '/check-lists'],
['Code Highlighting', CodeHighlighting, '/code-highlighting'],
['Composition', Composition, '/composition/:subpage?'],
['Embeds', Embeds, '/embeds'],
['Emojis', Emojis, '/emojis'],
['Forced Layout', ForcedLayout, '/forced-layout'],
Expand Down Expand Up @@ -262,11 +264,13 @@ export default class App extends React.Component {
<Switch>
{EXAMPLES.map(([name, Component, path]) => (
<Route key={path} path={path}>
<div>
<ExampleContent>
<Component />
</ExampleContent>
</div>
{({ match }) => (
<div>
<ExampleContent>
<Component params={match.params} />
</ExampleContent>
</div>
)}
</Route>
))}
<Redirect from="/" to="/rich-text" />
Expand Down
Loading

0 comments on commit 89adf63

Please sign in to comment.