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

feat: (scenes-react) - VizPanel add missing props and tests #998

Merged
merged 7 commits into from
Dec 12, 2024

Conversation

L2D2Grafana
Copy link
Contributor

@L2D2Grafana L2D2Grafana commented Dec 11, 2024

Description

  • @scenes-react: Epic follow-up issues & tasks #761
  • VizPanel add missing props
  • Naive attempt at adding missing VizPanel props. Perhaps more knowledgable people would know how to automatically add the VizPanelState from scenes. It looks like there might be some newer props in VizPanelState already
seriesLimit?: number;
seriesLimitShowAll?: boolean;
collapsible?: boolean;
collapsed?: boolean;
  • The grafana-attributions-app was experimenting using scenes react, but almost every panel ended up needed something from the missing props 😆 .
📦 Published PR as canary version: 5.31.0--canary.998.12301751531.0

✨ Test out this PR locally via:

npm install @grafana/[email protected]
npm install @grafana/[email protected]
# or 
yarn add @grafana/[email protected]
yarn add @grafana/[email protected]

hoverHeader?: boolean;
hoverHeaderOffset?: number;
menu?: VizPanelMenu;
titleItems?: React.ReactNode | SceneObject | SceneObject[];
Copy link
Member

Choose a reason for hiding this comment

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

Can we restrict this to only react elements?

@gtk-grafana gtk-grafana added release Create a release when this pr is merged minor Increment the minor version when merged labels Dec 11, 2024

const { getByText } = render(
<TestContextProvider value={scene}>
<VizPanel title="Test" titleItems={titleItems} viz={viz} />

This comment was marked as outdated.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ignore the above, I got this working locally in the browser and everything works as expected, must be something in the test env that is keeping the panel from rendering

@L2D2Grafana L2D2Grafana merged commit 269da14 into main Dec 12, 2024
5 checks passed
@L2D2Grafana L2D2Grafana deleted the l2d2/@scenes-react-viz-panel-missing-props branch December 12, 2024 17:53
@scenes-repo-bot-access-token
Copy link

🚀 PR was released in v5.31.0 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor Increment the minor version when merged release Create a release when this pr is merged released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants