-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In OpAddAnnotation support annotated ranges with 0 length #879
Conversation
Build succeeded. |
@@ -6,6 +6,14 @@ | |||
|
|||
* Fix breaking all empty annotations on merging the paragraph they are contained in with the one before ([#877](https://github.com/kogmbh/WebODF/pull/877))) | |||
|
|||
### Improvements | |||
|
|||
* In OpAddAnnotation support annotated ranges with 0 length (WARNING: NON-BACKWARD COMPATIBLE spec change) ([#879](https://github.com/kogmbh/WebODF/pull/879))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Usual terminology for this is a "breaking change" (in case you weren't aware)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Never heard before, thanks for the hint. Suspect that is MS lingo, so that could be why ;)
Still, seems it is quite in use and also a short term, so happy to use it.
Hm, wondering if that should be a separate section even, and not just a inline comment. Guess it should.
A simple enough change... makes good sense to me. Please |
bed99be
to
1d24d46
Compare
Before 0 length was assumed to be an annotation without a range
Build succeeded. |
🍪s for the review, @peitschie Hm, out of rockets, so taking the 🚢 |
In OpAddAnnotation support annotated ranges with 0 length
ODF has the concept of annotations with and without a range (either there is an
<annotation-end>
element or not). One could argue that an annotation with a range 0 (thus no content between start tag and end tag) has the same semantics as an annotation without an end tag.Just, as a matter of fact currently the editing ops make a difference between both. And currently it is also not supported to change an annotation to be either range-less or ranged. So when removing all content between start and end tag, an annotation still stays ranged.
Ideally that would get a proper solution one day...
In the meantime, while pondering with OT for the annotation ops, I found it would be needed to have the AddAnnotation op to also support annotated ranges of length 0, and not just to assume a parameter of length=0 means unranged annotation.
So it makes the op match the full set of possibilities with ranged annotations. And it helps with OT for annotation ops :)
Non-backward compatible spec change (due to change of meaning of length=0).