backstage-plugins icon indicating copy to clipboard operation
backstage-plugins copied to clipboard

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

Open angeelsanchez opened this issue 1 year ago • 2 comments

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 avatar Feb 28 '24 08:02 angeelsanchez

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';

angeelsanchez avatar Feb 28 '24 14:02 angeelsanchez

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

ciiay avatar Jun 07 '24 22:06 ciiay

This should have been fixed in this PR: https://github.com/backstage/community-plugins/pull/2963

A similar issue was found when using the Tekton plugin with Jenkins on the same page, and the PR above fixed that issue.

CryptoRodeo avatar Apr 07 '25 13:04 CryptoRodeo

Closing as indicated as fixed in https://github.com/janus-idp/backstage-plugins/issues/1286#issuecomment-2783309948. As that plugin has since migrated, any new issues should be opened at https://github.com/backstage/community-plugins.

BethGriggs avatar Apr 08 '25 19:04 BethGriggs