openshift / console

OpenShift Cluster Console UI
https://www.openshift.org
Apache License 2.0
401 stars 613 forks source link

OCPBUGS-41175: Operator Hub does not show correct description when installing new operator #14347

Closed Mylanos closed 2 weeks ago

Mylanos commented 1 month ago

Links to: https://issues.redhat.com/browse/OCPBUGS-41175

Problem: The description of the operator hub item didnt show accordingly to the selected channel.

Fix: Pass the description from the currentCSVDesc to the MarkdownView instead of the longDescription, that is derived from the default channel.

Before:

Screenshot 2024-09-30 at 12 40 40

After

Screenshot 2024-09-30 at 12 05 43
openshift-ci-robot commented 1 month ago

@Mylanos: This pull request references Jira Issue OCPBUGS-41175, which is invalid:

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to [this](https://github.com/openshift/console/pull/14347): >Links to: https://issues.redhat.com/browse/OCPBUGS-41175 > >Problem: The description of the operator hub item didnt show accordingly to the selected channel. > >Fix: >Add the description from the currentCSVDesc MarkdownView instead of longDescription, that is derived from the default channel. > >Before: >Screenshot 2024-09-30 at 12 40 40 > >After >Screenshot 2024-09-30 at 12 05 43 > > > > Instructions for interacting with me using PR comments are available [here](https://prow.ci.openshift.org/command-help?repo=openshift%2Fconsole). If you have questions or suggestions related to my behavior, please file an issue against the [openshift-eng/jira-lifecycle-plugin](https://github.com/openshift-eng/jira-lifecycle-plugin/issues/new) repository.
openshift-ci[bot] commented 1 month ago

Hi @Mylanos. Thanks for your PR.

I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
Mylanos commented 1 month ago

/jira refresh

openshift-ci-robot commented 1 month ago

@Mylanos: This pull request references Jira Issue OCPBUGS-41175, 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 version (4.18.0) matches configured target version for branch (4.18.0) * bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact: /cc @XiyunZhao

In response to [this](https://github.com/openshift/console/pull/14347#issuecomment-2382843616): >/jira refresh > Instructions for interacting with me using PR comments are available [here](https://prow.ci.openshift.org/command-help?repo=openshift%2Fconsole). If you have questions or suggestions related to my behavior, please file an issue against the [openshift-eng/jira-lifecycle-plugin](https://github.com/openshift-eng/jira-lifecycle-plugin/issues/new) repository.
TheRealJon commented 1 month ago

/ok-to-test

openshift-ci-robot commented 1 month ago

@Mylanos: This pull request references Jira Issue OCPBUGS-41175, which is valid.

3 validation(s) were run on this bug * bug is open, matching expected state (open) * bug target version (4.18.0) matches configured target version for branch (4.18.0) * bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact: /cc @XiyunZhao

The bug has been updated to refer to the pull request using the external bug tracker.

In response to [this](https://github.com/openshift/console/pull/14347): >Links to: https://issues.redhat.com/browse/OCPBUGS-41175 > >Problem: The description of the operator hub item didnt show accordingly to the selected channel. > >Fix: >Pass the description from the `currentCSVDesc` to the `MarkdownView` instead of the longDescription, that is derived from the default channel. > >Before: >Screenshot 2024-09-30 at 12 40 40 > >After >Screenshot 2024-09-30 at 12 05 43 > > > > Instructions for interacting with me using PR comments are available [here](https://prow.ci.openshift.org/command-help?repo=openshift%2Fconsole). If you have questions or suggestions related to my behavior, please file an issue against the [openshift-eng/jira-lifecycle-plugin](https://github.com/openshift-eng/jira-lifecycle-plugin/issues/new) repository.
Mylanos commented 1 month ago

After making the initial change that fixed the issue of not showing the correct description for a given channel, a problem of unstable styling within the MarkdownView popped up, which can be seen on the following screen recording.

https://github.com/user-attachments/assets/74770aaf-d1b8-4474-b70f-d6db1732e7f5

Cause of problem was that the iframe component the MarkdownView uses, was mounting/creating new iframe component each time the content/description has changed, which caused the styling to be reapplied over and over again ( the CSS styling is defined within the HTML page that is being generated in this component and passed to the iframe ). Which resulted in a problem where the styling was inconsistent - most notable issue was that the background color flashed to white.

To resolve this issue I kept the iframe mounted and only made changes to its content based on the current description/content, while keeping the onLoad logic. The content is being injected into the iframe instead of using the srcDoc, every time it changes.

After these changes, the flickering problem does not occur.

https://github.com/user-attachments/assets/3772f8a2-970e-40de-bd9e-aa80ae3a8fc4

Mylanos commented 1 month ago

/retest

Mylanos commented 1 month ago

/retest

Mylanos commented 1 month ago

/retest

Mylanos commented 1 month ago

/retest

Mylanos commented 1 month ago

Thanks for the review @vojtechszocs and @rhamilto, updated the PR with those recommended changes 👍

Mylanos commented 3 weeks ago

/retest

Mylanos commented 3 weeks ago

/retest

Mylanos commented 3 weeks ago

/retest

Mylanos commented 3 weeks ago

/retest

Mylanos commented 2 weeks ago

/retest

Mylanos commented 2 weeks ago

/retest

Mylanos commented 2 weeks ago

/retest

openshift-ci[bot] commented 2 weeks ago

@Mylanos: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
vojtechszocs commented 2 weeks ago

/lgtm

openshift-ci[bot] commented 2 weeks ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Mylanos, TheRealJon, vojtechszocs

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: - ~~[frontend/OWNERS](https://github.com/openshift/console/blob/master/frontend/OWNERS)~~ [TheRealJon,vojtechszocs] 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 commented 2 weeks ago

@Mylanos: Jira Issue OCPBUGS-41175: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-41175 has been moved to the MODIFIED state.

In response to [this](https://github.com/openshift/console/pull/14347): >Links to: https://issues.redhat.com/browse/OCPBUGS-41175 > >Problem: The description of the operator hub item didnt show accordingly to the selected channel. > >Fix: >Pass the description from the `currentCSVDesc` to the `MarkdownView` instead of the longDescription, that is derived from the default channel. > >Before: >Screenshot 2024-09-30 at 12 40 40 > >After >Screenshot 2024-09-30 at 12 05 43 > > > > Instructions for interacting with me using PR comments are available [here](https://prow.ci.openshift.org/command-help?repo=openshift%2Fconsole). If you have questions or suggestions related to my behavior, please file an issue against the [openshift-eng/jira-lifecycle-plugin](https://github.com/openshift-eng/jira-lifecycle-plugin/issues/new) repository.