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 1907282: fix topology page white screen, use ternary operator instead of logical operator #7534

Merged
merged 1 commit into from Dec 14, 2020

Conversation

sahil143
Copy link
Contributor

@sahil143 sahil143 commented Dec 14, 2020

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

Analysis / Root cause:
We are using logical operator in the PodSet component which causes it to pass a boolean value to PodStatus component title/subtitle and since we started to truncate the title/subtitle using _.truncate in PodStatus component with PR #7447, boolean values are converted to string by lodash truncate false => 'false'.

Solution Description: use ternary operator instead of logical operator and pass undefined if showPodCount is false

Screen shots / Gifs for design review:

NO UI changes

Unit test coverage report:

Test setup:

Browser conformance:

  • Chrome
  • Firefox
  • Safari
  • Edge

@sahil143
Copy link
Contributor Author

/cc @jeff-phillips-18

@sahil143 sahil143 changed the title fix topology page white screen, use ternary operator instead of logical operator Bug 1907282: fix topology page white screen, use ternary operator instead of logical operator Dec 14, 2020
@openshift-ci-robot openshift-ci-robot added bugzilla/severity-high Referenced Bugzilla bug's severity is high 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 Dec 14, 2020
@openshift-ci-robot
Copy link
Contributor

@sahil143: This pull request references Bugzilla bug 1907282, 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.7.0) matches configured target release for branch (4.7.0)
  • bug is in the state NEW, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1907282: fix topology page white screen, use ternary operator instead of logical operator

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

@sahil143: This pull request references Bugzilla bug 1907282, 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 1907282: fix topology page white screen, use ternary operator instead of logical operator

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.

@karthikjeeyar
Copy link
Contributor

/lgtm

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

/assign

Copy link
Contributor

@rohitkrai03 rohitkrai03 left a comment

Choose a reason for hiding this comment

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

/approve

The changes in the PR works fine to fix the issue and does make sense but I would like to point out that the analysis/root cause in the description mentions that the issue is caused because boolean value is being passed to _.truncate and it's changing false => 'false'. But that wouldn't break the UI since the prop accepts a string as valid type, so the main issue was being caused because false was being passed to titleComponent prop. Its fixed after these changes because now titleComponent receives undefined instead of false. cc: @sahil143

@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: karthikjeeyar, rohitkrai03, sahil143

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-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 14, 2020
@sahil143
Copy link
Contributor Author

so the main issue was being caused because false was being passed to titleComponent prop. Its fixed after these changes because now titleComponent receives undefined instead of false

Agreed, titleComponent wasn't being invoked since title itself was a boolean false and since translate converted it to a string it became true and titleComponent was invoked which was a boolean and not a component.

@openshift-merge-robot openshift-merge-robot merged commit c5c9581 into openshift:master Dec 14, 2020
@openshift-ci-robot
Copy link
Contributor

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

Bugzilla bug 1907282 has been moved to the MODIFIED state.

In response to this:

Bug 1907282: fix topology page white screen, use ternary operator instead of logical operator

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 Jan 7, 2021
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-high Referenced Bugzilla bug's severity is high 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/shared Related to console-shared 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

6 participants