mark icon indicating copy to clipboard operation
mark copied to clipboard

Support for Folders

Open klauern opened this issue 4 months ago • 9 comments

📁 Add support for Confluence Folders

Implements support for the new Confluence Folders feature announced by Atlassian, allowing better organization of wiki content through folder hierarchies.

🎯 Problem Solved

Resolves #539 - Users requested the ability to organize Confluence pages using the new Folders feature instead of relying solely on parent pages.

🚀 What's New

  • Folder Metadata Support: New <!-- Folder: --> header syntax for specifying folder hierarchies
  • Mixed Hierarchies: Support for combining folders and parent pages in the same structure
  • Auto-Creation: Folders are automatically created if they don't exist (similar to parent pages)
  • API Integration: Full integration with Confluence v2 REST API for folder operations

📖 Usage Example

<!-- Space: DOCS -->
<!-- Folder: Team A -->
<!-- Folder: Projects -->
<!-- Folder: 2024 -->
<!-- Title: Project Alpha -->
<!-- Parent: Meeting Notes -->

# Project Alpha

This page will be created under: Space DOCS → Team A → Projects → 2024 → Meeting Notes → Project Alpha

🔧 Implementation Details

  • Core Features:

    • Parse <!-- Folder: --> metadata headers
    • Create folder hierarchies using Confluence v2 API
    • Resolve folder/page parent relationships
    • Maintain backward compatibility with existing <!-- Parent: --> syntax
  • API Methods Added:

    • CreateFolder(spaceID, title, parentID)
    • FindFolder(spaceID, title)
    • GetFolderByID(folderID)
    • GetSpaceID(spaceKey)
  • Test Coverage: Comprehensive test suite covering folder parsing, hierarchy creation, and mixed folder/parent scenarios

CI Status

All CI checks are passing:

  • Unit Tests: ✅ Enhanced with flexible rendering comparisons for cross-platform compatibility
  • Build & Docker: ✅ Clean builds with no issues
  • Linting: ✅ Go and Markdown linting pass
  • Test Infrastructure: Improved D2/Mermaid test reliability in CI environments

🔄 Backward Compatibility

Fully backward compatible - existing <!-- Parent: --> functionality remains unchanged. Folders and parents can be mixed in the same hierarchy.

klauern avatar Aug 27 '25 22:08 klauern

Is this feature ready for merging? Just curious. :D

trantor avatar Sep 30 '25 06:09 trantor

Whats the status of it? want to try

timurdavidenko avatar Oct 21 '25 14:10 timurdavidenko

Hello @klauern! I was curious anything else needed to be done before this got merged?

hskarlupka avatar Oct 31 '25 17:10 hskarlupka

Hey there @hskarlupka! I don't think there's anything blocking at this moment. I did have to rebase off of master some conflicts, but those have been fixed. I have used this internally but not recently.

klauern avatar Nov 07 '25 18:11 klauern

Our team would also love to use this feature, @mrueg do you think you could re-review when you get a spare moment?

prpercival avatar Nov 14 '25 17:11 prpercival

@klauern Thank you for taking care of this feature enhancement. Our team would like to leverage the folder feature. Can you please spare some time to merge this PR?

going2thecloud avatar Nov 21 '25 19:11 going2thecloud

@klauern thanks for your PR!

I was reviewing the discussion and just wanted to highlight something that might have gone unnoticed: @mrueg requested removing a change in the tests, maybe this is blocking the merging of this valuable PR.

Would you mind updating the PR according to that feedback when you have a moment?


EDIT: sorry, I just noticed you’ve already addressed this in https://github.com/kovetskiy/mark/pull/649/commits/f18e3e42aafeabbd3d5bad7e00fb6f3ea0d04a65.

Thanks again! I hope this change gets released soon.

bruno-arruda-rpe avatar Nov 24 '25 17:11 bruno-arruda-rpe

@klauern thanks for your PR!

I was reviewing the discussion and just wanted to highlight something that might have gone unnoticed: @mrueg requested removing a change in the tests, maybe this is blocking the merging of this valuable PR.

Would you mind updating the PR according to that feedback when you have a moment?

EDIT: sorry, I just noticed you’ve already addressed this in f18e3e4.

Thanks again! I hope this change gets released soon.

Although I welcome new features for this tool, I unfortunately lack the time to review larger features currently. It would give me more confidence if I see reports of users that tested the feature sucessfully in confluence datacenter as well as cloud (I can only test with a confluence instance that doesn't support folders yet).

mrueg avatar Nov 25 '25 21:11 mrueg

This would be a great addition

matty avatar Dec 05 '25 17:12 matty