Implement BlockInlineRenderable for block and inline element composition#55
Merged
LittleLittleCloud merged 7 commits intomainfrom Oct 24, 2025
Merged
Conversation
Co-authored-by: LittleLittleCloud <16876986+LittleLittleCloud@users.noreply.github.com>
Co-authored-by: LittleLittleCloud <16876986+LittleLittleCloud@users.noreply.github.com>
Co-authored-by: LittleLittleCloud <16876986+LittleLittleCloud@users.noreply.github.com>
Co-authored-by: LittleLittleCloud <16876986+LittleLittleCloud@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Implement IRenderable for block element
Implement BlockInlineRenderable for block and inline element composition
Oct 24, 2025
…FlowElementTranslator
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.
Overview
This PR implements a new
IRenderablefor RazorConsole that properly handles the composition of block-level and inline-level elements, addressing issue #[issue_number].Problem
Previously, RazorConsole lacked a way to distinguish between:
<div>,<p>,<panel>)<span>,<strong>,<em>)This made it difficult to create rich, flowing content that mixed different display types, similar to HTML's block and inline model.
Solution
Core Implementation
BlockInlineRenderable - A new
IRenderablethat intelligently groups and renders items based on their display type:Output:
Example Translator
FlowElementTranslator demonstrates practical usage by enabling mixed content in Razor components:
Key Features
data-display="block|inline"attributePanel,Table, etc.Testing
BlockInlineRenderableFlowElementTranslatorFiles Changed
New Components:
src/RazorConsole.Core/Renderables/BlockInlineRenderable.cs- Core renderable implementationsrc/RazorConsole.Core/Vdom/Translators/FlowElementTranslator.cs- Example translatorsrc/RazorConsole.Gallery/Components/BlockInlineGallery.razor- Interactive demoTests:
src/RazorConsole.Tests/Renderables/BlockInlineRenderableTests.cssrc/RazorConsole.Tests/Vdom/FlowElementTranslatorTests.csDocumentation:
design-doc/block-inline-renderable.md- Detailed usage guideIMPLEMENTATION_SUMMARY.md- Implementation overviewModified:
src/RazorConsole.Core/Vdom/VdomSpectreTranslator.cs- Registered FlowElementTranslatorsrc/RazorConsole.Gallery/Components/App.razor- Added gallery navigationVisual Examples
Multiple inline elements:
Mixed content:
Complex mixing with panels:
Breaking Changes
None - this is a purely additive feature that doesn't modify existing behavior.
Future Enhancements
Potential improvements for future iterations:
Original prompt
Fixes #54
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.