fix: include nested callout content in html export#8738
Open
mturac wants to merge 1 commit into
Open
Conversation
|
|
Contributor
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR updates the HTML export logic for callout blocks so that nested child blocks are included inside the tag, and adds a new nested callout fixture wired into the existing parser HTML export tests.Sequence diagram for updated callout HTML export with nested childrensequenceDiagram
participant NestedBlock
participant html_buffer as html
participant convert_nested_block_children_to_html
NestedBlock->>html_buffer: push_str(format!("<{}>{}{}", ASIDE_TAG_NAME, data.get_plain_text(), text_html))
NestedBlock->>convert_nested_block_children_to_html: convert_nested_block_children_to_html(Arc::new(self.to_owned()))
convert_nested_block_children_to_html-->>NestedBlock: nested_children_html
NestedBlock->>html_buffer: push_str(&nested_children_html)
NestedBlock->>html_buffer: push_str(format!("</{}>", ASIDE_TAG_NAME))
File-Level Changes
Assessment against linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The new
callout_nestedfixtures for JSON and text are currently empty files in the diff; if the test harness expects non-empty fixture content, consider populating them to avoid brittle or misleading test behavior. - In the
CALLOUTbranch,convert_nested_block_children_to_html(Arc::new(self.to_owned()))introduces an extra allocation and clone; if possible, adjustconvert_nested_block_children_to_htmlto accept&NestedBlock(or reuse an existingArc) to avoid this overhead.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The new `callout_nested` fixtures for JSON and text are currently empty files in the diff; if the test harness expects non-empty fixture content, consider populating them to avoid brittle or misleading test behavior.
- In the `CALLOUT` branch, `convert_nested_block_children_to_html(Arc::new(self.to_owned()))` introduces an extra allocation and clone; if possible, adjust `convert_nested_block_children_to_html` to accept `&NestedBlock` (or reuse an existing `Arc`) to avoid this overhead.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
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.
Summary
Fixes #6537
Testing
Attempted but blocked locally:
The test build reached crate compilation but this fresh checkout is missing generated protobuf modules such as flowy-error/src/protobuf.rs, causing flowy-error to fail before the parser test target could run.
Summary by Sourcery
Ensure HTML export for callout blocks includes nested child content and add coverage for nested callout rendering.
Bug Fixes:
Tests: