Skip to content
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

Add indicator for invalid node properties #752

Merged
merged 25 commits into from Jul 24, 2020
Merged

Add indicator for invalid node properties #752

merged 25 commits into from Jul 24, 2020

Conversation

marthacryan
Copy link
Member

Fixes #653. Adds a small red caret to nodes with invalid properties. Only checks
for having a runtime image chosen for now. Looks like this:
image
image

Developer's Certificate of Origin 1.1

   By making a contribution to this project, I certify that:

   (a) The contribution was created in whole or in part by me and I
       have the right to submit it under the Apache License 2.0; or

   (b) The contribution is based upon previous work that, to the best
       of my knowledge, is covered under an appropriate open source
       license and I have the right under that license to submit that
       work with modifications, whether created in whole or in part
       by me, under the same open source license (unless I am
       permitted to submit under a different license), as indicated
       in the file; or

   (c) The contribution was provided directly to me by some other
       person who certified (a), (b) or (c) and I have not modified
       it.

   (d) I understand and agree that this project and the contribution
       are public and that a record of the contribution (including all
       personal information I submit with it, including my sign-off) is
       maintained indefinitely and may be redistributed consistent with
       this project or the open source license(s) involved.

Adds a small red caret to nodes with invalid properties. Only checks
for having a runtime image chosen for now.
@lresende
Copy link
Member

One thing here is the question of using warning vs something more like error as when the full validation is added this should/would disable pipeline submission if some of these are present.

As for the icon, how about something more like a red circle or red x or red * on the top right corner aligned a little farther from the border?

image

image

image

image

Note that the icon is more like a suggestion.

marthacryan and others added 4 commits July 14, 2020 09:05
Allows for using different types of message 'severity', i.e.
error, warning, success, info. Also adds behavior of dismissing
the message when a new node is created on the canvas.
Co-authored-by: Karla Spuldaro <karla.spuldaro@ibm.com>
Change the icon used and reposition it
@vabarbosa
Copy link
Contributor

vabarbosa commented Jul 14, 2020

updated the icon used and its position.

the icon can be replaced if desired by replacing the packages/ui-components/style/icons/error.svg.
alternative icons can be found here: https://www.carbondesignsystem.com/guidelines/icons/library/
(just search for error or alert)

image

image

@ajbozarth
Copy link
Member

The update location of the icon is better, but looking at the carbon icons I think a "filled" icon would be slightly easier to see at that size, like "error filled" or "warning filled"

I'll do a more detailed review soon

Copy link
Member

@ajbozarth ajbozarth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ran this locally and feature-wise it works great, but I do have a couple of UX comments.

In addition to my previous comment about using a "filled" icon I also found myself trying to click on the error icon in an attempt to figure out what's wrong. Currently this doesn't do anything, perhaps we should try to tie some functionality into clicking the icon, maybe have it open the tool tip which displays the error? Currently you have to mouse over the node for a couple second for the tooltip to show up, but clicking the node (including the icon) will cause the tooltip to not show until you move the mouse off and onto the node again.

@lresende
Copy link
Member

@ajbozarth Hovering on the node should show you the properties and what is wrong there.

@ajbozarth
Copy link
Member

@lresende that is correct, but if a user clicks on it before the tooltip appears it selects the node instead and the tooltip will not appear at that point until a user mouses off and on the node again

@marthacryan
Copy link
Member Author

Options for icon:
image
image
image
Thoughts? @vabarbosa @ajbozarth

@ajbozarth
Copy link
Member

ajbozarth commented Jul 16, 2020

Of those three options I would choose the first one (red dot). Is a "filled" version of the second one not an option though?

