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 1797149: fix inconsistencies in topology node styling #4117

Merged

Conversation

christianvogt
Copy link
Contributor

@christianvogt christianvogt commented Jan 30, 2020

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

Analysis / Root cause:
There is a lot of similar code across the various react components representing the nodes and groups in topology. Unfortunately this is error prone as we've added new states and new react components and some of them simply aren't done in a consistent manner.

Solution Description:
Went through each topology node and group and updated the styles for consistent naming and css rule specificity.

Requires a future run through with @openshift/team-devconsole-ux to ensure colors are all correct. At least now the styles are consistent across nodes.

Screen shots / Gifs for design review:
selected:
image
image
image
image
image

find:
image

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. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. component/dev-console Related to dev-console labels Jan 30, 2020
@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 30, 2020
@@ -10,7 +8,7 @@ import {
} from '@console/topology';
import { modelFor, referenceFor } from '@console/internal/module/k8s';
import { useAccessReview } from '@console/internal/components/utils';
import { getTopologyFilters, TopologyFilters } from '../../filters/filter-utils';
import { TopologyFilters } from '../../filters/filter-utils';
Copy link
Member

Choose a reason for hiding this comment

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

This can be removed along with the optional filters prop

@openshift-ci-robot openshift-ci-robot added component/ceph Related to ceph-storage-plugin component/core Related to console core functionality component/dashboard Related to dashboard component/knative Related to knative-plugin component/kubevirt Related to kubevirt-plugin component/metal3 Related to metal3-plugin component/monitoring Related to monitoring component/olm Related to OLM component/sdk Related to console-plugin-sdk component/shared Related to console-shared and removed approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Feb 1, 2020
@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 1, 2020
@christianvogt christianvogt changed the title [WIP] fix inconsistencies in topology node styling Bug 1797149: fix inconsistencies in topology node styling Feb 1, 2020
@openshift-ci-robot openshift-ci-robot added bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. and removed do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Feb 1, 2020
@openshift-ci-robot
Copy link
Contributor

@christianvogt: This pull request references Bugzilla bug 1797149, 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.

In response to this:

Bug 1797149: fix inconsistencies in topology node styling

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

@christianvogt: This pull request references Bugzilla bug 1797149, which is valid.

In response to this:

Bug 1797149: fix inconsistencies in topology node styling

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.

1 similar comment
@openshift-ci-robot
Copy link
Contributor

@christianvogt: This pull request references Bugzilla bug 1797149, which is valid.

In response to this:

Bug 1797149: fix inconsistencies in topology node styling

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.

&__bg {
fill: #d1d1d1;
fill-opacity: 0.5;
stroke: #bbbbbb;
Copy link
Member

Choose a reason for hiding this comment

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

We use #d1d1d1 and #bbbbb in the three groups' styles. Could we add these as variables in the topology-utils.scss ?

cursor: grab;
}

fill: var(--pf-global--Color--300);
& text {
fill: #fff;
Copy link
Member

Choose a reason for hiding this comment

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

while we're in here

Suggested change
fill: #fff;
fill: var(--pf-global--Color--light-100);

'is-filtered': filtered,
'is-dragging': dragging,
})}
className="odc-base-node__label"
x={x + width / 2}
y={y + height + 20}
Copy link
Member

Choose a reason for hiding this comment

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

Other groupings use 30 here. Maybe a constant or default value in SvgBoxedText? (paddingX, paddingY, and truncate as well?)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let's improve this as part of a PR to to fix the label padding.

Copy link
Contributor

@serenamarie125 serenamarie125 left a comment

Choose a reason for hiding this comment

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

@christianvogt did you end up doing the 24px between components/groupings and their label?

@christianvogt
Copy link
Contributor Author

@serenamarie125 that's not part of this PR. I focused on node state styles. I think we're better off doing a followup PR for any further styling issues as this PR is already large enough.

@jeff-phillips-18
Copy link
Member

/retest

@@ -1,8 +1,7 @@
.odc-base-edge.odc-event-source-link {
--edge--stroke: #bbbbbb;
Copy link
Member

Choose a reason for hiding this comment

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

Maybe $edge-stroke-color

@@ -1,8 +1,6 @@
.odc-base-edge.odc-traffic-link {
--edge--stroke-width: 0;
--edge--stroke: #bbbbbb;
Copy link
Member

Choose a reason for hiding this comment

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

ditto

@christianvogt
Copy link
Contributor Author

@jeff-phillips-18 added a new variable default-edge-stroke-color and adjusted the css rules around edge. Also consolidated the rules around edge __link as discussed on slack.

@jeff-phillips-18
Copy link
Member

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 3, 2020
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: christianvogt, jeff-phillips-18

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

@jeff-phillips-18
Copy link
Member

/retest

@openshift-merge-robot openshift-merge-robot merged commit 4359aad into openshift:master Feb 4, 2020
@openshift-ci-robot
Copy link
Contributor

@christianvogt: All pull requests linked via external trackers have merged. Bugzilla bug 1797149 has been moved to the MODIFIED state.

In response to this:

Bug 1797149: fix inconsistencies in topology node styling

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.4 milestone Feb 4, 2020
@christianvogt christianvogt deleted the filter-highlight branch August 20, 2020 16:31
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/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. component/ceph Related to ceph-storage-plugin component/core Related to console core functionality component/dashboard Related to dashboard component/dev-console Related to dev-console component/knative Related to knative-plugin component/kubevirt Related to kubevirt-plugin component/metal3 Related to metal3-plugin component/monitoring Related to monitoring component/olm Related to OLM component/sdk Related to console-plugin-sdk component/shared Related to console-shared lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants