Allow upload of custom node files; display node docs/errors in tooltips#72
Merged
Allow upload of custom node files; display node docs/errors in tooltips#72
Conversation
reelmatt
approved these changes
Apr 26, 2020
Member
reelmatt
left a comment
There was a problem hiding this comment.
If there's an easy way to get the newlines from the docstring formatted in the tooltip, I think that could help a lot visually. But don't worry about it if it's not a simple change.
Really like the tooltips in general though, and the warning icon is 👍
Closed
Collaborator
Author
|
Pushed a commit that pretties up the tooltips (left-aligned, newlines displayed) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Matt was right about being able to reuse the FileUpload functionality, but the details were just different enough that it was easier to copy/paste/change into a new component than refactor well. So CustomNodeUpload is mostly duplicated code from FileUpload.
Upon successful upload, the app hits the endpoint for the list of available nodes to show the new one. This GIF shows the functionality, but it failed to capture the file dialog. So the random click in the middle of the screen is actually selecting the file.
Also in this PR are tooltips to show either the node docstring when hovering over a node menu item, or the missing packages error. I went with @reelmatt's suggestion in #71 and used a warning icon for these failed custom nodes.
Also made some slight style changes to the node menu items to better match the wireframes, just let me know if we want to go back.