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

avoid printing too long argument in Pipeline Steps visualization #71

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ArturHarasimiuk
Copy link

In some cases it is possible that node argument will be impossible to
wrap properly and is displayed as single line. In this case pipeline
steps view becomes hard to read because right most columns are moved
beyond the screen. This requires scrolling which is not so convenient.
Also status colum is outside of screen.

This change cuts arguments list to 80 characters which should be fine
for most of usages.

Signed-off-by: Artur Harasimiuk [email protected]

Copy link
Member

@dwnusbaum dwnusbaum left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!

This change looks fine in isolation, but I'm not very familiar with the visualization code here and would need to look a little closer to understand how it works. Do you have before/after screenshots for the change?

@@ -39,7 +40,7 @@
@DataBoundConstructor public ArgumentsColumn() {}

public String get(FlowNode node) {
return ArgumentsAction.getStepArgumentsAsString(node);
return StringUtils.substring(ArgumentsAction.getStepArgumentsAsString(node), 0, 80);
Copy link
Member

Choose a reason for hiding this comment

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

Maybe it would be better to truncate to 77, and if the text was truncated, add ... to make it clear that the content was truncated?

Copy link
Author

Choose a reason for hiding this comment

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

sure, no problem

@ArturHarasimiuk
Copy link
Author

Thanks for the PR!

This change looks fine in isolation, but I'm not very familiar with the visualization code here and would need to look a little closer to understand how it works. Do you have before/after screenshots for the change?

Please find attached screenshots. This is based on our production system but real strings were replaced.

Before:
image

After:
image

In some cases it is possible that node argument will be impossible to
wrap properly and is displayed as single line. In this case pipeline
steps view becomes hard to read because right most columns are moved
beyond the screen. This requires scrolling which is not so convenient.
Also status colum is outside of screen.

This change cuts arguments list to 80 characters which should be fine
for most of usages.

Signed-off-by: Artur Harasimiuk <[email protected]>
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.

2 participants