backstage-plugins
backstage-plugins copied to clipboard
Tekton Plugin - Logo and Grafana Iframe Shrink Unexpectedly with Added Code
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?
- Install the plugin
- Add de code snippet
- 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
Without tektonContent
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';
Hi @angeelsanchez , can you check if you still experience this issue with the latest main branch code?
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.
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.