-
-
Notifications
You must be signed in to change notification settings - Fork 15
!!![TASK] Restructure Menu handling #799
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
Conversation
f6d5736
to
1a6cc43
Compare
1a6cc43
to
9133d26
Compare
@wouterj does this also solve your issue with toctrees with maxdepth without titlesonly? |
6cda9a6
to
0e654c1
Compare
0e654c1
to
4211db1
Compare
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.
Thanks a lot for this massive improvement. I added a number of comments to improve the code a bit. In general this looks very good!
...ides/src/Compiler/NodeTransformers/MenuNodeTransformers/AbstractMenuEntryNodeTransformer.php
Outdated
Show resolved
Hide resolved
...ides/src/Compiler/NodeTransformers/MenuNodeTransformers/AbstractMenuEntryNodeTransformer.php
Outdated
Show resolved
Hide resolved
...ides/src/Compiler/NodeTransformers/MenuNodeTransformers/AbstractMenuEntryNodeTransformer.php
Outdated
Show resolved
Hide resolved
...ides/src/Compiler/NodeTransformers/MenuNodeTransformers/AbstractMenuEntryNodeTransformer.php
Outdated
Show resolved
Hide resolved
...s/guides/src/Compiler/NodeTransformers/MenuNodeTransformers/GlobMenuEntryNodeTransformer.php
Outdated
Show resolved
Hide resolved
$documentEntryInToc->setParent($compilerContext->getDocumentNode()->getDocumentEntry()); | ||
$compilerContext->getDocumentNode()->getDocumentEntry()->addChild($documentEntryInToc); |
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.
Would it make sense to move the addChild call to the setParent method in the DocumentEntry class?
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.
document entries know nothing about the document node
...ides/src/Compiler/NodeTransformers/MenuNodeTransformers/AbstractMenuEntryNodeTransformer.php
Outdated
Show resolved
Hide resolved
...ides/src/Compiler/NodeTransformers/MenuNodeTransformers/ContentsMenuEntryNodeTransformer.php
Show resolved
Hide resolved
...s/guides/src/Compiler/NodeTransformers/MenuNodeTransformers/GlobMenuEntryNodeTransformer.php
Outdated
Show resolved
Hide resolved
...ides/src/Compiler/NodeTransformers/MenuNodeTransformers/InternalMenuEntryNodeTransformer.php
Outdated
Show resolved
Hide resolved
…mers/AbstractMenuEntryNodeTransformer.php Co-authored-by: Jaap van Otterdijk <jaap@ijaap.nl>
…mers/AbstractMenuEntryNodeTransformer.php Co-authored-by: Jaap van Otterdijk <jaap@ijaap.nl>
…mers/AbstractMenuEntryNodeTransformer.php Co-authored-by: Jaap van Otterdijk <jaap@ijaap.nl>
…mers/AbstractMenuEntryNodeTransformer.php Co-authored-by: Jaap van Otterdijk <jaap@ijaap.nl>
@jaapio, there are a few open conversation where I asked for explanaitions, the rest is finished |
The results look great, thanks for this effort Lina! Just tested this PR in my test repository and the maxdepth seems 100% correct now! I've found one minor error since this PR: the |
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.
This works as is, other comments are picked up in flow up items.
Since #799 an exception was thrown
Depends on #798