-
Notifications
You must be signed in to change notification settings - Fork 350
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
Replace common properties dialog with side pane #1084
Conversation
Thanks for making a pull request to Elyra! To try out this branch on binder, follow this link: |
I like this idea - thank you. I think Luciano may have touched on this in the scrum regarding real estate, but I'm wondering if there's a way to introduce ellipses at a certain point to prevent the wrapping of things like Can this pane be "un-docked" then resized/widened? |
@kevin-bates There'll be some CSS changes coming soon to address the ellipses comment 👍. In terms of the floating dock, it doesn't seem to be in the scope of this PR to add that, but I added an issue elyra-ai/canvas#379 and we can also look into implementing that ourselves in a future PR. However, it's worth noting that the side pane has a button that allows the user to about double the pane's width (see below): |
@ajbozarth I'm going to work on some cleanup but here's an overview of the changes in the meantime if you want to do any ux / ui review. On hover for long paths (note: need feedback on this - any ideas on what I should be doing here?) : |
I'll take a look at this once I return from vacation in 2 weeks (since this is still WIP and no rush) |
An undesired side effect that this design change introduces is that a user might unintentionally loose changes, as illustrated in this scenario:
Previously a user was forced to either save or discard changes before another node was selected. If possible the behavior should be replicated:
|
@ptitzler Thank you for the feedback!
Good idea! Just added it. I don't think we marked any fields as required before this PR, does this look ok to you?
I actually added that on purpose (I thought maybe it'd be easier to have that initial empty entry? The user isn't typing with the dependencies list so I removed this behavior for that one). But it's easy enough to remove, I'm not that attached to that behavior.
Good idea - just added that as well (see above) |
In other places we specify
Add Environment Variable
I see. I brought this up because of usability concerns:
An unrelated question, it appears that we currently don't retain the size setting of the side bar:
|
@ptitzler I found the code that causes this inconsistency - it appears to have been intentional to remove the extension, do you think it's better to remove the extension consistently or to keep the extension consistently? @ajbozarth @lresende I think I remember intentionally removing the file extension, did we stop doing that because of python file support in pipelines? (note: you can still tell which type of file it is based on the icon to the left of the label) I can change it either way just let me know. |
🥳
From a usability point of view I believe it'd be better to keep the file extension by default. If desired, a user can always change the node name to anything they'd like, such as an arbitrary string or just the file's base name. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really nice work! Just had a couple minor comments to add so far.
@@ -1270,6 +1298,27 @@ export class PipelineEditor extends React.Component< | |||
this.handleOpenPipeline(); | |||
}); | |||
} | |||
|
|||
componentDidUpdate(): void { | |||
const inputFields = document.querySelectorAll('.properties-readonly'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if there is a way to access how uihints are rendered from properties.json
and use it instead of reading info from the DOM to create a tooltip from scratch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree - I tried looking into it and this was my last option :/ And it seemed better than having a long text field
I might be missing something, but from investigating I found that you could have descriptions based on the value of fields: https://github.com/elyra-ai/canvas/wiki/3.2-Common-Properties--UI-Hints#dynamic-text-expressions, but I wasn't able to get it working and it seems like it might be only for creating a sum or percent?
I also looked into the readonly
code and it seems like there's only a tooltip if the control is within a table? I don't know much about it and it doesn't seem to be documented anywhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can always clarify that with the canvas team later, I was just curious if we could reuse their tool, good to know you've already tried something out :) I'm fine with keeping it as it for now.
@ptitzler The editor size being persisted is an issue on the canvas side but I opened an issue there: elyra-ai/canvas#436 |
@ptitzler You should be good to check it out again! |
Super. I'll test drive it tomorrow! |
} | ||
}, | ||
{ | ||
"parameter_ref": "dependencies", | ||
"label": { | ||
"default": "File Dependencies" | ||
}, | ||
"place_holder_text": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general, the long texts were to help self-document what users can expect/do with these fields. Are we removing/trimming them due to lack of space?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved this text into the description because I changed the UI and there is no longer placeholder text for dependencies. I kept the descriptions the same in general, but in this case, I removed two lines because "One filename or expression (e.g. *.py) per line. Supported patterns: ? and *." is unnecessary - now you add entries by pressing the "Add dependencies" button. (see below)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With this, are we not allowing the user to just type (.py)? What happens if the user tries to load a pipeline that already has (.py) on it? I believe we should still enable users to type (.py) or (.csv) as there might be a lot of files? What do others think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. It should still be possible to type in an expression, like it was possible in previous releases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh ok - how do you think that should be structured? I can definitely make the fields editable. Should I add a separate button to create a blank field? I could add it next to the "Add dependencies" button, or it could be in the file browser dialog?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to one of the cases where a special kind of widget would work best - one that allows for the selection of a file or specification of an "arbitrary" string. In essence an amalgamation of what we use today select the input file and to type in output file specifications.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I will leave it open for the day in case others want to review it before I go ahead and merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
Maybe just check the warnings on the renderControl()
function, otherwise LGTM
Opens a side pane view of the node properties editor instead of a dialog.

Developer's Certificate of Origin 1.1