Repository navigation
Add fpp-diagram-render: CLI that renders FPP diagrams to SVG - #3
Open
devin-ai-integration[bot] wants to merge 1 commit into
Open
devin-ai-integration[bot] wants to merge 1 commit into
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
A Node command line (editors/code/cli) that produces the component, topology, and connection-group diagrams of the VS Code panel as standalone SVG, from the same pipeline: fpp-diagram --format sprotty for lowering, the extension's FppLayoutEngine/FppDiagramConfig for ELK layout, and the webview shapes and stylesheet for drawing. Label sizes are estimated from Helvetica metrics in place of the webview's DOM measurement. Multiple .fpp inputs are accepted; include directives are inlined relative to each file so a whole source tree can be passed. Additive only: new cli/ sources and tsconfig, a fourth webpack bundle (dist/fpp-diagram-render.js), a smoke test with fixtures, and package.json scripts (compile:cli, render, test:render). Existing Rust and TypeScript are unchanged. Co-authored-by: Michael Starch <LeStarch@googlemail.com>
Author
|
I'll fix CI failures and address comments from users with write access that start with 'Devin'.
Original prompt from michael.d.starch
|
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
fpp-diagramalready lowers a component/topology to a sprottySGraph(--kind component --format sprotty), but the picture only ever existed inside the VS Code webview. This adds a Node CLI,editors/code/cli/→dist/fpp-diagram-render.js, that runs the rest of the panel's pipeline headlessly and writes standalone SVG:node dist/fpp-diagram-render.js --name Svc.CommandDispatcher -o CommandDispatcher.svg \ $FPRIME/cmake/platform/unix/Platform/PlatformTypes.fpp $(find $FPRIME/{Fpp,Fw,Svc,Drv,Os,Utils,default/config} -name '*.fpp').fppinputs;include "..."is inlined relative to each file (fpp-diagramreads one translation unit).--kind component|topology|connectionGroup,--hide-unused-ports,--theme dark|light,--json(layout a saved SGraph),--fpp-diagram(binary override; defaults totarget/{release,debug}orPATH).cli/sources + tsconfig, a fourth webpack bundle,test/smoke-render.js+ fixtures,package.jsonscripts (compile:cli,render,test:render;testchains them). No existing Rust/TS modified..vscodeignorealready excludescli/andtest/from the VSIX;dist/fpp-diagram-render.jsis included.Svc.CommandDispatcherfrom nasa/fprime64e4426d33, rasterized from the SVG with headless Chrome:Link to Devin session: https://nasa-jpl-demo.devinenterprise.com/sessions/391b811d1ebf411bbe5d407d04cb5cb8
Open in Devin Desktop: https://nasa-jpl-demo.devinenterprise.com/desktop/session/391b811d1ebf411bbe5d407d04cb5cb8?variant=devin