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 1803213: Update collapsed groups in topology to match designs #4326

Merged

Conversation

jeff-phillips-18
Copy link
Member

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

Analysis / Root cause:
Collapsed groups showed only text for kind and used only the resource kind string to determine the value.

Solution Description:
Update the collapsed group component to show badges for each resource kind, find the correct kind model based on the objects being shown.

** Sample Screen Shots **
image

Browser conformance:

  • Chrome
  • Firefox
  • Safari
  • Edge

cc @serenamarie125 @Veethika @openshift/team-devconsole-ux

@openshift-ci-robot
Copy link
Contributor

@jeff-phillips-18: This pull request references Bugzilla bug 1803213, 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 1803213: Update collapsed groups in topology to match designs

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 openshift-ci-robot added bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 14, 2020
@openshift-ci-robot openshift-ci-robot added the component/dev-console Related to dev-console label Feb 14, 2020
@@ -693,7 +693,7 @@ export const topologyModelFromDataModel = (
data.groupResources = d.children && d.children.map((id) => dataModel.topology[id]);
return {
width: 300,
height: 100,
height: d.type === TYPE_KNATIVE_SERVICE ? 100 : 180,
Copy link
Contributor

Choose a reason for hiding this comment

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

We should look at making this height dynamic based on the number of different types we will have. Probably worth a separate issue.
Or we update topology to better support dynamic height nodes based on the rendering.

@@ -44,7 +55,7 @@ const GroupNode: React.FC<GroupNodeProps> = ({ children, kind, title, typeIconCl
iconClass={typeIconClass}
/>
)}
<SvgResourceIcon ref={iconRef} x={TOP_MARGIN} y={LEFT_MARGIN} kind={kind} leftJustified />
<SvgResourceIcon ref={iconRef} x={LEFT_MARGIN} y={TOP_MARGIN - 2} kind={kind} leftJustified />
Copy link
Contributor

Choose a reason for hiding this comment

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

Who did that 0_o heh

<text x={TEXT_MARGIN}>{kindObj ? kindObj.labelPlural : emptyKind}</text>
</g>

if (!resourceTypes.length) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmmm... should we combine this condition into the return value as a nested ternary.

height: 100%;
overflow-y: auto;

&__table {
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to make sure to unstyle the tables for browser compatibility?

Copy link
Contributor

Choose a reason for hiding this comment

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

nm I just saw you tested on the main browsers already.

</div>
</foreignObject>
);
// return <g className="odc-resource-kinds-info__resources">{resources}</g>;
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove.

@christianvogt
Copy link
Contributor

/approve

@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 14, 2020
@christianvogt
Copy link
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 14, 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

@openshift-merge-robot openshift-merge-robot merged commit 8a402c1 into openshift:master Feb 15, 2020
@openshift-ci-robot
Copy link
Contributor

@jeff-phillips-18: All pull requests linked via external trackers have merged. Bugzilla bug 1803213 has been moved to the MODIFIED state.

In response to this:

Bug 1803213: Update collapsed groups in topology to match designs

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 17, 2020
@jeff-phillips-18 jeff-phillips-18 deleted the group-cards branch December 2, 2020 13:37
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/dev-console Related to dev-console lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants