Skip to content
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

Confluence comments are lost on page update #200

Open
feliksik opened this issue Jul 18, 2024 · 1 comment
Open

Confluence comments are lost on page update #200

feliksik opened this issue Jul 18, 2024 · 1 comment

Comments

@feliksik
Copy link

feliksik commented Jul 18, 2024

When inline comments are used on a page, they are lost when the page is updated. I'm using editor v1 (as it offers more features w.r.t. HTML macros etc) on Confluence Cloud.

This is super-unfortunate.

I see that the comments are stored in the page XML as follows:

        <p>Page contents like normal go here and there is a comment on 
        <ac:inline-comment-marker ac:ref="87342740-a564-38af-a337-4fd80eb5612b">this particular text</ac:inline-comment-marker>, that we want to preserve</p>
        <p>This should be feasible</p>

I think it should be feasible to do this, as follows:

  • render the page from source to Confluence Storage Format XML using the current text2confl mechanisms.
  • fetch the current XML from Confluence, and detect whether it contains any comments; potentially with a feature flag.
  • somehow merge the comments into the new XML. Tricky.
  • upload the updated XML. I tested this, and the comments are preserved.

The only tricky part is obviously merging the comments. It would require some sophistication that I'm personally not experienced with, so it'd require more research for me; But I think it's doable and would be easily isolated.

@feliksik
Copy link
Author

It would be extra nice (and even an improvement over regular confluence) if we would never drop any comments, but always preserve all of them, even if we would have to reinsert them at some guesswork-based location in the body as

        <ac:inline-comment-marker ac:ref="87342740-a564-38af-a337-4fd80eb5612b">(text was deleted)</ac:inline-comment-marker>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant