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

Bug 1880410: convert pipeline visualization node to SVG #6676

Merged
merged 1 commit into from Jan 29, 2021

Conversation

rottencandy
Copy link
Contributor

@rottencandy rottencandy commented Sep 18, 2020

Fixes:
https://issues.redhat.com/browse/ODC-3661

Analysis / Root cause:
There are several rendering issues with the Pipeline Visualization Nodes (aka Tasks). This needs to be handled better and the whole thing is currently rendered through a foriegnObject inside the SVG visualization.

Solution Description:
Convert pipeline visualization node to SVG.

Screen shots / Gifs for design review:
(Should ideally be unchanged)
tmp
tmp0
tmp
tmp2

Unit test coverage report:
Unchanged.

Browser conformance:

  • Chrome
  • Firefox
  • Safari
  • Edge

@openshift-ci-robot openshift-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. bugzilla/severity-low Referenced Bugzilla bug's severity is low for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. labels Sep 18, 2020
@openshift-ci-robot
Copy link
Contributor

@rottencandy: This pull request references Bugzilla bug 1880410, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.6.0) matches configured target release for branch (4.6.0)
  • bug is in the state NEW, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

[WIP]Bug 1880410: convert pipeline visualization node to SVG

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot
Copy link
Contributor

@rottencandy: This pull request references Bugzilla bug 1880410, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.6.0) matches configured target release for branch (4.6.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

[WIP]Bug 1880410: convert pipeline visualization node to SVG

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@rottencandy rottencandy changed the title [WIP]Bug 1880410: convert pipeline visualization node to SVG Bug 1880410: convert pipeline visualization node to SVG Sep 18, 2020
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 18, 2020
@rottencandy
Copy link
Contributor Author

/hold
Will be worked on in the next sprint.

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 18, 2020
@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 4, 2020
@openshift-ci-robot openshift-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 5, 2020
@rottencandy
Copy link
Contributor Author

/bugzilla refresh

@openshift-ci-robot
Copy link
Contributor

@rottencandy: This pull request references Bugzilla bug 1880410, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.7.0) matches configured target release for branch (4.7.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

/bugzilla refresh

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot
Copy link
Contributor

@rottencandy: This pull request references Bugzilla bug 1880410, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.7.0) matches configured target release for branch (4.7.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1880410: convert pipeline visualization node to SVG

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@rottencandy
Copy link
Contributor Author

/hold cancel

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 7, 2020
@rottencandy
Copy link
Contributor Author

/kind bug

@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Oct 7, 2020
@rottencandy
Copy link
Contributor Author

/retest

@jerolimov
Copy link
Member

Code change looks valid, but I find some UI difference.

In view mode:
Before:
pr-6676-view-before
Now:
pr-6676-view-after

  1. The vertical alignment is not centered anymore, can you center it by increasing the (line) height or the y-offset here?
  2. The old version uses the complete width of the boxes for longer task names (first box, I repeated the task name multiple times).
  3. There is a little bit "more shadow" in the old version which is shown in the new one only on hover. I like it! I would prefer if we accept the new version.

In edit mode:
Before:
pr-6676-edit-before
Now:
pr-6676-edit-after

  1. I think the vertical alignment could also be one pixel (sorry :P) lower.
  2. I don't know why, but the "really long" task name overlaps the box. Only in the edit case when it does not find the task reference!
  3. The bottom border is now bigger than in the old version also when the box is not selected. Not bad, but different.

@rottencandy
Copy link
Contributor Author

rottencandy commented Oct 12, 2020

Thanks for the review @jerolimov !

  1. The vertical alignment is not centered anymore, can you center it by increasing the (line) height or the y-offset here?

Updated.
tmp

  1. The old version uses the complete width of the boxes for longer task names (first box, I repeated the task name multiple times).

Updated the max length. I think there will be some differences here. The old version used a CSS solution(using text-overflow considers font width) but the new one uses a JS solution(does not consider font width), there seems to be no way to truncate text in SVG.

  1. There is a little bit "more shadow" in the old version which is shown in the new one only on hover. I like it! I would prefer if we accept the new version.

I tried to replicate the old version which also had hover shadow, albeit was very subtle. I can add the non-hover shadow as well if you think it's better.

In edit mode:

  1. I think the vertical alignment could also be one pixel (sorry :P) lower.

Updated.

  1. I don't know why, but the "really long" task name overlaps the box. Only in the edit case when it does not find the task reference!

Thank you for catching this, I seem to have missed it. Updated.
tmp0

  1. The bottom border is now bigger than in the old version also when the box is not selected. Not bad, but different.

Not sure why it appears bigger, I've set it to the smallest possible width of 1px(under __trigger-underline in TaskListNode.scss). I'll go through SVG attrs again to see if I find something.

EDIT:
I found out that it doesn't need to be in px, and can also have decimal values. Updated:
tmp

@rottencandy
Copy link
Contributor Author

Also about the bottom border, I think there is a bit of inconsistency between browsers.
Didn't notice this earlier since I was testing mostly on Firefox, the button appears slightly different on Chromium.

Firefox vs. Chromium:
inconsistency

Should I follow the Firefox appearance, or the Chromium one?
cc: @andrewballantyne

@rottencandy rottencandy changed the title [WIP] Bug 1880410: convert pipeline visualization node to SVG Bug 1880410: convert pipeline visualization node to SVG Jan 19, 2021
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 19, 2021
Copy link
Contributor

@andrewballantyne andrewballantyne left a comment

Choose a reason for hiding this comment

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

Having some hovering issues.

image

When I hover over an item and add a parallel item, and then mouse up over the node and slowly to the dropdown, it removes and reappears the "+" icons on the above node.

return (
<SyncAltIcon
{...props}
className={cx('fa-spin', { 'pipeline-status-icon__spin': shiftOrigin })}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
className={cx('fa-spin', { 'pipeline-status-icon__spin': shiftOrigin })}
className={cx('fa-spin', { 'pipeline-status-icon--spin': shiftOrigin })}

BEM is

  • Block (pipeline-status-icon)
  • Element (pipeline-status-icon__someWrapper) -- kinda like a sub Block
  • Modifier (pipeline-status-icon--spin) -- when you want it to be "modified" based on a prop

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated.

@andrewballantyne
Copy link
Contributor

andrewballantyne commented Jan 25, 2021

Ah, it's the tooltip capturing the mouse-over and I think it persists at that point.

tooltipCapture

@andrewballantyne
Copy link
Contributor

/hold cancel

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 26, 2021
@andrewballantyne
Copy link
Contributor

FWIW, frontend test failure is lack of yarn i18n

@openshift-ci-robot openshift-ci-robot added the kind/i18n Indicates issue or PR relates to internationalization or has content that needs to be translated label Jan 27, 2021
@rottencandy
Copy link
Contributor Author

Ah, it's the tooltip capturing the mouse-over and I think it persists at that point.

Replacing the onMouse handlers with useHover seems to fix it.

Copy link
Contributor

@andrewballantyne andrewballantyne left a comment

Choose a reason for hiding this comment

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

Tiny nit, will test it out once I finish compiling 🙂

}
&__trigger-underline {
fill: var(--pf-global--Color--100);
&__hover {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
&__hover {
&--hover {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated.

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 27, 2021
@andrewballantyne
Copy link
Contributor

/cc @karthikjeeyar @jerolimov

Please one of you toss a review on this as well. If I don't see any review by EOD tomorrow, I'll LGTM it.

@jerolimov
Copy link
Member

/retest

@karthikjeeyar
Copy link
Contributor

Verified locally, works fine. Thanks @rottencandy
/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 28, 2021
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andrewballantyne, jerolimov, karthikjeeyar, rottencandy

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 28, 2021

@rottencandy: The following test failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/prow/kubevirt-plugin 0c94891 link /test kubevirt-plugin

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

1 similar comment
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit aa58c29 into openshift:master Jan 29, 2021
@openshift-ci-robot
Copy link
Contributor

@rottencandy: All pull requests linked via external trackers have merged:

Bugzilla bug 1880410 has been moved to the MODIFIED state.

In response to this:

Bug 1880410: convert pipeline visualization node to SVG

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@spadgett spadgett added this to the v4.7 milestone Feb 1, 2021
@rottencandy rottencandy deleted the svgtask branch February 8, 2021 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. bugzilla/severity-low Referenced Bugzilla bug's severity is low for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. component/dev-console Related to dev-console kind/bug Categorizes issue or PR as related to a bug. kind/i18n Indicates issue or PR relates to internationalization or has content that needs to be translated lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants