RE: Algorithms for Editing Operations

Tcs?

I agree that creating tests is a great idea! I would love to have help on that. Any ideas for a good framework we can use for testing? Or do we need to create one from scratch?

I think we should define some general algorithms as we write tests. That will give us guidance on ‘expected’. We can adapt the spec and the tests as needed.

From: Frederico Knabben [mailto:f.knabben@cksource.com]
Sent: Friday, November 7, 2014 4:06 AM
To: Piotr Koszuliński
Cc: chaals@yandex-team.ru; Ben Peters; public-editing-tf@w3.org
Subject: Re: Algorithms for Editing Operations

There is no easier approach for this than working on tcs. Don’t you guys think that this could be handled by unit tests? There could be a clear test API that includes HTML+SelectionBefore -> Command -> HTML+SelectionAfter. We’ve been using something similar in CKEditor with success.

Ben already listed the commands that should be covered, so it would be a matter of splitting their tests, including all cases that the spec wants to cover. It would also make it easier for us to discuss over edge cases.

On top of this, algorithms can be designed and spec'ed.

To discuss:

 - Does this make sense?
 - To do this, before anything else, the test platform must be coded and published on GitHub. How? Who? Where?
 - Is this an acceptable approach in the spec definition workflow?

--
Frederico Knabben
CKEditor Project Lead and CKSource Owner


On Friday, 7 November 2014 at 09:04, Piotr Koszuliński wrote:
I absolutely agree too. I had a pleasure to implement some of the algorithms you're referring to or maintain a code implementing them so I can imagine the scale of the problem. I'm sure that designing algorithms and creating tests for them which would include more complex scenarios is, besides a huge amount of work, a road to nowhere, because there are so many possible behaviours that there will always be a significant group of people dissatisfied with the results.

Furthermore, there's no popular standard which we could follow while designing these algorithms. The popular editors like MSWord or Google Docs are not HTML editors and the content they create is not meant to be a semantic HTML, so many solutions cannot be adopted by us and sticking too closely to them would lead to inconsistency or overcomplicating things and creating a bad markup. Therefore, in my opinion, our goal should to produce as simple and as semantic markup as possible.

On Fri, Nov 7, 2014 at 2:20 AM, <chaals@yandex-team.ru<mailto:chaals@yandex-team.ru>> wrote:

Abserlutely!!!

Seriously, I think we should ask the browser to handle the things that really are clear, but wherever we find ambiguity we punt to the app.

Which is exactly what I think you propose.

cheers

07.11.2014, 01:09, "Ben Peters" <Ben.Peters@microsoft.com<mailto:Ben.Peters@microsoft.com>>:
> I have begun to research algorithms for editing, including insert text, insert content, delete content, insert newline, and replace content. I believe our goal should be to have consistent behavior that is reasonable and simple. In order to make it lightweight and easy to agree on, I think it should have very few heuristics and should instead rely on well-defined simplicity. This will result in imperfect, but consistent behavior. Frameworks and sites can implement their own complex heuristics or custom behavior using Intention Events. Thoughts?
>
> Ben

--
Charles McCathie Nevile - web standards - CTO Office, Yandex
chaals@yandex-team.ru<mailto:chaals@yandex-team.ru> - - - Find more at http://yandex.com




--
Piotrek Koszuliński
CKEditor JavaScript Lead Developer

Received on Friday, 7 November 2014 17:39:40 UTC