[Feature Request]Option to turn off node status on file read node

As we all know, the editor isn't a dashboard :slight_smile:


Could there be an option to to turn off the filename node status to help tidy up? :slight_smile:


hmm - indeed we normally truncate them to about 32 chars...

Indeed - this one slipped the net (maybe the other file nodes are similar?)

I think it would still be nice at 32 to be able to switch it off

When I need the full payload displaying I just use a simple function (well Blockly in my case of course) node

Rather than an arbitrary 32 characters perhaps it could be something like etc/../filename.log where if the full path is > 32, replace the middle parts of the path with ../ until 32 or less - so at least we can see the beginning path and the actual filename?


Feel free to suggest a PR :slight_smile:

That old chestnut :joy::joy::joy:

Hey - this is a team game you know :slight_smile:


I like this idea -- and I would add a request to set a hover "title" that includes the entire string, so the truncated data can still be visible, if necessary.


@Steve-Mcl - so no more excuses from you now !.... Great to have you on the team.

1 Like

Haha, thanks Dave.

Regarding this particular request - I did have a play with it.

Got this far if anyone wants to test it with a bunch of paths...


that looks good to me. I'd be happy with that. There is always an edge case (the last one) ... but overall much better.

1 Like

I think if 32 is the magic number node status limit, then it shouldn't be anymore than that :slight_smile:
/home/pi/assda/asdas/asd/asd/asd//asd/asd/asd/dasdsadd/a_very_long_long_ long_long_long_filename.txt

should be trucnated to
...ry_long_long_ long_long_long_filename.txt - assume this is 32 long :slight_smile:

/home/..g_long_ long_long_long_filename.txt if you want to always include starting folder

just rough example :slight_smile:

32 isn't hard and fast - just trying not to be overly long or messy compared to the length of typical nodes.

Yeah, 32 MAX was the aim, however . is a valid in a filename so could trip someone up.

I think 32 is the ideal target length but if a user has a 36+ char filename - its up to them TBH

@dceejay @shrickus @cymplecy if you all agree this (what I posted) is acceptable, I will raise a PR.

Indeed - at some point the user has to take some ownership of their own file naming convention. If we can help nudge them in the right direction I'm happy. (but of course you now have to get mgmt approval for the PR :wink:

1 Like

I think if the user wants the full file name - then they can just add their own simple status node (I use them all the time myself but don't tell @dceejay! )

But code nodes should stick to the rules :slight_smile:

So, I think the status should just stick to the 32 "rule" and just simply truncate.

PS In the OP - I have no control over the folder structure and the filename is going to be enormous as it is a text-speech operation

(I saw that.... noted...)
Well if we think that truncating it makes it useless/less useful then maybe not bother show it at all if over length... (but use Steve's rules to shrink first... ) - will save websocket bandwidth as well :slight_smile:

Or maybe go back to my original request and just have a flag to switch it off or on?

Or have both - switch it off or on - if on - use Steve's algo

1 Like

I'm not Jonny Ive - but I do hate too many options.

A combination could work.

I've updated the demo.

Path Length
a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/file.txt 60
a/../r/s/t/u/v/w/x/y/z/file.txt 31
- -
aaa/bbb/ccc/ddd/eee/fff/ggg/hhh/iii/jjj/kkk/lll/mmm/file.txt 60
aaa/../jjj/kkk/lll/mmm/file.txt 31
- -
/aaa/bbb/ccc/ddd/eee/fff/ggg/hhh/iii/jjj/kkk/lll/mmm/file.txt 61
/../iii/jjj/kkk/lll/mmm/file.txt 32
- -
user/pi/source/github/node-red/nodes/contrib/e-x-t-r-a---l-o-n-g---f-i-l-e---n-a-m-e.txt 88
user/../e-x-t-r-a---l-o-n-g--... 32
- -
user/pi/source/github/node-red/nodes/contrib/looooooooooong-file-name.txt 73
user/../looooooooooong-file-n... 32
- -
user/pi/source/github/nr/nodes/contrib/long-ish-name.txt 56
user/../long-ish-name.txt 25
- -
user/pi/src/git/nr/nodes/contrib/package.json 45
user/../contrib/package.json 28
- -
user/pi/src/contrib/package.json 32
user/pi/src/contrib/package.json 32
- -
user/pi/src/repos/github/ 25
user/pi/src/repos/github/ 25
- -
user/pi/readme.md 17
user/pi/readme.md 17
- -
user/long-middle-bit-path-entry/readme.md 41
user/../readme.md 17
- -
long-base-directory/pi/the-read-me-file.md 42
long-base-directory/../the-re... 32

How does that feel?

There are more options, e.g. if filename is > 32, simply drop the leading path altogether?

1 Like