1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-31 19:01:54 +02:00
Commit Graph

1274 Commits

Author SHA1 Message Date
Samy Pessé
8bb5bc1840 Add test for selection after the insertion 2016-10-26 13:35:00 +02:00
Samy Pessé
20fc819c8c Add test for inserting text before selection 2016-10-26 13:11:32 +02:00
Samy Pessé
9ae17d2091 Add unit test for testing insertTextByKey with marks 2016-10-26 12:56:08 +02:00
Samy Pessé
7c046a7b98 Add more basic test for text insertion 2016-10-26 12:40:33 +02:00
Samy Pessé
8703c5390f Add basic test for insertTextByKey 2016-10-26 12:38:00 +02:00
Samy Pessé
8c9cea2aaa Add test.js for insertTExtByKey 2016-10-26 12:19:57 +02:00
Samy Pessé
36d6d8eb3c Update selection in insertText operation 2016-10-26 12:15:28 +02:00
Samy Pesse
6d2b70c750 Fix merge in "docs/reference/models/transform.md" 2016-10-25 22:59:08 +02:00
Samy Pesse
a3905a8529 Adapt tests for unwrapInline 2016-10-25 22:50:47 +02:00
Samy Pesse
e873de519f Add options with normalize to unwrapBlockByKey and unwrapInlineByKey 2016-10-25 21:58:34 +02:00
Samy Pesse
4c9e138d04 Merge remote-tracking branch 'slate/master' into schema-normalize 2016-10-25 21:55:53 +02:00
Soreine
b2b4a4d565 Fix rule INLINE_VOID_TEXTS_AROUND
Added an additional test. Was working previously because the
normalization was called several times recursively.
2016-10-25 21:13:14 +02:00
Soreine
b7693213a0 No lint in npm run test. Lint is done on Travis 2016-10-25 21:13:14 +02:00
Samy Pessé
f380943926 Add transform "unwrapBlockByKey" and "unwrapInlineByKey" (#390)
* Add transform .unwrapInlineByKey with test and documentation

* Add transform .unwrapBlockByKey with test and documentation

* add failing test for unwrap limited to a range

* Improve creation of selection in unwrap[Inline|Block]ByKey

* Adapt unwrapInlineAtRange to take range in consideration

* Add test to unwrapInline only one in the document
2016-10-25 12:04:12 -07:00
Samy Pesse
5477754f63 Fix #397: resolve to leaf text in selection methods 2016-10-25 18:50:03 +02:00
Samy Pessé
0e32043315 Merge branch 'schema-normalize' of https://github.com/GitbookIO/slate into schema-normalize 2016-10-25 17:52:03 +02:00
Samy Pessé
c59ae7a544 Adapt transform deleteAtRange 2016-10-25 17:26:07 +02:00
Samy Pessé
11698bd6fc Merge branch 'pr393' into schema-normalize 2016-10-25 15:48:46 +02:00
Soreine
ce0a5579e7 Remove a most of unused vars 2016-10-25 13:12:10 +02:00
Soreine
e81708e82f Update eslint and add sensible rules (including important React rules) 2016-10-25 13:11:19 +02:00
Soreine
0bd52d35cd Don't normalize on insertText if selection is not expanded 2016-10-25 12:01:18 +02:00
Soreine
dc8a588e41 Optimize transforms by-key to lookup parent only if normalize 2016-10-25 11:56:35 +02:00
Soreine
1fde66b480 Increase benchmark min samples 2016-10-25 11:20:01 +02:00
Soreine
c4a9badb73 Prettier JSON output 2016-10-25 11:19:54 +02:00
Soreine
400d49ccb3 Add benchmark for text insertion 2016-10-25 10:49:45 +02:00
Samy Pessé
efaa5deae9 Merge branch 'schema-normalize-transforms' into schema-normalize 2016-10-25 10:36:17 +02:00
Soreine
4b3a51396c Merge branch 'master' into schema-normalize 2016-10-25 10:27:10 +02:00
Samy Pessé
c2c1fc9c9f Remove console logs in normalize transforms 2016-10-25 10:18:29 +02:00
Samy Pessé
218bb0c472 Don't normalize when schema has no normalization rules 2016-10-25 10:15:37 +02:00
Samy Pesse
b1cfc8be93 Merge branch 'schema-normalize-transforms' into schema-normalize 2016-10-25 00:07:45 +02:00
Nicolas Gaborit
f1a5d6f3b4 Add benchmarks (#368)
* Add script for benchmark

* Add error handling

* Rename folder to perf/benchmarks

* Add README

* Avoid memoization between benchmark runs

* Handle multiple benchmark. Add setup to benchmarks

* Run benchmarks through Travis

* Add command line options for JSON output

* Add export to JSON, and comparison with reference

* Improve serialize and fix results display

* Add perf/ to .npmignore

* Print error message

* Create normal example for normalize

* Add normalize-document wide and deep

* Add split-block normal, deep and wide

* Add delete-backward benchmarks

* Fix too much newlines

* Use microtime for better results maybe?

* Print number of runs

* Add minSamples options for better accuracy

* Use babel-node to launch benchmarks

* Use jsdom-global instead of mocha-jsdom (deprecated)

* Add rendering benchmark example

* Fix jsdom usage.

* Use JSX because we can

* Only use on('cycle') that is called even on error

* Example of successive rendering benchmark

* Rename README, and explain how to add a benchmark

* Add C++11 to Travis to install microtime

* Update Readme.md # Understanding the results

* Try to fix Travis build with microtime

* Travis: use before_install

Instead of overwriting install

* Forgot to remove mocha-jsdom import

Thanks node_modules...

* Add jsdom as devDependency

(required as peer dependency by jsdom-global)

* Add --only option to run only a specific benchmark

* Print name onStart rather than at end
2016-10-24 15:06:17 -07:00
Samy Pesse
b09e326426 Normalize selection after all transforms 2016-10-24 23:51:28 +02:00
Samy Pesse
9562845ca5 Add logging/timing for normalize calls 2016-10-24 23:38:08 +02:00
Samy Pesse
d6e57d297e Fix normalize calls after moveNodeByKey 2016-10-24 23:30:54 +02:00
Samy Pesse
684d51e4b6 Add another tests for removeTextByKey with inline 2016-10-24 23:23:13 +02:00
Samy Pesse
5ded81e335 Add transform normalizeParentsByKey 2016-10-24 23:16:26 +02:00
Samy Pesse
07de7bf596 Fix transform moveNodeByKey when container is the parent 2016-10-24 21:28:30 +02:00
Samy Pesse
ddf2221929 Fix transform "wrapTextAtRange" throwing JS error 2016-10-24 21:03:48 +02:00
Samy Pesse
c8f69a4f94 Remove useless code 2016-10-24 19:59:02 +02:00
Samy Pessé
ee62f3c339 Merge branch 'schema-normalize-transforms' of https://github.com/GitbookIO/slate into schema-normalize-transforms 2016-10-24 18:32:31 +02:00
Samy Pessé
cdc2d6d4ea Add option normalize on AtRange transforms 2016-10-24 18:30:24 +02:00
Soreine
b64681aae0 Fix rule INLINE_NO_EMPTY to act on parent block 2016-10-24 17:26:19 +02:00
Soreine
25909b7867 Remove unreachable code 2016-10-24 16:22:12 +02:00
Samy Pessé
b122a2a464 Use ByKey instead of NodeOperation in wrapBlockAtRange 2016-10-24 12:56:29 +02:00
Samy Pesse
c7f0c655ab Add normalize nodes to transforms bykey 2016-10-24 09:33:58 +02:00
Samy Pesse
1377e28bcb Don't normalize when applying transforms 2016-10-24 00:22:21 +02:00
Samy Pesse
4f1fc842a8 Fix inline void inside an inline node 2016-10-23 23:53:01 +02:00
Samy Pesse
4d0f067250 Add failing test for schema rule 2016-10-23 23:08:01 +02:00
Samy Pesse
1689e6408a Fix stupid error in recursive normalize calls 2016-10-23 01:12:44 +02:00
Samy Pesse
d2850870e3 Don't call onBeforeChange when emitting new state 2016-10-22 20:58:02 +02:00