Seems a good idea, can we have it far right though.
Also as we are discussing this modal is there a way to define which view you see by default, I prefer the JSON view.
Yes, better to have "compact" / "formatted" radio buttons visible all the time.
Since there is a JSON tab, it "feels" as if I have to be looking at the JSON in order to export as JSON.
But what is the value in this JSON tab? I doubt if anyone ever needs to look at it except to find the "compact" button.
So how about dispensing with the JSON tab entirely?
Still perfectly clear what I'm exporting. In fact it's clearer; no possible thought of two alternate export formats, JSON on the JSON tab, something unknown on the Nodes tab.
Without the JSON, the whole dialog could be made narrower too.
Edit: @dceejay posted while I was redrawing that picture...
But what do you actually use the JSON tab for, beyond clicking "compact"?
Still, is Export the right place for that or should double clicking on an unknown node popup an equivalent JSON view rather than the current unknown node popup?
Not NR but wouldn't it be nice if when you posted a flow in the forum it was automatically compressed. If moving the export format buttons is added, we will still see people (who haven't updated to the latest version) pasting uncompressed flows...sigh!
I have updated the above, but slightly changed the feature (easier to remember/restore than provide an option). If there is a real push for making that an option, then I would put it out of scope for this.
Also, can "compact" be made the default if it isn't already? I only ever use formatted when creating examples to include in with my nodes so fairly rarely.
When moving stuff between machines, I don't use/need the JSON option. compact or formatted doesn't really matter.
I am moving it from one machine to another.
But when people ask for help and I post code, the JSON tab comes in handy.
And here is the IF:
If it is a big flow the compact is the way to go.
But if it is a basic flow with maybe 1 or 2 nodes the formatted helps (from the receiver's point of view IMO) that they can see what they are getting easier.
Rather than having to import it paste it, open the nodes and look at the code.
(Yeah, I'm talking about function nodes specifically)
And always having to go to the JSON tab and select either the compact or formatted is annoying.
(Sod's law that what ever I have as default: I want the other)