Skip to content

ref(insights): migrate screen load charts to widget platform #92491

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

Merged
Merged
2 changes: 1 addition & 1 deletion static/app/views/dashboards/widgets/widget/widget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ const TitleHoverItems = styled('div')`
transition: opacity 0.1s;
`;

const Frame = styled('div')<{
export const Frame = styled('div')<{
borderless?: boolean;
height?: number;
revealActions?: 'always' | 'hover';
Expand Down
10 changes: 7 additions & 3 deletions static/app/views/insights/common/components/miniChartPanel.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import styled from '@emotion/styled';

import Panel from 'sentry/components/panels/panel';
import {space} from 'sentry/styles/space';
import textStyles from 'sentry/styles/text';
import {Frame} from 'sentry/views/dashboards/widgets/widget/widget';

type Props = {
children: React.ReactNode;
Expand All @@ -13,7 +13,7 @@ type Props = {

export default function MiniChartPanel({title, children, button, subtitle}: Props) {
return (
<Panel>
<StyledFrame>
<PanelBody>
{(title || button || subtitle) && (
<HeaderContainer>
Expand All @@ -26,10 +26,14 @@ export default function MiniChartPanel({title, children, button, subtitle}: Prop
)}
{children}
</PanelBody>
</Panel>
</StyledFrame>
);
}

const StyledFrame = styled(Frame)`
height: 100%;
`;

const ChartLabel = styled('p')`
/* @TODO(jonasbadalic) This should be a title component and not a p */
font-size: 1rem;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function SummaryWidgets({additionalFilters}: any) {
<div style={{gridArea: '1 / 2'}}>
<DeviceClassBreakdownBarChart
additionalFilters={additionalFilters}
chartHeight={140}
chartHeight={150}
/>
</div>
</WidgetLayout>
Expand Down
Loading
Loading