feat(DocItem): Add comments field for linking annotations to document…#465
Merged
PeterStaar-IBM merged 5 commits intodocling-project:mainfrom Jan 8, 2026
Conversation
… items Implements support for linking comments (from Word/PPT documents) to their annotated content using the established FloatingItem/RefItem pattern. Changes: - Add `comments: List[RefItem]` field to DocItem class - Update `_update_breadth_first_with_lookup()` to handle comment references on deletion - Bump CURRENT_VERSION to 1.9.0 - Fix version comparison bug (string vs integer for minor version) - Add 4 new tests for comments functionality - Update test data files for new schema Closes: docling-project/docling#464 Related: docling-project/docling#2834 Signed-off-by: s1v4-d <[email protected]>
Contributor
|
✅ DCO Check Passed Thanks @s1v4-d, all your commits are properly signed off. 🎉 |
Merge ProtectionsYour pull request matches the following merge protections and will not be merged until they are valid. 🟢 Enforce conventional commitWonderful, this rule succeeded.Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
🟢 Require two reviewer for test updatesWonderful, this rule succeeded.When test data is updated, we require two reviewers
|
Merged
3 tasks
Signed-off-by: Panos Vagenas <[email protected]>
Signed-off-by: Panos Vagenas <[email protected]>
Signed-off-by: Panos Vagenas <[email protected]>
Signed-off-by: Panos Vagenas <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
vagenas
approved these changes
Jan 7, 2026
Member
vagenas
left a comment
There was a problem hiding this comment.
Added couple improvements:
- introduced fine-granular references (
FineRef) including span ranges - extended API with
add_comment()operation encapsulating all relevant labels etc. - improved serialization to suppress empty
.commentslists (most common case)
cau-git
approved these changes
Jan 7, 2026
PeterStaar-IBM
approved these changes
Jan 7, 2026
ryyhan
pushed a commit
to ryyhan/docling-core
that referenced
this pull request
Jan 8, 2026
docling-project#465) * feat(DocItem): Add comments field for linking annotations to document items Implements support for linking comments (from Word/PPT documents) to their annotated content using the established FloatingItem/RefItem pattern. Changes: - Add `comments: List[RefItem]` field to DocItem class - Update `_update_breadth_first_with_lookup()` to handle comment references on deletion - Bump CURRENT_VERSION to 1.9.0 - Fix version comparison bug (string vs integer for minor version) - Add 4 new tests for comments functionality - Update test data files for new schema Closes: docling-project/docling#464 Related: docling-project/docling#2834 Signed-off-by: s1v4-d <[email protected]> * improve comment Pydantic serialization Signed-off-by: Panos Vagenas <[email protected]> * add add_comment, update tests Signed-off-by: Panos Vagenas <[email protected]> * introduce fine-granular references with span ranges Signed-off-by: Panos Vagenas <[email protected]> * simplify last test Signed-off-by: Panos Vagenas <[email protected]> --------- Signed-off-by: s1v4-d <[email protected]> Signed-off-by: Panos Vagenas <[email protected]> Co-authored-by: Panos Vagenas <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
… items
Implements support for linking comments (from Word/PPT documents) to their annotated content using the established FloatingItem/RefItem pattern.
Changes:
comments: List[RefItem]field to DocItem class_update_breadth_first_with_lookup()to handle comment references on deletionCloses: docling-project/docling#464
Related: docling-project/docling#2834