Skip to content
This repository has been archived by the owner on Dec 6, 2023. It is now read-only.

Commit

Permalink
feat: Reorganized the files a bit for future work
Browse files Browse the repository at this point in the history
  • Loading branch information
rmevans9 authored Dec 15, 2019
1 parent 1780807 commit 045a06f
Show file tree
Hide file tree
Showing 58 changed files with 58 additions and 44 deletions.
2 changes: 1 addition & 1 deletion .storybook/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from "react"
import { configure, addDecorator } from "@storybook/react"
import { withKnobs } from "@storybook/addon-knobs"

import ReactotronProvider from "../src/ReactotronProvider"
import ReactotronProvider from "../src/components/ReactotronProvider"

import theme from "../src/theme"

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"@types/react-modal": "^3.10.0",
"@types/react-motion": "^0.0.29",
"@types/react-tooltip": "^3.9.3",
"@types/stringify-object": "^3.2.0",
"@types/styled-components": "^4.1.19",
"@typescript-eslint/eslint-plugin": "^2.5.0",
"@typescript-eslint/parser": "^2.5.0",
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react"
import styled from "styled-components"
import makeTable from "../utils/makeTable"
import isShallow from "../utils/isShallow"
import makeTable from "../../utils/makeTable"
import isShallow from "../../utils/isShallow"
import TreeView from "../TreeView"

const NullContainer = styled.div`
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { FunctionComponent } from "react"
import styled, { ThemeProvider } from "styled-components"

import theme from "../theme"
import theme from "../../theme"

const ReactotronContainer = styled.div`
font-family: ${props => props.theme.fontFamily};
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { format } from "date-fns"

const Container = styled.div`
position: relative;
font-family: "Fira Code", "SF Mono", "Consolas", "Segoe UI", "Roboto", "-apple-system",
"Helvetica Neue", sans-serif;
`
const LeftDateContainer = styled.span`
color: ${props => props.theme.highlight};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from "react"
import JSONTree from "react-json-tree"
import styled from "styled-components"

import baseTheme from "../theme"
import baseTheme from "../../theme"

// TODO: Ripping this right from reactotron right now... should probably be better.
const theme = {
Expand Down
30 changes: 17 additions & 13 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,23 @@
import theme from "./theme"

// Components
import ContentView from "./ContentView"
import DispatchActionModal from "./DispatchActionModal"
import Header from "./Header"
import Modal from "./Modal"
import ReactotronProvider from "./ReactotronProvider"
import SubscriptionAddModal from "./SubscriptionAddModal"
import ActionButton from "./ActionButton"
import TimelineCommand from "./TimelineCommand"
import timelineCommandResolver from "./TimelineCommands"
import TimelineCommandTabButton from "./TimelineCommandTabButton"
import TimelineFilterModal from "./TimelineFilterModal"
import Timestamp from "./Timestamp"
import TreeView from "./TreeView"
import ContentView from "./components/ContentView"
import Header from "./components/Header"
import Modal from "./components/Modal"
import ReactotronProvider from "./components/ReactotronProvider"
import ActionButton from "./components/ActionButton"
import TimelineCommand from "./components/TimelineCommand"
import TimelineCommandTabButton from "./components/TimelineCommandTabButton"
import Timestamp from "./components/Timestamp"
import TreeView from "./components/TreeView"

// Modals
import DispatchActionModal from "./modals/DispatchActionModal"
import SubscriptionAddModal from "./modals/SubscriptionAddModal"
import TimelineFilterModal from "./modals/TimelineFilterModal"

// Timeline Commands
import timelineCommandResolver from "./timelineCommands"

// Utils
import repairSerialization from "./utils/repair-serialization"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { FunctionComponent, useRef, useState, useCallback, useEffect } from "react"
import styled from "styled-components"

import Modal, { KeystrokeContainer, Keystroke } from "../Modal"
import Modal, { KeystrokeContainer, Keystroke } from "../../components/Modal"

const InstructionText = styled.div`
text-align: left;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { FunctionComponent, useRef, useState, useCallback } from "react"
import styled from "styled-components"

import Modal, { KeystrokeContainer, Keystroke } from "../Modal"
import Modal, { KeystrokeContainer, Keystroke } from "../../components/Modal"

const InstructionText = styled.div`
text-align: left;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react"

import TimelineFilterModal from "./index"
import { CommandType } from "../types"
import { CommandType } from "../../types"

export default {
title: "Timeline Filter Modal",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React, { FunctionComponent } from "react"
import styled from "styled-components"

import Modal from "../Modal"
import Checkbox from "../Checkbox"
import { CommandType } from "../types"
import Modal from "../../components/Modal"
import Checkbox from "../../components/Checkbox"
import { CommandType } from "../../types"

const GROUPS = [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import React, { useState, FunctionComponent } from "react"
import styled from "styled-components"
import { MdCallReceived, MdCallMade, MdReceipt, MdContentCopy } from "react-icons/md"

import TimelineCommand from "../../TimelineCommand"
import TimelineCommandTabButton from "../../TimelineCommandTabButton"
import ContentView from "../../ContentView"
import TimelineCommand from "../../components/TimelineCommand"
import TimelineCommandTabButton from "../../components/TimelineCommandTabButton"
import ContentView from "../../components/ContentView"
import { apiToMarkdown } from "../../utils/api-to-markdown"
import { apiRequestToCurl } from "../../utils/api-to-curl"
import { TimelineCommandProps, buildTimelineCommand } from "../BaseCommand"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { FunctionComponent } from "react"

import TimelineCommand from "../../TimelineCommand"
import TimelineCommand from "../../components/TimelineCommand"
import makeTable from "../../utils/makeTable"
import { TimelineCommandProps, buildTimelineCommand } from "../BaseCommand"

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { FunctionComponent } from "react"
import styled from "styled-components"

import TimelineCommand from "../../TimelineCommand"
import TimelineCommand from "../../components/TimelineCommand"
import { TimelineCommandProps, buildTimelineCommand } from "../BaseCommand"

const NameContainer = styled.div`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { FunctionComponent } from "react"

