Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/silver-rings-ring.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@hyperdx/app": patch
---

fix: Fix a couple of visual bugs in Chart titles
9 changes: 5 additions & 4 deletions packages/app/src/ClickhousePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
Grid,
Group,
SegmentedControl,
Stack,
Tabs,
Text,
Tooltip,
Expand Down Expand Up @@ -196,14 +197,14 @@ function InfrastructureTab({
<ChartBox style={{ height: 400 }}>
<DBTimeChart
title={
<>
<Stack gap={0}>
<Text size="sm" mb="xs">
Network
</Text>
<Text size="xs" mb="sm">
Network activity for the entire machine, not only Clickhouse.
</Text>
</>
</Stack>
}
config={{
select: [
Expand Down Expand Up @@ -357,7 +358,7 @@ function InsertsTab({
<ChartBox style={{ height: 400 }}>
<DBTableChart
title={
<>
<Stack gap={0}>
<Text size="sm" mb="sm">
Active Parts Per Partition
</Text>
Expand All @@ -366,7 +367,7 @@ function InsertsTab({
throttle inserts after 1,000 parts per partition and stop
inserts at 3,000 parts per partition.
</Text>
</>
</Stack>
}
config={{
dateRange: searchedTimeRange,
Expand Down
5 changes: 2 additions & 3 deletions packages/app/src/DBDashboardPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -225,11 +225,12 @@ const Tile = forwardRef(
}, [alert]);

const hoverToolbar = useMemo(() => {
return hovered ? (
return (
<Flex
gap="0px"
onMouseDown={e => e.stopPropagation()}
key="hover-toolbar"
style={{ visibility: hovered ? 'visible' : 'hidden' }}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Visually hiding this instead of conditionally rendering it, so that the title and tile layout doesn't shift when hovering on the tile.

>
{(chart.config.displayType === DisplayType.Line ||
chart.config.displayType === DisplayType.StackedBar) && (
Expand Down Expand Up @@ -286,8 +287,6 @@ const Tile = forwardRef(
<IconTrash size={14} />
</Button>
</Flex>
) : (
<Box h={22} key="hover-empty-box" />
);
}, [
alert,
Expand Down
18 changes: 15 additions & 3 deletions packages/app/src/components/charts/ChartContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,21 @@ function ChartContainer({
return (
<Stack h="100%" w="100%" style={{ flexGrow: 1 }}>
{(!!title || !!toolbarItems?.length) && (
<Group justify="space-between" align="start">
{title || <span />}
{toolbarItems && <Group>{toolbarItems}</Group>}
<Group justify="space-between" align="start" wrap="nowrap">
<span
style={{
flex: 1,
flexShrink: 1,
overflow: 'hidden',
}}
>
{title}
</span>
{toolbarItems && (
<Group flex={0} wrap="nowrap">
{toolbarItems}
</Group>
)}
</Group>
)}
{disableReactiveContainer ? (
Expand Down
7 changes: 6 additions & 1 deletion packages/app/src/components/charts/DisplaySwitcher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ function DisplaySwitcher<T extends string>({
options,
}: DisplaySwitcherProps<T>) {
return (
<Group className="bg-muted px-2 py-2 rounded fs-8" align="center" gap={0}>
<Group
className="bg-muted px-2 py-2 rounded fs-8"
align="center"
gap={0}
wrap="nowrap"
>
{options.map(({ icon, label, value: optionValue, disabled }) => (
<Tooltip label={label} key={optionValue}>
<ActionIcon
Expand Down
Loading