-
Notifications
You must be signed in to change notification settings - Fork 360
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
feat(Topology): Add Topology pipeline support #7609
feat(Topology): Add Topology pipeline support #7609
Conversation
Preview: https://patternfly-react-pr-7609.surge.sh A11y report: https://patternfly-react-pr-7609-a11y.surge.sh |
983ca66
to
265acf2
Compare
data-test="diamond-decorator" | ||
className={css( | ||
styles.topologyPipelinesWhenExpressionBackground, | ||
status === WhenStatus.Met && styles.modifiers.success |
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.
Ah, we should support those statuses as well then.
265acf2
to
d60db7e
Compare
styling should be all set, removing WIP status |
Updated surge: https://topology-pipeline-styles.surge.sh/ |
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 looks really nice! Great job with all those css variables :-)
Left a comment about where I think you can redefine a color variable rather than setting it over. There might be other spots too?
Also, I don't see the hover state (thicker border) that is shown in the Marvel doc. Did the design change?
Finally, in dark theme there are a couple of things - I am guessing the blue icons should be the light blue? And on a solid (light) blue pill, I believe the text and icon should be dark.
--pf-topology-pipelines__pill__label__background--StrokeWidth: 1px; | ||
--pf-topology-pipelines__pill__label--m-dragging--background--StrokeWidth: 1px; | ||
|
||
--pf-topology-pipelines__pill--status--color: var(--pf-global--BorderColor--100); |
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 don't think this is used - but should be (see below)
fill: var(--pf-topology-pipelines__pill--m-selected--m-running__text-Color); | ||
} | ||
|
||
.pf-topology-pipelines__pill--status.pf-m-selected { |
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.
Here I think you want to add a rule for .pf-topology-pipelines__pill--status
to have color: var(--pf-topology-pipelines__pill--status--color)
and then in all the modifiers you can redefine that variable to be the correct status color variable.
Thanks @srambach, I've updated |
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.
Some suggestions for keeping the naming consistent. Search and replace since I'm not going to catch them all ;-)
--pf-topology-pipelines__pill--m-disabled--Background--Fill: var(--pf-global--BackgroundColor--200); | ||
--pf-topology-pipelines__pill--m-disabled--Background--Stroke: var(--pf-global--BorderColor--100); | ||
--pf-topology-pipelines__pill--m-info--Background--Fill: var(--pf-global--primary-color--light-100); | ||
--pf-topology-pipelines__pill--m-success--Background--Fill: var(--pf-global--success-color--100); | ||
--pf-topology-pipelines__pill--m-warning--Background--Fill: var(--pf-global--warning-color--100); | ||
--pf-topology-pipelines__pill--m-danger--Background--Fill: var(--pf-global--danger-color--100); | ||
--pf-topology-pipelines__pill--m-selected--Background--Fill: var(--pf-global--active-color--100); |
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.
For consistency, I think it should be lower case and underscore __background
in these.
--pf-topology-pipelines__pill--text-Color: var(--pf-global--Color--light-100); | ||
--pf-topology-pipelines__pill--m-selected--text-Color: var(--pf-global--Color--light-100); | ||
--pf-topology-pipelines__pill--m-selected--m-info--text-Color: var(--pf-global--Color--100); | ||
--pf-topology-pipelines__pill--m-selected--m-danger--text-Color: var(--pf-global--Color--light-100); | ||
--pf-topology-pipelines__pill--m-selected--m-warning--text-Color: var(--pf-global--Color--100); | ||
--pf-topology-pipelines__pill--m-selected--m-running--text-Color: var(--pf-global--Color--light-100); | ||
--pf-topology-pipelines__pill--m-selected--m-skipped--text-Color: var(--pf-global--Color--light-100); | ||
--pf-topology-pipelines__pill--m-selected--m-pending--text-Color: var(--pf-global--Color--light-100); | ||
--pf-topology-pipelines__pill--m-selected--m-canceled--text-Color: var(--pf-global--Color--light-100); |
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.
For these, I think you want __text--
so it's consistent with the other names.
--pf-topology-pipelines__pill--status--m-selected--color: var(--pf-global--active-color--100); | ||
--pf-topology-pipelines__pill--status--m-info--color: var(--pf-global--primary-color--light-100); | ||
--pf-topology-pipelines__pill--status--m-success--color: var(--pf-global--success-color--100); | ||
--pf-topology-pipelines__pill--status--m-warning--color: var(--pf-global--warning-color--100); | ||
--pf-topology-pipelines__pill--status--m-danger--color: var(--pf-global--danger-color--100); | ||
--pf-topology-pipelines__pill--status--m-running--color: var(--pf-global--palette--blue-400); | ||
--pf-topology-pipelines__pill--status--m-canceled--color: var(--pf-global--palette--black-600); | ||
--pf-topology-pipelines__pill--status--m-skipped--color: var(--pf-global--palette--black-500); | ||
|
||
--pf-topology-pipelines__pill--status--m-selected--m-info--color: var(--pf-global--Color--light-100); | ||
--pf-topology-pipelines__pill--status--m-selected--m-success--color: var(--pf-global--Color--light-100); | ||
--pf-topology-pipelines__pill--status--m-selected--m-warning--color: var(--pf-global--Color--light-100); | ||
--pf-topology-pipelines__pill--status--m-selected--m-danger--color: var(--pf-global--Color--light-100); | ||
--pf-topology-pipelines__pill--status--m-selected--m-running--color: var(--pf-global--Color--light-100); | ||
--pf-topology-pipelines__pill--status--m-selected--m-canceled--color: var(--pf-global--Color--light-100); | ||
--pf-topology-pipelines__pill--status--m-selected--m-skipped--color: var(--pf-global--Color--light-100); |
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.
And here, I think __pill__status
or __pill-status
. The first is more consistent with how topology currently is, and the second is more consistent with the rest of PatternFly.
--pf-topology-pipelines__pill__background--StrokeWidth: 2px; | ||
} | ||
|
||
.pf-topology-pipelines__pill--background { |
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.
.pf-topology-pipelines__pill__background
here to match the class names
stroke: var(--pf-topology-pipelines__pill__background--Stroke); | ||
} | ||
|
||
.pf-topology-pipelines__pill--background.pf-m-disabled { |
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.
pf-topology-pipelines__pill__background
to match the class names
... and the classes below, too.
--pf-topology-pipelines__pill--Color: var(--pf-topology-pipelines__pill--m-selected--m-running--text-Color); | ||
} | ||
|
||
.pf-topology-pipelines__pill--status { |
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.
Here, either .pf-topology-pipelines__pill-status
or .pf-topology-pipelines__pill__status
depending on what you change from the note above.
.pf-topology-pipelines__pill-text { | ||
font-size: var(--pf-topology-pipelines__pill-text--FontSize); | ||
font-family: var(--pf-topology-pipelines__pill-text--FontFamily); | ||
fill: var(--pf-topology-pipelines__pill--Color); |
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 think this should actually be --pf-topology-pipelines__pill-text--Color
and above line 42, you can initialize it to--pf-topology-pipelines__pill-text--Color: var(--pf-topology-pipelines__pill--Color)
. Then --pf-topology-pipelines__pill-text--Color
can be reassigned in each of the modifiers below rather than setting fill directly.
Then line 96 for dark theme then may or may not be needed (I think it's probably good to keep), but currently I think it's not being referenced at all.
Caveat: I didn't try all this, it's just on inspection 🤪
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.
@jeff-phillips-18 Do you want to reassign the variable rather than setting fill directly in lines 213-243? Otherwise, this PR LGTM. ⭐
stroke: var(--pf-topology-pipelines__when-expression--background--Stroke); | ||
fill: var(--pf-topology-pipelines__when-expression--background--Fill); |
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 think you should be able to reassign this variable in the modifiers below (lines 344-358)
I'd probably rename the class and variables with when-expression--background
and --edge
to just use one -
like when-expression-background
and when-expression-edge
since it's an element, not an attribute.
@srambach Updated. Thanks! |
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
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.
Great! 👍
Your changes have been released in:
Thanks for your contribution! 🎉 |
What:
Create a layout and default nodes and edges with styling to support a pipeline view in topology.
Implements UXDENG-138
Closes #7608
Additional issues:
WIP: needs updated styling