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 1875809: Restyle Time to inlineblock for Topology - Pipeline & Builds #6493

Merged
merged 1 commit into from Sep 11, 2020

Conversation

abhinandan13jan
Copy link
Contributor

Issue

https://issues.redhat.com/browse/ODC-4455

Solution

Fixed in two different commits

  1. Make PipelineOverview time as inline-block
  2. Make BuildOverview block as inline-block

Screenshot

Screenshot from 2020-09-02 16-44-00

Tests

No tests altered

Browser conformance

Chrome & Firefox

@openshift-ci-robot openshift-ci-robot added the component/core Related to console core functionality label Sep 2, 2020
@openshift-ci-robot openshift-ci-robot added the component/dev-console Related to dev-console label Sep 2, 2020
@@ -0,0 +1,5 @@
.pipeline-run-item {
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
.pipeline-run-item {
.odc-pipeline-run-item {

@@ -31,7 +32,11 @@ const PipelineRunItem: React.FC<PipelineRunItemProps> = ({ pipelineRun }) => {
<Grid hasGutter>
Copy link
Contributor

Choose a reason for hiding this comment

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

The li one line up could use with the odc-pipeline-run-item class too to maintain a good structure.

@@ -9,6 +9,10 @@
align-items: center;
}

.build-overview__item-time {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can probably leave the build class alone without the prefix... it's older code and appears to be more consistent with what is there.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think something got lost in translation here @abhinandan13jan haha... I didn't mean undo this change, I was merely saying don't change .build-overview__item-time to meet my other change request. We definitely still want to apply this to Builds (I'm not contradicting myself from the previous time you asked about addressing the Build Config section -- we still definitely want to keep this functionality consistent).

@abhinandan13jan abhinandan13jan changed the title Restyle Time to inlineblock for Topology - Pipeline & Builds Bug 1875809: Restyle Time to inlineblock for Topology - Pipeline & Builds Sep 4, 2020
@openshift-ci-robot openshift-ci-robot added bugzilla/severity-medium Referenced Bugzilla bug's severity is medium 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 4, 2020
@openshift-ci-robot
Copy link
Contributor

@abhinandan13jan: This pull request references Bugzilla bug 1875809, which is valid. The bug has been moved to the POST state.

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:

Bug 1875809: Restyle Time to inlineblock for Topology - Pipeline & Builds

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.

@abhinandan13jan
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 Sep 4, 2020
@abhinandan13jan
Copy link
Contributor Author

@andrewballantyne updated

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.

The Pipeline section changes look good ... please return the changes for the Build section. Apologizes for the misunderstanding.

@abhinandan13jan
Copy link
Contributor Author

/test frontend

@andrewballantyne
Copy link
Contributor

/retest

@andrewballantyne
Copy link
Contributor

/lgtm
/assign @rohitkrai03

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Sep 9, 2020
{lastUpdated && <span className="text-muted">&nbsp;({fromNow(lastUpdated)})</span>}
{lastUpdated && (
<span className="odc-pipeline-run-item__time text-muted">
&nbsp;({fromNow(lastUpdated)})
Copy link
Contributor

Choose a reason for hiding this comment

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

We shouldn't be using &nbsp; anymore because when the time wraps, it creates an unwanted space offset at the beginning of the line.

You can see this in the description screenshot.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed nbsp from both Pipeline and Build

@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Sep 10, 2020
Comment on lines 35 to 37
{lastUpdated && (
<span className="odc-pipeline-run-item__time text-muted">({fromNow(lastUpdated)})</span>
)}
Copy link
Contributor

Choose a reason for hiding this comment

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

By removing &nbsp; you've removed the separation between text:
image

You need to use {' '}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Doesn't work with the space, it gets trimmed off. I tried to achieve the behavior by using a right-padding on previous element.
Let me know if that's fine.

@@ -44,8 +44,10 @@ const BuildOverviewItem: React.SFC<BuildOverviewListItemProps> = ({ build }) =>
Build &nbsp;
<BuildNumberLink build={build} />
&nbsp;
{conjugateBuildPhase(phase)}
{lastUpdated && <span className="text-muted">&nbsp;({fromNow(lastUpdated)})</span>}
<span className="build-overview__item-phase">{conjugateBuildPhase(phase)}</span>
Copy link
Contributor

Choose a reason for hiding this comment

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

What about doing this:

    <div>
      Build <BuildNumberLink build={build} /> {conjugateBuildPhase(phase)}
      {lastUpdated && (
        <>
          {' '}
          <span className="build-overview__item-time text-muted">({fromNow(lastUpdated)})</span>
        </>
      )}
    </div>

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 for both Builds and Pipelines

@christianvogt
Copy link
Contributor

/lgtm
/approve

@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abhinandan13jan, andrewballantyne, christianvogt

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 lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Sep 11, 2020
@openshift-merge-robot openshift-merge-robot merged commit f988ecb into openshift:master Sep 11, 2020
@openshift-ci-robot
Copy link
Contributor

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

Bugzilla bug 1875809 has been moved to the MODIFIED state.

In response to this:

Bug 1875809: Restyle Time to inlineblock for Topology - Pipeline & Builds

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.6 milestone Sep 15, 2020
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-medium Referenced Bugzilla bug's severity is medium 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/core Related to console core functionality component/dev-console Related to dev-console kind/bug Categorizes issue or PR as related to a bug. 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

7 participants