import TimelineCommand from "../../TimelineCommand"
import TimelineCommand from "../../components/TimelineCommand"
import makeTable from "../../utils/makeTable"
import { TimelineCommandProps, buildTimelineCommand } from "../BaseCommand"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import React, { FunctionComponent } from "react"
import styled from "styled-components"
import { MdContentCopy } from "react-icons/md"

import TimelineCommand from "../../TimelineCommand"
import TimelineCommand from "../../components/TimelineCommand"
import ContentView from "../../components/ContentView"
import { TimelineCommandProps, buildTimelineCommand } from "../BaseCommand"
import ContentView from "../../ContentView"

const ImageContainer = styled.div``

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { FunctionComponent } from "react"
import styled from "styled-components"

import TimelineCommand from "../../TimelineCommand"
import TimelineCommand from "../../components/TimelineCommand"
import { TimelineCommandProps, buildTimelineCommand } from "../BaseCommand"

const Image = styled.img`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import styled from "styled-components"
import { MdContentCopy } from "react-icons/md"
import stringifyObject from "stringify-object"

import TimelineCommand from "../../TimelineCommand"
import TimelineCommand from "../../components/TimelineCommand"
import ContentView from "../../components/ContentView"
import { TimelineCommandProps, buildTimelineCommand } from "../BaseCommand"
import ContentView from "../../ContentView"

const SOURCE_LINES_UP = 3
const SOURCE_LINES_DOWN = 3
Expand Down Expand Up @@ -200,6 +200,8 @@ function getPreview(message: string | object | boolean | number) {
} else if (message === null || typeof message === "boolean" || typeof message === "number") {
return String(message)
}

return message;
}

function useFileSource(stack, readFile) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import {
MdError as IconStatusRejected,
} from "react-icons/md"

import TimelineCommand from "../../TimelineCommand"
import TimelineCommand from "../../components/TimelineCommand"
import ContentView from "../../components/ContentView"
import { TimelineCommandProps } from "../BaseCommand"
import ContentView from "../../ContentView"

const STATUS_MAP = {
RESOLVED: <IconStatusResolved size={18} />,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import styled from "styled-components"
import { MdRepeat, MdCode } from "react-icons/md"
import stringifyObject from "stringify-object"

import TimelineCommand from "../../TimelineCommand"
import ContentView from "../../ContentView"
import TimelineCommand from "../../components/TimelineCommand"
import ContentView from "../../components/ContentView"
import { TimelineCommandProps, buildTimelineCommand } from "../BaseCommand"

const NameContainer = styled.div`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { FunctionComponent } from "react"
import styled from "styled-components"

import TimelineCommand from "../../TimelineCommand"
import TimelineCommand from "../../components/TimelineCommand"
import { TimelineCommandProps, buildTimelineCommand } from "../BaseCommand"

const PathLabel = styled.div`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React, { FunctionComponent } from "react"

import TimelineCommand from "../../TimelineCommand"
import TimelineCommand from "../../components/TimelineCommand"
import ContentView from "../../components/ContentView"
import { TimelineCommandProps, buildTimelineCommand } from "../BaseCommand"
import ContentView from "../../ContentView"

interface StateValuesChangePayload {
added: any
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React, { FunctionComponent } from "react"
import styled from "styled-components"

import TimelineCommand from "../../TimelineCommand"
import TimelineCommand from "../../components/TimelineCommand"
import ContentView from "../../components/ContentView"
import { TimelineCommandProps, buildTimelineCommand } from "../BaseCommand"
import ContentView from "../../ContentView"

const PathLabel = styled.div`
padding-bottom: 10px;
Expand Down
File renamed without changes.
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2074,6 +2074,11 @@
resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-1.0.1.tgz#0a851d3bd96498fa25c33ab7278ed3bd65f06c3e"
integrity sha512-l42BggppR6zLmpfU6fq9HEa2oGPEI8yrSPL3GITjfRInppYFahObbIQOQK3UGxEnyQpltZLaPe75046NOZQikw==

"@types/stringify-object@^3.2.0":
version "3.2.0"
resolved "https://registry.yarnpkg.com/@types/stringify-object/-/stringify-object-3.2.0.tgz#17242cea3788eaea1ab3295dfee6da89a4f19a23"
integrity sha512-VUrjNFiyn1KcNV6nDf2L12pOfNLBQsUUvlniQymEwHCCX7XMa2OWIjr9Fgr1RoDWeCcfj7sMZFB6B3FfGD+Jdw==

"@types/styled-components@^4.1.19":
version "4.1.19"
resolved "https://registry.yarnpkg.com/@types/styled-components/-/styled-components-4.1.19.tgz#535b455d7744fda1608c605df82c0800eda61a09"
Expand Down

0 comments on commit 045a06f

Please sign in to comment.