-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added tooltip option to all nodes #3675
base: master
Are you sure you want to change the base?
Conversation
In principle, this looks good. One downside is that each node would have to implement this function in order to do anything. An alternative would be for us to just show We could also do a hybrid approach
If the node has its label hidden, we currently show the node label as the tooltip. In this instance, I'd suggest prefixing the result of the above with what we'd show today, so that information is still readily available. |
I think in our situation we will use I did try a implementation with the available popover ( I can definitely add the label to the beginning, that sounds like a good solution for when the label is hidden. |
Great - I think finding a solution that just works is always preferable to needing nodes to add properties. As a heads up, we'll probably get 3.0-beta.3 released today with 3.0-final next Thursday. I won't hold up the beta for this PR, but would be good to get it in the next few days ahead of the final release. |
Thanks for this. I've got a couple concerns about the length of text this could display - and whether it should clip it at some sensible point. Also, I think when the label is being shown as well, it ought to be on a line of its own if I can also see that rendering it has markdown is non-trivial given the way we render it in the svg. I'm going to hold off merging this for the imminent beta, but we can tidy up these last few points ahead of the final 3.0 release. |
Thank you, do I just leave this pullrequest open and you commit the last few changes? |
Yup - I will take it from here next week |
I think it would also be nice if there was some sort of visual cue on the nodes that have information in their description. |
I have spent a bit more time on this, but it needs more work. There are two issues:
For the first issue, I propose we identify a suitable limit to how much is displayed in the tooltip. In the Palette, we use the first paragraph of the node's help as the tooltip content. We could use something similar here - look for first newline, or first blank link (ie a paragraph break in markdown). It'll also need some logic to layout the text as individual svg elements without relying on just the existing newlines in the text. That's a bunch of text layout logic that is needed. So I'm still keen to do this, but there's more work needed to get it right. We will be doing a 3.0.0-beta.4 release this week - I doubt we have the bandwidth to get this in for that. |
Re length, yes agree first para should make sense. Could there be a link in the tooltip ? that opens up the sidebar to the correct full info page to show the rest ? |
This reverts commit 92e4002.
Proposed changes
This proposal will open possibility to display custom tooltips to all nodes. This can be used to for example give a quick explanation about what the node does without having to open it.
Request came from our own users, so made this quick proposition. Would love to see it in Node-RED instead of use having to run a fork
Example:
In the custom node:
In NodeRED:
Checklist
grunt
to verify the unit tests pass