This is what I get on chrome, with a Google pixel 6 phone running Android 16.
As you can see, there is only half showing, and I'm scrolling as far as it goes.
If I zoom in one more step, it disappears completely.
That would not be wise (grid is 8000x8000 even if there are no nodes on the lower part) and yes, with some calcs, we could recompute the grid and trim it to encompass the bounds of x-min/y-min ~ x-max/y-max, however the same problem exists if there are nodes at x0,y0 and x7950,y7950.
And if we scaled it so as not to be offensively large on you page (as the 400px hight it has in the forum today), the nodes would be about 8px wide, 2px high.
I am certain there are a whole bundle of ways it can be improved but as is stands, it is a blend of finding the x-min/y-min, zooming to a sensible scale so as to encompass as many nodes in the shared flow as possible while still being legible. Access to other nodes in the flow is via scroll bars.
True, this is a edge case though, but as jbudd said he would prefer that view, myself I would prefer the option to disable this feature altogether, for my own selfess reasons. I would prefer a button icon to toggle a single line flow.json to a prettified json (word wrapped) and to a flows.json image.
Was there any discussion of this feature prior to implementation, as I seem to have missed it.
Undoubtedly a vanishingly rare occurrence, but if a flow did contain such far-apart nodes, the strange appearance would serve as a warning that all is not well.
On the other hand, if the view generated of such a flow ignored the outlying nodes, the forum might seem to be accidentally assisting deception.
Yes please
Actually it needs just sufficient headroom so that the 'expand image' button displayed on phones does not overlay the bottom right nodes.
A simple snippet
More complex
More complex still
However I do recognise that some folks like widely spaced nodes and long swooping wires, which might give a poor result.
Could u add the mini map? It would help people find where the nodes are.
Mini map is of-course possible. Raise a FR issue so it is not forgotten.
Any thoughts about the gif video I posted above?
Sorry Paul, I meant to say, this is what I (attempted) described before...
Created
I can understand why. Scrolling large blocks is a pain and sometimes you actually want the JSON pretty formatted (to see look for obvious issues).
Here is a preview of something I am working on. Its not exactly what you desire, but its a start.
I actually did add a "re-formatting" button to the toolbar (to collapse/expand the JSON) but I dont know what options we have in the discourse forum for storing preferences. Ultimately, it didn't make a lot of sense to have the formatting button since the flow renderer only renders if good JSON is posted and, if you actually want to view the JSON source, it is unlikely you want it all on one line (since the one-liner is typically to be less intrusive / to minimising scrolling in the forum)
Exactly my thought. Unobtrusive one line json could be expanded and again to then see image for layout, without having to copy and import. Then the flows tag would not be required. Also you could copy parts of the json, which is impossible from an image.
If we are stuck with the image, could we have the icon buttons top left as in flow json original layout.