# Move export format buttons to be more accessible

**URL:** https://discourse.nodered.org/t/move-export-format-buttons-to-be-more-accessible/88426
**Category:** Core Development
**Created:** [1 June 2024 08:28 UTC](https://discourse.nodered.org/t/move-export-format-buttons-to-be-more-accessible/88426 "2024-06-01T08:28:38Z")
**Posts on this page:** 19
**Page:** 1

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [1 June 2024 08:28 UTC](https://discourse.nodered.org/t/move-export-format-buttons-to-be-more-accessible/88426/1 "2024-06-01T08:28:38Z")

</div>

### Issue

When users export flows in long form to the forum, we often request they use the compact form. Then there is the inevitable "how do I do that"

### Suggestion

Move the export format options (currently hidden under the JSON tab) to the top level of the dialog.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/c/4c0c1e877c58bfa0925dd1cdfe68187158910f30.png)

Thoughts? Agree? Disagree? Variations?

---

<div class="post-metadata">

### Author: ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)
#### Post date: [1 June 2024 08:37 UTC](https://discourse.nodered.org/t/move-export-format-buttons-to-be-more-accessible/88426/2 "2024-06-01T08:37:53Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)
#### Post date: [1 June 2024 08:39 UTC](https://discourse.nodered.org/t/move-export-format-buttons-to-be-more-accessible/88426/3 "2024-06-01T08:39:08Z")

</div>

Sounds like a good idea and would make the options more obvious.  
Also agree about positioning the options at far right.

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [1 June 2024 09:00 UTC](https://discourse.nodered.org/t/move-export-format-buttons-to-be-more-accessible/88426/4 "2024-06-01T09:00:45Z")

</div>

I agree, should be far right. Also agree re JSON. I never use the nodes view.

---

<div class="post-metadata">

### Author: ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)
#### Post date: [1 June 2024 09:17 UTC](https://discourse.nodered.org/t/move-export-format-buttons-to-be-more-accessible/88426/5 "2024-06-01T09:17:14Z")

</div>

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?

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/c/9ca4b37e22060dff8bf67b47a64e3e729f6d0038.png)

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...

> [@dceejay](#):
>
> I never use the nodes view.

But what do you actually use the JSON tab for, beyond clicking "compact"?

---

<div class="post-metadata">

### Author: ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)
#### Post date: [1 June 2024 09:29 UTC](https://discourse.nodered.org/t/move-export-format-buttons-to-be-more-accessible/88426/6 "2024-06-01T09:29:05Z")

</div>

> [@jbudd](#):
>
> actually use the JSON tab for, beyond clicking "compact"?

I often use it to look at configs of non installed contrib nodes.

[edit]  
I never use it to click compact, as that is my user defined default in setting.js.

Not asking to remove node view, or set the system default view. Just would like a user defined default view.

---

<div class="post-metadata">

### Author: ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)
#### Post date: [1 June 2024 09:36 UTC](https://discourse.nodered.org/t/move-export-format-buttons-to-be-more-accessible/88426/7 "2024-06-01T09:36:21Z")

</div>

Oh, I didn't know you could do that, very handy!

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?

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/d/0dd3f04258f30d60a8e381856a3d74541ec65ad1.png)

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [1 June 2024 10:05 UTC](https://discourse.nodered.org/t/move-export-format-buttons-to-be-more-accessible/88426/8 "2024-06-01T10:05:05Z")

</div>

> [@jbudd](#):
>
> use the JSON tab for, beyond clicking "compact"?

Now I think about it, that is indeed the main reason I use the json tab 🙂

---

<div class="post-metadata">

### Author: ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)
#### Post date: [1 June 2024 10:39 UTC](https://discourse.nodered.org/t/move-export-format-buttons-to-be-more-accessible/88426/9 "2024-06-01T10:39:22Z")

</div>

I'm all for compact being the default!

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!

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [1 June 2024 11:04 UTC](https://discourse.nodered.org/t/move-export-format-buttons-to-be-more-accessible/88426/10 "2024-06-01T11:04:08Z")

</div>

1. Seeing 100% support for moving the buttons to the main dialog (preference is top-right) ✅
2. Seeing suggestions about removing the JSON tab - I dont have an opinion other than I think that should be a separate issue/task ❕
3. Seeing request for "compact" to be the default - I personally agree but will wait and see if we get any more comments (for or against) ⏲
4. Remember users choice of which view they used last time (Export Nodes / JSON)
  - Happy to put this in scope along side agreed item No1 ✅

---

<div class="post-metadata">

### Author: ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)
#### Post date: [1 June 2024 11:29 UTC](https://discourse.nodered.org/t/move-export-format-buttons-to-be-more-accessible/88426/11 "2024-06-01T11:29:25Z")

</div>

> [@Steve-Mcl](#):
>
> - Seeing suggestions about removing the JSON tab - I dont have an opinion other than I think that should be a separate issue/task ❕

Seeing one suggestion to remove it, I for one use this view a lot and would miss it if removed.

You seem to have missed the one suggest to allow it to have user defined default view. Which also may be a separate issue/task.

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [1 June 2024 11:36 UTC](https://discourse.nodered.org/t/move-export-format-buttons-to-be-more-accessible/88426/12 "2024-06-01T11:36:02Z")

</div>

> [@E1cid](#):
>
> You seem to have missed the one suggest to allow it to have user defined default view

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.

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [1 June 2024 11:37 UTC](https://discourse.nodered.org/t/move-export-format-buttons-to-be-more-accessible/88426/13 "2024-06-01T11:37:46Z")

</div>

> [@dceejay](#):
>
> > [@jbudd](#):
> >
> > use the JSON tab for, beyond clicking "compact"?
> 
> Now I think about it, that is indeed the main reason I use the json tab

Yep, 100%. And that is what made me do this: [Remember compact/pretty flow export user choice by Steve-Mcl · Pull Request #3974 · node-red/node-red · GitHub](https://github.com/node-red/node-red/pull/3974) 😉

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [1 June 2024 11:38 UTC](https://discourse.nodered.org/t/move-export-format-buttons-to-be-more-accessible/88426/14 "2024-06-01T11:38:22Z")

</div>

Yes. Remembering last used option would be good.

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [1 June 2024 11:56 UTC](https://discourse.nodered.org/t/move-export-format-buttons-to-be-more-accessible/88426/15 "2024-06-01T11:56:14Z")

</div>

I think it already does remember it, doesn't it?

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [1 June 2024 12:01 UTC](https://discourse.nodered.org/t/move-export-format-buttons-to-be-more-accessible/88426/16 "2024-06-01T12:01:58Z")

</div>

> [@Colin](#):
>
> it already does remember it, doesn't it?

Compact/formatted does.

> [@Steve-Mcl](#):
>
> And that is what made me do this: [Remember compact/pretty flow export user choice by Steve-Mcl · Pull Request #3974 · node-red/node-red · GitHub](https://github.com/node-red/node-red/pull/3974) 😉

  

Choice of which view does not

> [@Steve-Mcl](#):
>
> - Remember users choice of which view they used last time (Export Nodes / JSON)
> - Happy to put this in scope along side agreed item No1 ✅

![chrome_FlFhzvdXkq](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/8/f895ed658b902a32454b72eef8a36a3226c6419b.gif)

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [1 June 2024 12:43 UTC](https://discourse.nodered.org/t/move-export-format-buttons-to-be-more-accessible/88426/17 "2024-06-01T12:43:57Z")

</div>

> [@Steve-Mcl](#):
>
> Thoughts? Agree? Disagree? Variations?

Definitely agree.

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.

---

<div class="post-metadata">

### Author: ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)
#### Post date: [2 June 2024 01:09 UTC](https://discourse.nodered.org/t/move-export-format-buttons-to-be-more-accessible/88426/18 "2024-06-02T01:09:42Z")

</div>

(For what it is worth)

There is a big **IF** for me.

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)

Thanks.  
Hope that is of some worth.

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [2 June 2024 13:50 UTC](https://discourse.nodered.org/t/move-export-format-buttons-to-be-more-accessible/88426/19 "2024-06-02T13:50:18Z")

</div>

After evaluating all the feedback and suggestions, I have raised a PR: [Export Nodes dialog refinement by Steve-Mcl · Pull Request #4746 · node-red/node-red · GitHub](https://github.com/node-red/node-red/pull/4746)

### Outline

1. move the buttons to the main dialog (top-right) ✅
2. Remember users choice of which view they used last time (Export Nodes / JSON) ✅
3. ~~remove the JSON tab~~ - **out of scope** ❌
4. "compact" by default ❌ - **no need, it is already the default**

Thanks all.
