Skip to content

Commit 2011bd3

Browse files
authored
feat(explorer): New minified mode (#98736)
New UI for low-screen-space mode <img width="930" height="141" alt="Screenshot 2025-09-03 at 11 12 15 AM" src="https://github.com/user-attachments/assets/e3939210-87a5-4e38-aab0-04bbdc7ca9ca" /> <img width="845" height="116" alt="Screenshot 2025-09-03 at 11 12 26 AM" src="https://github.com/user-attachments/assets/2bc6cd3b-6f47-4468-a6d9-0ae71c7f37d5" />
1 parent f2434b7 commit 2011bd3

File tree

4 files changed

+421
-46
lines changed

4 files changed

+421
-46
lines changed

static/app/views/seerExplorer/explorerPanel.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ function ExplorerPanel({isVisible = false}: ExplorerPanelProps) {
2525
const blockRefs = useRef<Array<HTMLDivElement | null>>([]);
2626

2727
// Custom hooks
28-
const {panelSize, handleMaxSize, handleMedSize, handleMinSize, handleMinPanelClick} =
29-
usePanelSizing();
28+
const {panelSize, handleMaxSize, handleMedSize, handleMinSize} = usePanelSizing();
3029
const {sessionData, sendMessage, deleteFromIndex, startNewSession, isPolling} =
3130
useSeerExplorer();
3231

@@ -129,7 +128,13 @@ function ExplorerPanel({isVisible = false}: ExplorerPanelProps) {
129128
<PanelContainers
130129
isOpen={isOpen}
131130
panelSize={panelSize}
132-
onMinPanelClick={handleMinPanelClick}
131+
blocks={blocks}
132+
onSubmit={sendMessage}
133+
isPolling={isPolling}
134+
onMaxSize={handleMaxSize}
135+
onMedSize={handleMedSize}
136+
onMinSize={handleMinSize}
137+
onClear={startNewSession}
133138
>
134139
<BlocksContainer ref={scrollContainerRef}>
135140
{blocks.length === 0 ? (

static/app/views/seerExplorer/hooks/usePanelSizing.tsx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,23 @@ import type {PanelSize} from 'sentry/views/seerExplorer/types';
44

55
export function usePanelSizing() {
66
const [panelSize, setPanelSize] = useState<PanelSize>('med');
7-
const [lastNonMinSize, setLastNonMinSize] = useState<'max' | 'med'>('med');
87

98
const handleMaxSize = useCallback(() => {
109
setPanelSize('max');
11-
setLastNonMinSize('max');
1210
}, []);
1311

1412
const handleMedSize = useCallback(() => {
1513
setPanelSize('med');
16-
setLastNonMinSize('med');
1714
}, []);
1815

1916
const handleMinSize = useCallback(() => {
2017
setPanelSize('min');
2118
}, []);
2219

23-
const handleMinPanelClick = useCallback(() => {
24-
setPanelSize(lastNonMinSize);
25-
}, [lastNonMinSize]);
26-
2720
return {
2821
panelSize,
2922
handleMaxSize,
3023
handleMedSize,
3124
handleMinSize,
32-
handleMinPanelClick,
3325
};
3426
}

0 commit comments

Comments
 (0)