(Edit: I'm thinking specifically if the Error Filled carbon icon)

@vabarbosa
Copy link
Contributor

vabarbosa commented Jul 16, 2020

since the icon is small i would vote to keep it simple and go with the red dot.

@vabarbosa
Copy link
Contributor

vabarbosa commented Jul 16, 2020

for comparison purposes this is how it is done in canvas (Test harness)

  • Text/label color changed
  • Error Filled icon near the node's icon

image

@marthacryan
Copy link
Member Author

marthacryan commented Jul 20, 2020

@vabarbosa @ajbozarth I've been playing around with the different options this morning - thoughts?
image
image
image
image
image
image
image

@vabarbosa
Copy link
Contributor

@vabarbosa @ajbozarth I've been playing around with the different options this morning - thoughts?

very nice!

i like this with a red border:
image

or this as is:
image

@marthacryan marthacryan added the status:Work in Progress Development in progress. A PR tagged with this label is not review ready unless stated otherwise. label Jul 21, 2020
@marthacryan
Copy link
Member Author

This PR now depends on #744 for the error alert at the top of the pipeline.
Here's the updated behavior / look:
When you drag nodes onto the canvas, they look normal by default:
image

After pressing the run button, they look like this:
image
(Wasn't sure how to phrase that error message at the top - it says "Invalid pipeline: some nodes have incomplete properties")

After fixing the properties for one of the nodes, it removes the error indicator for just that node:
image

After updating any of the properties of the nodes, it shows indicators for all nodes without the needed properties.

@marthacryan
Copy link
Member Author

Discussion:
Should we be performing the same checks for exporting pipelines?

@kevin-bates
Copy link
Member

The screenshots and error message look great!

Yes, I believe this should apply to export as well. Anything that saves the user time is helpful.

@vabarbosa
Copy link
Contributor

vabarbosa commented Jul 21, 2020

looks great!

a couple points. perhaps the message should read

Invalid pipeline: Some nodes have missing or invalid properties.

or something along those lines (other may have better suggestions for the phrasing).

i would agree and say similar checks should be done on exporting. however (unless it will cause errors in the backend), i don't believe it should prevent the user from exporting. just warn them so they are aware before they continue.

@marthacryan marthacryan removed the status:Work in Progress Development in progress. A PR tagged with this label is not review ready unless stated otherwise. label Jul 22, 2020
@marthacryan
Copy link
Member Author

Last commit changes name of validation functions to validateNode and validateAllNodes. @lresende This should be good to merge as soon as @ajbozarth adds his approval and #744 is merged (already rebased off of those changes).

Copy link
Contributor

@vabarbosa vabarbosa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just made couple comments

marthacryan and others added 2 commits July 22, 2020 15:36
@vabarbosa
Copy link
Contributor

Looks good. thanks.

@marthacryan marthacryan added the status:Work in Progress Development in progress. A PR tagged with this label is not review ready unless stated otherwise. label Jul 23, 2020
@marthacryan
Copy link
Member Author

New feature based on case brought up in #744 - checks for circular references on startup and adds an indicator for all links in a cycle, as well as an error message.

Code changes

Adds a function validateAllLinks and a function validatePipeline. validatePipeline returns a tidy error message that collects the error messages from both validateAllNodes and validateAllLinks, and returns null if everything is valid.

Behavior changes

Here's what it looks like when there are both invalid links and invalid nodes and you try to run, export, or just open the pipeline:

image

After fixing the cycle, it automatically removes the style from other links:

image

@marthacryan marthacryan removed the status:Work in Progress Development in progress. A PR tagged with this label is not review ready unless stated otherwise. label Jul 23, 2020
@vabarbosa
Copy link
Contributor

@marthacryan this looks great! thank you for the quick turn around.

@lresende lresende merged this pull request into elyra-ai:master Jul 24, 2020
lresende pushed a commit that referenced this pull request Jul 24, 2020
Changes the node edge line color to red and add a small red circle
to nodes with invalid properties.  Currently, it checks for invalid
runtime images and circular/recursive pipelines.

Co-authored-by: va barbosa <vabarbosa@users.noreply.github.com>
@marthacryan marthacryan deleted the op-err-indicator branch July 24, 2020 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Usability: pipeline editor should indicate if there are problems in the flow configuration and where they are
5 participants