Skip to content

Commit 23efd6f

Browse files
authored
feat(ourlogs): Add a dark background to the logs data section (#92321)
![Screenshot 2025-05-27 at 12 08 46 PM](https://github.com/user-attachments/assets/2a1ccf68-3884-45c7-8da5-984d4b8ed071)
1 parent 716ecaf commit 23efd6f

File tree

2 files changed

+28
-2
lines changed

2 files changed

+28
-2
lines changed

static/app/views/explore/logs/logsTab.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,14 @@ import {HiddenColumnEditorLogFields} from 'sentry/views/explore/logs/constants';
3838
import {AutorefreshToggle} from 'sentry/views/explore/logs/logsAutoRefresh';
3939
import {LogsGraph} from 'sentry/views/explore/logs/logsGraph';
4040
import {
41+
BottomSectionBody,
4142
FilterBarContainer,
4243
LogsGraphContainer,
4344
LogsItemContainer,
4445
LogsTableActionsContainer,
4546
StyledPageFilterBar,
4647
TableActionsContainer,
48+
TopSectionBody,
4749
} from 'sentry/views/explore/logs/styles';
4850
import {LogsInfiniteTable as LogsInfiniteTable} from 'sentry/views/explore/logs/tables/logsInfiniteTable';
4951
import {LogsTable} from 'sentry/views/explore/logs/tables/logsTable';
@@ -153,7 +155,7 @@ export function LogsTabContent({
153155
}, [fields, setFields, stringAttributes, numberAttributes]);
154156
return (
155157
<SearchQueryBuilderProvider {...searchQueryBuilderProps}>
156-
<Layout.Body noRowGap>
158+
<TopSectionBody noRowGap>
157159
<Layout.Main fullWidth>
158160
<FilterBarContainer>
159161
<StyledPageFilterBar condensed>
@@ -178,6 +180,10 @@ export function LogsTabContent({
178180
searchBarWidthOffset={columnEditorButtonRef.current?.clientWidth}
179181
/>
180182
</SchemaHintsSection>
183+
</Layout.Main>
184+
</TopSectionBody>
185+
<BottomSectionBody noRowGap>
186+
<Layout.Main fullWidth>
181187
<LogsGraphContainer>
182188
<LogsGraph timeseriesResult={timeseriesResult} />
183189
</LogsGraphContainer>
@@ -209,7 +215,7 @@ export function LogsTabContent({
209215
</Feature>
210216
</LogsItemContainer>
211217
</Layout.Main>
212-
</Layout.Body>
218+
</BottomSectionBody>
213219
</SearchQueryBuilderProvider>
214220
);
215221
}

static/app/views/explore/logs/styles.tsx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import styled from '@emotion/styled';
44
import {Button} from 'sentry/components/core/button';
55
import {GRID_BODY_ROW_HEIGHT} from 'sentry/components/gridEditable/styles';
66
import {HighlightComponent} from 'sentry/components/highlight';
7+
import {Body} from 'sentry/components/layouts/thirds';
78
import PageFilterBar from 'sentry/components/organizations/pageFilterBar';
89
import Panel from 'sentry/components/panels/panel';
910
import {space} from 'sentry/styles/space';
@@ -299,3 +300,22 @@ export function getLogColors(level: SeverityLevel, theme: Theme) {
299300
throw new Error(`Invalid log type, got ${level}`);
300301
}
301302
}
303+
304+
export const TopSectionBody = styled(Body)`
305+
padding-bottom: 0;
306+
flex: 0 0 auto;
307+
308+
@media (min-width: ${p => p.theme.breakpoints.medium}) {
309+
padding-bottom: ${space(2)};
310+
}
311+
`;
312+
313+
export const BottomSectionBody = styled(Body)`
314+
padding-top: 0;
315+
background-color: ${p => p.theme.backgroundSecondary};
316+
border-top: 1px solid ${p => p.theme.border};
317+
318+
@media (min-width: ${p => p.theme.breakpoints.medium}) {
319+
padding-top: ${space(1)};
320+
}
321+
`;

0 commit comments

Comments
 (0)