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

Integration tweaks #137

Merged
merged 3 commits into from
Apr 3, 2020
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
Binary file modified src/panel/__image_snapshots__/Tick - basic-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/panel/pages/events/Timeline.fixture.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const defaultEvents: DebugEvent[] = [
{
type: "debug",
data: {
type: "fetchResponse",
type: "fetchSuccess",
message: "The fetch request succeeded",
operation: operation1,
source: "fetchExchange",
Expand Down
34 changes: 20 additions & 14 deletions src/panel/pages/events/Timeline.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,6 @@ export const Timeline: FC = () => {
);
};

const SPACING = 40;
const ROW_PADDING = 8;

const Page = styled(Background)`
background-color: ${(p) => p.theme.dark["0"]};
`;
Expand All @@ -155,26 +152,35 @@ const TimelineContainer = styled.div`
`;

const TimelineIcons = styled.div`
background-color: ${(p) => p.theme.dark["-3"]};
display: grid;
justify-content: center;
grid-template-rows: 20px;
grid-row-gap: ${ROW_PADDING * 2}px;
/* TimelineList outer margin + inner margin + padding */
padding: ${SPACING + ROW_PADDING + 30}px 0;
position: relative;
width: ${SPACING}px;
display: flex;
flex-direction: column;
align-items: center;
width: 40px;
z-index: 1;

> :first-child {
margin-top: 78px;
}

> * {
margin-bottom: 16px;
}

> *:after {
content: "";
width: 200px;
height: 200px;
}
`;

const TimelineList = styled.div`
cursor: grab;
display: flex;
width: calc(100% - ${SPACING}px);
flex-direction: column;
flex-grow: 1;
position: relative;
margin: ${SPACING}px 0;
padding: 40px 0;
overflow: hidden;
&:active {
cursor: grabbing;
}
Expand Down
3 changes: 1 addition & 2 deletions src/panel/pages/events/components/Tick.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,14 @@ export const Tick = styled.div<{ label: string }>`
display: block;
text-align: center;
width: 100px;
margin-top: -25px;
margin-left: -50px;
}

&:after {
content: "";
position: absolute;
width: 2px;
top: 0;
top: 25px;
bottom: 0;
background: ${(props) => props.theme.dark["+1"]};
opacity: 0.3;
Expand Down
2 changes: 1 addition & 1 deletion src/panel/pages/events/components/TimelineRow.fixture.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export default {
source: "devtoolsExchange",
},
{
type: "fetchResponse",
type: "fetchSuccess",
message: "A listener was added to the stream",
timestamp: Date.now() + 65000,
source: "devtoolsExchange",
Expand Down
2 changes: 1 addition & 1 deletion src/panel/pages/events/components/TimelineRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export const TimelineRow: FC<
}

// Response
if (e.type === "fetchResponse") {
if (e.type === "fetchSuccess") {
return {
start: undefined,
elements: [
Expand Down