@parca/profile 0.16.274 → 0.16.275

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,10 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [0.16.275](https://github.com/parca-dev/parca/compare/@parca/profile@0.16.274...@parca/profile@0.16.275) (2023-10-12)
7
+
8
+ **Note:** Version bump only for package @parca/profile
9
+
6
10
  ## [0.16.274](https://github.com/parca-dev/parca/compare/@parca/profile@0.16.273...@parca/profile@0.16.274) (2023-10-10)
7
11
 
8
12
  **Note:** Version bump only for package @parca/profile
@@ -14,12 +14,13 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
14
14
  import React, { useState } from 'react';
15
15
  import { Icon } from '@iconify/react';
16
16
  import cx from 'classnames';
17
- import { IconButton } from '@parca/components';
17
+ import { IconButton, useParcaContext } from '@parca/components';
18
18
  import { CloseIcon } from '@parca/icons';
19
19
  import ViewSelector from './ViewSelector';
20
20
  export const VisualizationPanel = React.memo(function VisualizationPanel({ dashboardItem, index, isMultiPanelView, handleClosePanel, navigateTo, dragHandleProps, getDashboardItemByType, }) {
21
21
  const [actionButtons, setActionButtons] = useState(_jsx(_Fragment, {}));
22
- return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex w-full items-start justify-end gap-2 pb-2", children: [_jsxs("div", { className: "flex w-full items-start justify-between", children: [_jsxs("div", { className: "flex items-start", children: [_jsx("div", { className: cx(isMultiPanelView ? '' : 'hidden', 'flex items-center'), ...dragHandleProps, children: _jsx(Icon, { className: "text-xl", icon: "material-symbols:drag-indicator" }) }), _jsx("div", { children: actionButtons })] }), _jsx(ViewSelector, { defaultValue: dashboardItem, navigateTo: navigateTo, position: index })] }), isMultiPanelView && (_jsx(IconButton, { className: "py-0", onClick: () => handleClosePanel(dashboardItem), icon: _jsx(CloseIcon, {}) }))] }), getDashboardItemByType({
22
+ const { flamegraphHint } = useParcaContext();
23
+ return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex w-full items-start justify-end gap-2 pb-2", children: [_jsxs("div", { className: "flex w-full items-start justify-between", children: [_jsxs("div", { className: "flex items-start", children: [_jsx("div", { className: cx(isMultiPanelView ? '' : 'hidden', 'flex items-center'), ...dragHandleProps, children: _jsx(Icon, { className: "text-xl", icon: "material-symbols:drag-indicator" }) }), _jsx("div", { children: actionButtons })] }), _jsxs("div", { className: "flex flex-col items-end gap-4", children: [_jsx(ViewSelector, { defaultValue: dashboardItem, navigateTo: navigateTo, position: index }), _jsx("div", { className: "px-2", children: dashboardItem === 'icicle' && flamegraphHint != null ? flamegraphHint : null })] })] }), isMultiPanelView && (_jsx(IconButton, { className: "py-0", onClick: () => handleClosePanel(dashboardItem), icon: _jsx(CloseIcon, {}) }))] }), getDashboardItemByType({
23
24
  type: dashboardItem,
24
25
  isHalfScreen: isMultiPanelView,
25
26
  setActionButtons,
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@parca/profile",
3
- "version": "0.16.274",
3
+ "version": "0.16.275",
4
4
  "description": "Profile viewing libraries",
5
5
  "dependencies": {
6
6
  "@parca/client": "^0.16.93",
7
- "@parca/components": "^0.16.209",
7
+ "@parca/components": "^0.16.210",
8
8
  "@parca/dynamicsize": "^0.16.59",
9
9
  "@parca/hooks": "^0.0.30",
10
10
  "@parca/parser": "^0.16.63",
@@ -50,5 +50,5 @@
50
50
  "access": "public",
51
51
  "registry": "https://registry.npmjs.org/"
52
52
  },
53
- "gitHead": "d714a37a6f23ede80f91aad295c85717c8ca8a32"
53
+ "gitHead": "fa076f59ab1f08cde984efa514cd0a78d74357fd"
54
54
  }
@@ -17,7 +17,7 @@ import {Icon} from '@iconify/react';
17
17
  import cx from 'classnames';
18
18
  import type {DraggableProvidedDragHandleProps} from 'react-beautiful-dnd';
19
19
 
20
- import {IconButton} from '@parca/components';
20
+ import {IconButton, useParcaContext} from '@parca/components';
21
21
  import {CloseIcon} from '@parca/icons';
22
22
  import type {NavigateFunction} from '@parca/utilities';
23
23
 
@@ -47,6 +47,7 @@ export const VisualizationPanel = React.memo(function VisualizationPanel({
47
47
  getDashboardItemByType,
48
48
  }: Props): JSX.Element {
49
49
  const [actionButtons, setActionButtons] = useState<JSX.Element>(<></>);
50
+ const {flamegraphHint} = useParcaContext();
50
51
 
51
52
  return (
52
53
  <>
@@ -61,7 +62,12 @@ export const VisualizationPanel = React.memo(function VisualizationPanel({
61
62
  </div>
62
63
  <div>{actionButtons}</div>
63
64
  </div>
64
- <ViewSelector defaultValue={dashboardItem} navigateTo={navigateTo} position={index} />
65
+ <div className="flex flex-col items-end gap-4">
66
+ <ViewSelector defaultValue={dashboardItem} navigateTo={navigateTo} position={index} />
67
+ <div className="px-2">
68
+ {dashboardItem === 'icicle' && flamegraphHint != null ? flamegraphHint : null}
69
+ </div>
70
+ </div>
65
71
  </div>
66
72
  {isMultiPanelView && (
67
73
  <IconButton