Feature request: Node depth
See original GitHub issueI see this being mostly useful for blocks, but for consistency I would add it to any node. A clear example where it’s useful:
type: unordered-list
type: list-item
type: text
type: unordered-list
type: list-item
Now imagine you’re working on a list plugin (I am) and you need to figure out how to handle a <TAB> keypress. You need to look at the depth of the current item and the parent item (or in this case parent of parent) to figure out if you can actually go one step “deeper” (i.e. wrap in another unordered-list.)
I would be happy to work on a PR, though I need a tiny bit of guidance, if you feel this is useful. I would add a depth<Number>
to most of the models and at some point in the code figure out where to add this. Could be an extensive PR I guess. Happy to get pointers!
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Feature request: provide deep (recursive) fs.writeFile() #37733
Please describe alternative solutions or features you have considered. Checking if the directory exits recursively then writing the file if that ...
Read more >"Is within..." alpha/depth | Vuo
I'm seeing a lot of touch-screen potential for the "is within" series of nodes. It would be great to be able to sample/select...
Read more >Add Depth to Network Atlas Alert Indicators - Feature Requests ...
I use Visio to create the backgrounds for the maps and the tiered maps works great. Though the alert status only rolls up...
Read more >Feature Requests - Node-RED Forum
Topic Replies Views Activity
About the Feature Requests category 0 611 17 May 2018
Support for Matter Protocol 1 116 17 December 2022
Saving flow with...
Read more >Selected note shown highlighted on the Local Graph
With Depth 1, I can see all nodes directly connected with it. ... I had a similar feature request at Give the center...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I should be ashamed.
Actually there is a
getDepth(descendant)
onNode
already too 😃