Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Developer Extension improvements #2516

Merged
merged 18 commits into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 2 additions & 0 deletions developer-extension/src/panel/components/json.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

.valueChildrenIndent {
position: absolute;
z-index: var(--dd-json-z-index);
left: 0px;
width: var(--indent);

Expand Down Expand Up @@ -62,4 +63,5 @@

.jsonLine[data-floating] {
position: absolute;
z-index: var(--dd-json-z-index);
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
--vertical-padding: 7px;

position: fixed;

z-index: var(--dd-column-drag-ghost-z-index);

opacity: 0.5;
border-radius: var(--mantine-radius-sm);
top: var(--drag-target-top);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,23 @@
.root {
margin: 0 var(--mantine-spacing-md) var(--mantine-spacing-md) var(--mantine-spacing-md);
border: 1px solid var(--dd-border-color);
border-radius: var(--mantine-radius-md);
}

.root thead {
z-index: var(--dd-events-list-header-z-index);
}

/*
BenoitZugmeyer marked this conversation as resolved.
Show resolved Hide resolved
When the header is positioned as 'sticky', its bottom border disappears when scrolled down,
making difficult to differentiate the header from the rows. This pseudo-element is used to
draw a border at the bottom of the header, so that it is always visible.
*/
.root thead::after {
content: '';
border-bottom: 1px solid var(--dd-border-color);
width: 100%;
display: block;
position: absolute;
margin-top: -1px;
}

.addColumnCell {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { OptionsFilter } from '@mantine/core'
import { Popover, Box, Text, Button, Flex, Autocomplete, Table, CloseButton } from '@mantine/core'
import { Popover, Text, Button, Flex, Autocomplete, Table, CloseButton } from '@mantine/core'
import React, { useMemo, useRef, useState } from 'react'
import type { EventFilters, FacetRegistry } from '../../../hooks/useEvents'
import type { SdkEvent } from '../../../sdkEvent'
Expand All @@ -26,8 +26,8 @@ export function EventsList({
const headerRowRef = useRef<HTMLTableRowElement>(null)

return (
<Box className={classes.root}>
<Table>
<div className={classes.root}>
<Table stickyHeader>
<Table.Thead>
<Table.Tr ref={headerRowRef}>
{columns.map((column) => (
Expand Down Expand Up @@ -58,7 +58,7 @@ export function EventsList({
</Table>

<ColumnDrag columns={columns} onColumnsChange={onColumnsChange} headerRowRef={headerRowRef} />
</Box>
</div>
)
}

Expand Down
7 changes: 7 additions & 0 deletions developer-extension/src/panel/global.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
:root {
/* To keep z-index management simple, define all z-index values here, in ascending order */
Copy link

Choose a reason for hiding this comment

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

👍

--dd-json-z-index: 0;
--dd-events-list-header-z-index: 1;
--dd-column-drag-ghost-z-index: 2;
}

/*
* Define the main border color to be used across the extension. It should match the color used by
* Mantine, for example in the tabs component:
Expand Down