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

fix log message #5886

Merged
Merged

Conversation

abhinandan13jan
Copy link
Contributor

@abhinandan13jan abhinandan13jan commented Jul 3, 2020

Addresses

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

Issue

Log message for incorrect task reference shows incorrect styling

Solution

Changed styling for log container

Screenshot

log-mssg

Tests

none

browser confirmation

Chrome

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.

Looks like the issue here is poor layout from the Logs tab content overall. It seems we are using margins awkwardly and it's causing a bit of a rendering issue.

With the current changes, you have a bit of a different look and feel to your page (footer of the Logs tab is smaller):

Screen Shot 2020-07-03 at 9 49 08 AM
Screen Shot 2020-07-03 at 9 49 23 AM

This is because of the margin. My first instinct was to fix the margin by moving it up a level, but that causes some other issues... we may need UX to weigh in here.

For instance, you get a problem when you're on a task that doesn't exist (like a url with another task name after /logs, like /logs/not-a-task) but have other tasks you can select. With your current changes, you can sorta see the UI shifts around a bit:

Kapture 2020-07-03 at 10 18 49

So even if we remove your margin and get rid of that white space at the top, it's still going to shift around 🤔 Not sure if it's a big deal or not... it shifts a little at the top current (the margin is not the same height as the buttons along the top of the log).

Also, while we are here, can we just eliminate the fallback use-case styling issue as well?

In PipelineRunLogs, we have this snippet:

          {activeItem ? (
            <Firehose key={activeItem} resources={resources}>
              <LogsWrapperComponent
                taskName={_.get(taskRunFromYaml, [activeItem, 'pipelineTaskName'], '-')}
                downloadAllLabel="Download All Task Logs"
                onDownloadAll={downloadAllCallback}
              />
            </Firehose>
          ) : _.has(obj, ['status', 'conditions', 0, 'message']) ? (
            <div className="odc-pipeline-run-logs__log">
              {_.get(obj, ['status', 'conditions', 0, 'message'], '-')}
            </div>
          ) : (
            <div>No Logs Found</div>
          )}

I think we can simplify this to:

          {activeItem ? (
            <Firehose key={activeItem} resources={resources}>
              <LogsWrapperComponent
                taskName={_.get(taskRunFromYaml, [activeItem, 'pipelineTaskName'], '-')}
                downloadAllLabel="Download All Task Logs"
                onDownloadAll={downloadAllCallback}
              />
            </Firehose>
          ) : (
            <div className="odc-pipeline-run-logs__log">
              {_.get(obj, ['status', 'conditions', 0, 'message'], 'No Logs Found')}
            </div>
          )}

@@ -24,6 +24,8 @@
margin-top: var(--pf-global--spacer--lg);
background: #030303; // pod log background color
color: var(--pf-global--BackgroundColor--100);
height: 100%;
Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, this 100% is not the same as the 100% that is provided by the actual MultiStreamLogs component. Because of the margin-top, you are pushing into the footer padding of the Logs tab.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've clubbed both the messages and changed the margin to internal padding

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.

LGTM, please squash your commits though.

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 7, 2020
@andrewballantyne
Copy link
Contributor

/lgtm

Odd I didn't get an email notification about this.

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

[APPROVALNOTIFIER] This PR is APPROVED

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

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-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit ff6a3ab into openshift:master Jul 7, 2020
@spadgett spadgett added this to the v4.6 milestone Jul 8, 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. component/dev-console Related to dev-console lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants