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

Convert Log Viewer to PF Log Viewer #2184

Merged

Conversation

ppadti
Copy link
Contributor

@ppadti ppadti commented Nov 20, 2023

Closes: RHOAIENG-258 and RHOAIENG-1095

Description

This PR aims to change the existing Log viewer to PF Log viewer. Also this PR includes

  1. scroll up to pause feature.
  2. Find/search feature in the log viewer toolbar.
  3. Support for a full-screen log viewer (expand functionality).

UX Design: https://www.figma.com/proto/rJjOtl3nxpW6BAcl0MZr4y/Pipeline-log-viewer?page-id=62%3A1895&type=design&node-id=1075-5045&viewport=1226%2C-14994%2C0.33&t=BbsTwCedaJMiJaRo-1&scaling=min-zoom&starting-point-node-id=1075%3A5045&show-proto-sidebar=1&mode=design

Gifs:

Screencast.from.2024-01-16.22-27-04.webm
Screencast.from.2024-01-16.22-28-20.webm
Screencast.from.2024-01-16.16-31-09.webm

Screenshots:

When the drawer is at its default width.

Screenshot from 2024-01-16 22-29-38

Log viewer when Drawer is at minSize.

Screenshot from 2024-01-16 22-29-46

When search bar is expanded

Screenshot from 2024-01-16 22-37-12

Screenshot from 2024-01-16 22-29-51

Log viewer when "No logs available"

Screenshot from 2024-01-16 22-30-15

Screenshot from 2024-01-16 22-30-25

How Has This Been Tested?

  • Upload a Pipeline & create runs
  • Select a node & go to the logs tab
  • View logs for containers

Test Impact

Request review criteria:

Self checklist (all need to be checked):

  • The developer has manually tested the changes and verified that the changes work
  • Commits have been squashed into descriptive, self-contained units of work (e.g. 'WIP' and 'Implements feedback' style messages have been removed)
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has added tests or explained why testing cannot be added (unit tests & storybook for related changes)

If you have UI changes:

  • Included any necessary screenshots or gifs if it was a UI change.
  • Included tags to the UX team if it was a UI/UX change (find relevant UX in the SMEs section).

After the PR is posted & before it merges:

  • The developer has tested their solution on a cluster by using the image produced by the PR to main

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress This PR is in WIP state label Nov 20, 2023
@ppadti
Copy link
Contributor Author

ppadti commented Nov 20, 2023

This solution has text overlapping issue, when drawer size gets smaller. We can avoid this problem by increasing the minSize of Drawer. Please share some suggestions or ideas you might have.

Screencast.from.2023-11-20.17-55-51.webm

@openshift-merge-robot openshift-merge-robot added the needs-rebase PR needs to be rebased label Nov 23, 2023
Copy link
Member

@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.

This needs to be rebased against the PF5 changes.

The resizing effort is alright... I think we may want to find a nicer way to manage it in the long run because it definitely looks very hacky right not.

I think we need to probably discuss the whole need for the Log tab to be selected. This seems like a technical issue you're having and trying to bend the UX to fit it -- where I assume we can figure out a proper technical solution to avoid it.

@yih-wang
Copy link

Hi @ppadti , what is the current minSize of the drawer?

@ppadti
Copy link
Contributor Author

ppadti commented Nov 30, 2023

Hi @ppadti , what is the current minSize of the drawer?

current minSize of the drawer is 400px.

@mturley
Copy link
Contributor

mturley commented Dec 5, 2023

@ppadti , I've opened a PR against this PR's branch to work around the LogViewer rendering issue and reset the default tab back to Input / Output. Please review: ppadti#1

ppadti pushed a commit to ppadti/odh-dashboard that referenced this pull request Dec 6, 2023
…ng issue (#1)

* Switch default tab back to input/output

Signed-off-by: Mike Turley <[email protected]>

* Conditionally render only the active tab, remove now-unneccessary tabContentProps function

Signed-off-by: Mike Turley <[email protected]>

---------

Signed-off-by: Mike Turley <[email protected]>
@openshift-merge-robot openshift-merge-robot added the needs-rebase PR needs to be rebased label Dec 6, 2023
@openshift-merge-robot openshift-merge-robot removed the needs-rebase PR needs to be rebased label Dec 7, 2023
@manaswinidas
Copy link
Contributor

Everything looks good but the logs aren't scrolling to the bottom for me.

Screen.Recording.2024-01-09.at.2.11.19.AM.mov

@ppadti
Copy link
Contributor Author

ppadti commented Jan 9, 2024

Everything looks good but the logs aren't scrolling to the bottom for me.

Screen.Recording.2024-01-09.at.2.11.19.AM.mov

I am not able to reproduce this issue. @DaoDaoNoCode could you please check whether this issue exist, while reviewing the PR.

@yih-wang
Copy link

yih-wang commented Jan 9, 2024

Hi @ppadti, the updates look good! I remember when seeing your demo during our meeting, the search box remains the same width both for the default status and focus status. Is that been changed or do I get a wrong memory here?

Another question is do the spaces between the components follow the standard pattern? I feel like these two spaces are not equal to each other. But that could be my illusion.
image

@ppadti
Copy link
Contributor Author

ppadti commented Jan 10, 2024

Hi @ppadti, the updates look good! I remember when seeing your demo during our meeting, the search box remains the same width both for the default status and focus status. Is that been changed or do I get a wrong memory here?

Another question is do the spaces between the components follow the standard pattern? I feel like these two spaces are not equal to each other. But that could be my illusion. image

@yih-wang I have updated the maxwidth for search item to 250px, when it is expanded. I didn't quiet get what default status means. Is it only the search icon that we display without searchInput?

yeah the spaces are not equal. Because the steps, search and pause/resume item stays in one ToolabarToggelGroup which is aligned to the left of the drawer and download dropdown and kebab menu stays in another ToolabarToggelGroup , which aligns right of the drawer, when the drawer is resized to large. you want me make them have equal space when the drawer is at minSize?

@yih-wang
Copy link

@ppadti

...the search box remains the same width both for the default status and focus status...

Here I mean when the search box expands, the width of what the user defaults to see (before typing anything in the search box) or what the user sees after typing something in the search box (search box with 1/7 ^⌄ in it).

you want me make them have equal space when the drawer is at minSize?

Yes I'm wondering whether we could make all the spaces 16px at minSize, especially for the layout below.
image

@DaoDaoNoCode
Copy link
Member

I checked the current behavior, looks like the clear button is clearing the search field input but clearing the search result.
Reproduce: Click search -> input something -> click on 'x' button to close search -> open it again
Screenshot 2024-01-12 at 11 36 09 AM

@manaswinidas
Copy link
Contributor

@DaoDaoNoCode This is the issue I mentioned/demoed in the last office hours call. This is a known issue. @ppadti has created a PF issue for this.

@ppadti
Copy link
Contributor Author

ppadti commented Jan 15, 2024

@DaoDaoNoCode This is the issue I mentioned/demoed in the last office hours call. This is a known issue. @ppadti has created a PF issue for this.

PF Issue: patternfly/react-log-viewer#56
Also there is another issue needs to be addressed to get text overlapping things resolved. It's metioned here: #2184 (comment)

@ppadti
Copy link
Contributor Author

ppadti commented Jan 16, 2024

@ppadti

...the search box remains the same width both for the default status and focus status...

Here I mean when the search box expands, the width of what the user defaults to see (before typing anything in the search box) or what the user sees after typing something in the search box (search box with 1/7 ^⌄ in it).

you want me make them have equal space when the drawer is at minSize?

Yes I'm wondering whether we could make all the spaces 16px at minSize, especially for the layout below. image

@yih-wang I have updated the spaces between toolbar items as we discussed. Let me know if this alignment and spacing is fine.
minSize: 500px
GIF:
Screencast from 2024-01-16 16-31-09.webm

@manaswinidas
Copy link
Contributor

manaswinidas commented Jan 16, 2024

@ppadti please update the GIFs and screenshots in the PR description too.

@ppadti ppadti force-pushed the issue-1738 branch 2 times, most recently from 870e0bb to 58d0493 Compare January 16, 2024 18:43
@Gkrumbach07
Copy link
Member

Gkrumbach07 commented Jan 16, 2024

anything not working as expected is a PF bug (drawer resizing issue, highlighted text). everything else is working as expected.

needs UX approval and advisor

/lgtm

Copy link
Contributor

@mturley mturley left a comment

Choose a reason for hiding this comment

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

LGTM aside from the PF issues identified here which can probably be considered out of scope of this PR as long as we have issues to follow up on them.

@manaswinidas manaswinidas dismissed stale reviews from DaoDaoNoCode and andrewballantyne January 17, 2024 06:34

Changes have been addressed.

Copy link
Contributor

openshift-ci bot commented Jan 17, 2024

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by: manaswinidas, mturley

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-bot openshift-merge-bot bot merged commit 0441a89 into opendatahub-io:f/pipelines-enhancement Jan 17, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request]: Convert Log Viewer to use PF Log Viewer
10 participants