Claus Ibsen created CAMEL-26353:
-----------------------------------

             Summary: camel-diagram - zoom levels for a route diagram image, as 
in the diagram of the Camel CLI
                 Key: CAMEL-26353
                 URL: https://issues.apache.org/jira/browse/CAMEL-26353
             Project: Camel
          Issue Type: Improvement
          Components: camel-jbang, camel-diagram
            Reporter: Claus Ibsen
             Fix For: 4.24.0


The PNG of a route diagram (camel cmd route-diagram, the 
camel_render_route_diagram MCP tool, the route-diagram developer console with 
format=png) draws each step as a card with an icon, its kind and its detail 
(CAMEL-26348). A card is taller than the old box, so a large route makes a tall 
image, and it reaches the size limit of an image (16384 pixels) sooner, where 
the command says to narrow the routes with --filter.

The diagram of the Camel CLI in the terminal (camel tui, the Diagram tab) has 
zoom levels for this, see "Zoom and Folding" in 
docs/user-manual/modules/ROOT/pages/camel-jbang-tui-diagram.adoc, and 
RouteDensity / RouteDiagramZoom in camel-jbang-plugin-tui:

* detailed: a box per step, with up to three lines of text
* compact: a box per step with one line of text, the steps closer together 
(about twice as many steps fit)
* bare: no boxes, each step a mark and its text on one row, the branches side 
by side
* overview: each step a cell in the colour of its EIP, to see the shape of a 
large route
* fit: the most detailed level in which the whole route fits

Add the same levels to the image, for example camel cmd route-diagram 
--zoom=detailed|compact|bare|overview|fit: detailed is the card of today, 
compact a card of one line (the kind and its detail on one line, a smaller 
icon), bare a mark and its text, overview cells. Fit picks the most detailed 
level whose image is not taller than a given height (or the size limit). The 
same option for the MCP tool, and a zoom query parameter for the route-diagram 
developer console.

What each level keeps of the body types on the arrows (CAMEL-26351) and the 
problems of the steps (CAMEL-26352): at compact the labels and callouts as they 
are; at bare and overview the warning marks, with the problems in the numbered 
list below the route.

The ASCII and Unicode diagrams could take the same levels later.

_Filed by Claude Code on behalf of davsclaus_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to