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

Tekton Plugin - Logo and Grafana Iframe Shrink Unexpectedly with Added Code #1286

Open
angeelsanchez opened this issue Feb 28, 2024 · 2 comments

Comments

@angeelsanchez
Copy link

angeelsanchez commented Feb 28, 2024

Bug Report

Description

When incorporating the provided code snippet within my constant, an unexpected issue arises where both the project logo (in the sidebar) and an iframe sourced from Grafana undergo an unintended reduction in size. This behavior is peculiar as there seems to be no apparent correlation between the introduced code and the visual elements affected.

The logo, which should maintain its original dimensions, and the Grafana iframe, displaying critical information, inexplicably shrink upon implementing the following code:

<EntityLayout.Route path="/tekton-janus" title="Janus">
  <EntitySwitch.Case if={isTektonCIAvailable}>
    {tektonContent}
  </EntitySwitch.Case>
</EntityLayout.Route>

What are the steps to reproduce this bug?

  1. Install the plugin
  2. Add de code snippet
  3. Navigate to the janus-tekton page.

Versions of software used and environment

  • React version: 18.2.0
  • Node.js version: v18.18.2
  • Other relevant libraries or dependencies:
    • @k-phoen/backstage-plugin-grafana: ^0.1.22

Additional Information

Curiously, the issue is immediately resolved when I comment out the specific lines of code mentioned above.

Screenshot

Let's skip that Grafana doesn't work, but number 2 would be the grafana iFrame (I don't know if I'm probably modifying more things)

With tektonContent

With the code

Without tektonContent

image

@angeelsanchez angeelsanchez added kind/bug Something isn't working status/triage labels Feb 28, 2024
@github-actions github-actions bot added the jira label Feb 28, 2024
@angeelsanchez
Copy link
Author

angeelsanchez commented Feb 28, 2024

It seems that what is affecting the overall styles is this import.

in tekton/src/plugin.ts
import '@patternfly/react-core/dist/styles/base.css';

@ciiay
Copy link
Contributor

ciiay commented Jun 7, 2024

Hi @angeelsanchez , can you check if you still experience this issue with the latest main branch code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants