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
8 changes: 8 additions & 0 deletions .changeset/tall-teachers-stare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@spotlightjs/spotlight': patch
'@spotlightjs/electron': patch
'@spotlightjs/overlay': patch
'@spotlightjs/astro': patch
---

Better auto collapsing logic for large or deep span trees
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
const containerRef = useRef<HTMLLIElement>(null);
const childrenCount = span.children ? span.children.length : 0;
const [isItemCollapsed, setIsItemCollapsed] = useState(
(span.transaction && totalTransactions > 1 && depth !== 1) || depth >= 15 || childrenCount > 10,
((span.transaction && totalTransactions > 1) || depth >= 10 || childrenCount > 10) && depth !== 1,
);

Check warning on line 37 in packages/overlay/src/integrations/sentry/components/explore/traces/spans/SpanItem.tsx

View check run for this annotation

Codecov / codecov/patch

packages/overlay/src/integrations/sentry/components/explore/traces/spans/SpanItem.tsx#L36-L37

Added lines #L36 - L37 were not covered by tests
const [isResizing, setIsResizing] = useState(false);

const spanDuration = span.timestamp - span.start_timestamp;
Expand Down
4 changes: 2 additions & 2 deletions packages/overlay/src/ui/SidePanel/SidePanel.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ComponentPropsWithoutRef, type ReactNode } from 'react';
import type { ComponentPropsWithoutRef, ReactNode } from 'react';
import { Link, useNavigate } from 'react-router-dom';

export type SidePanelProps = Omit<ComponentPropsWithoutRef<'div'>, 'className'> & {
Expand Down Expand Up @@ -34,7 +34,7 @@ export default function SidePanel(props: SidePanelProps) {
const navigateTo = useNavigate();
return (
<div
className="fixed bottom-0 left-0 right-0 top-0 z-10 bg-black bg-opacity-30"
className="fixed bottom-0 left-0 right-0 top-0 z-10 bg-black bg-opacity-30"
onClick={() => navigateTo(props.backto)}
>
<div
Expand Down
Loading