From e0ce61f112c90e7a22ca3cf2a329cff77466a9e8 Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Mon, 29 Oct 2018 12:29:20 +0100 Subject: [PATCH] resolve conflict with Logger name --- embark-ui/src/components/ContractDebugger.js | 2 +- embark-ui/src/components/ContractLayout.js | 6 +++--- embark-ui/src/components/ContractOverview.css | 5 +++++ embark-ui/src/components/ContractOverview.js | 13 +++++++------ .../{ContractLogger.js => ContractTransactions.js} | 6 +++--- embark-ui/src/components/FileExplorer.js | 6 +++--- embark-ui/src/components/TextEditorToolbar.js | 6 +++--- ...ntainer.js => ContractTransactionsContainer.js} | 14 +++++++------- embark-ui/src/containers/EditorContainer.css | 5 ----- embark-ui/src/containers/EditorContainer.js | 2 +- .../src/containers/TextEditorAsideContainer.js | 11 ++++++----- 11 files changed, 39 insertions(+), 37 deletions(-) rename embark-ui/src/components/{ContractLogger.js => ContractTransactions.js} (97%) rename embark-ui/src/containers/{ContractLoggerContainer.js => ContractTransactionsContainer.js} (79%) diff --git a/embark-ui/src/components/ContractDebugger.js b/embark-ui/src/components/ContractDebugger.js index b2f21773..71acac6b 100644 --- a/embark-ui/src/components/ContractDebugger.js +++ b/embark-ui/src/components/ContractDebugger.js @@ -64,7 +64,7 @@ class ContractDebugger extends Component {
Scopes
- { return (field.name === 'globals') }} /> + { return (field.name === 'globals'); }} />
diff --git a/embark-ui/src/components/ContractLayout.js b/embark-ui/src/components/ContractLayout.js index fbb32a94..6bd4b915 100644 --- a/embark-ui/src/components/ContractLayout.js +++ b/embark-ui/src/components/ContractLayout.js @@ -4,7 +4,7 @@ import { TabContent, TabPane, Nav, NavItem, NavLink, Card, CardBody, CardTitle } import classnames from 'classnames'; import ContractDetail from '../components/ContractDetail'; -import ContractLoggerContainer from '../containers/ContractLoggerContainer'; +import ContractTransactionsContainer from '../containers/ContractTransactionsContainer'; import ContractOverviewContainer from '../containers/ContractOverviewContainer'; import ContractDebuggerContainer from '../containers/ContractDebuggerContainer'; @@ -53,7 +53,7 @@ class ContractLayout extends React.Component { className={classnames({ active: this.state.activeTab === '3' })} onClick={() => { this.toggle('3'); }} > - Logger + Transactions @@ -73,7 +73,7 @@ class ContractLayout extends React.Component { - + diff --git a/embark-ui/src/components/ContractOverview.css b/embark-ui/src/components/ContractOverview.css index d5645d35..223847db 100644 --- a/embark-ui/src/components/ContractOverview.css +++ b/embark-ui/src/components/ContractOverview.css @@ -9,3 +9,8 @@ border: 0; box-shadow: none !important; } + +.contract-function-container .card-header.closed { + border-bottom: none; + border-radius: 0.25rem; +} diff --git a/embark-ui/src/components/ContractOverview.js b/embark-ui/src/components/ContractOverview.js index f12e4bb5..2c21bb73 100644 --- a/embark-ui/src/components/ContractOverview.js +++ b/embark-ui/src/components/ContractOverview.js @@ -97,12 +97,13 @@ class ContractFunction extends Component { render() { return ( - this.toggleFunction()}> + this.toggleFunction()}> {ContractFunction.isPureCall(this.props.method) && Boolean(this.props.method.inputs.length) && call diff --git a/embark-ui/src/components/ContractLogger.js b/embark-ui/src/components/ContractTransactions.js similarity index 97% rename from embark-ui/src/components/ContractLogger.js rename to embark-ui/src/components/ContractTransactions.js index cd828ba2..4d7029bc 100644 --- a/embark-ui/src/components/ContractLogger.js +++ b/embark-ui/src/components/ContractTransactions.js @@ -9,7 +9,7 @@ const CONSTRUCTOR = 'constructor'; const PURE = 'pure'; const VIEW = 'view'; -class ContractLogger extends React.Component { +class ContractTransactions extends React.Component { constructor(props) { super(props); this.state = {method: '', event: '', status: TX_STATES['Any']}; @@ -139,11 +139,11 @@ class ContractLogger extends React.Component { } } -ContractLogger.propTypes = { +ContractTransactions.propTypes = { contractLogs: PropTypes.array, contractEvents: PropTypes.array, contract: PropTypes.object.isRequired }; -export default ContractLogger; +export default ContractTransactions; diff --git a/embark-ui/src/components/FileExplorer.js b/embark-ui/src/components/FileExplorer.js index aebb995d..d9ff87a9 100644 --- a/embark-ui/src/components/FileExplorer.js +++ b/embark-ui/src/components/FileExplorer.js @@ -163,9 +163,9 @@ class FileExplorer extends React.Component { let newNodes; if (toggled) { newNodes = this.state.activeNodes; - newNodes.push(node) + newNodes.push(node); } else { - newNodes = this.state.activeNodes.filter(n => !this.nodeEquals(node, n)) + newNodes = this.state.activeNodes.filter(n => !this.nodeEquals(node, n)); } this.setState({activeNodes: newNodes}); } @@ -215,7 +215,7 @@ class FileExplorer extends React.Component { /> diff --git a/embark-ui/src/components/TextEditorToolbar.js b/embark-ui/src/components/TextEditorToolbar.js index 10b09819..f2366d31 100644 --- a/embark-ui/src/components/TextEditorToolbar.js +++ b/embark-ui/src/components/TextEditorToolbar.js @@ -7,7 +7,7 @@ import FontAwesomeIcon from 'react-fontawesome'; const TextEditorToolbarTabs = { Overview: 'overview', Detail: 'detail', - Logger: 'logger', + Transactions: 'transactions', Debugger: 'debugger', Browser: 'browser' }; @@ -41,8 +41,8 @@ class TextEditorToolbar extends Component { this.props.openAsideTab(TextEditorToolbarTabs.Detail)}> Details - this.props.openAsideTab(TextEditorToolbarTabs.Logger)}> - Logger + this.props.openAsideTab(TextEditorToolbarTabs.Transactions)}> + Transactions this.props.openAsideTab(TextEditorToolbarTabs.Debugger)}> Debugger diff --git a/embark-ui/src/containers/ContractLoggerContainer.js b/embark-ui/src/containers/ContractTransactionsContainer.js similarity index 79% rename from embark-ui/src/containers/ContractLoggerContainer.js rename to embark-ui/src/containers/ContractTransactionsContainer.js index 75c80943..f37aa9de 100644 --- a/embark-ui/src/containers/ContractLoggerContainer.js +++ b/embark-ui/src/containers/ContractTransactionsContainer.js @@ -3,11 +3,11 @@ import {connect} from 'react-redux'; import PropTypes from 'prop-types'; import {contractEvents as contractEventsAction, contractLogs as contractLogsAction, listenToContractLogs, listenToContractEvents} from '../actions'; -import ContractLogger from '../components/ContractLogger'; +import ContractTransactions from '../components/ContractTransactions'; import DataWrapper from "../components/DataWrapper"; import {getContractLogsByContract, getContractEventsByContract} from "../reducers/selectors"; -class ContractLoggerContainer extends Component { +class ContractTransactionsContainer extends Component { componentDidMount() { if (this.props.contractLogs.length === 0) { this.props.listenToContractLogs(); @@ -23,9 +23,9 @@ class ContractLoggerContainer extends Component { render() { return ( ( - + )} /> ); } @@ -38,7 +38,7 @@ function mapStateToProps(state, props) { }; } -ContractLoggerContainer.propTypes = { +ContractTransactionsContainer.propTypes = { contract: PropTypes.object, contractLogs: PropTypes.array, contractEvents: PropTypes.array, @@ -57,4 +57,4 @@ export default connect( fetchContractEvents: contractEventsAction.request, listenToContractEvents: listenToContractEvents } -)(ContractLoggerContainer); +)(ContractTransactionsContainer); diff --git a/embark-ui/src/containers/EditorContainer.css b/embark-ui/src/containers/EditorContainer.css index 780de85c..4793f550 100644 --- a/embark-ui/src/containers/EditorContainer.css +++ b/embark-ui/src/containers/EditorContainer.css @@ -25,8 +25,3 @@ overflow-x: hidden; overflow-y: auto; } - -.contract-function-container .card-header.closed { - border-bottom: none; - border-radius: 0.25rem; -} diff --git a/embark-ui/src/containers/EditorContainer.js b/embark-ui/src/containers/EditorContainer.js index 7e231bfc..489271b6 100644 --- a/embark-ui/src/containers/EditorContainer.js +++ b/embark-ui/src/containers/EditorContainer.js @@ -49,7 +49,7 @@ class EditorContainer extends React.Component { } textEditorMdSize() { - return this.state.currentAsideTab.length ? 7 : 10 + return this.state.currentAsideTab.length ? 7 : 10; } textEditorXsSize() { diff --git a/embark-ui/src/containers/TextEditorAsideContainer.js b/embark-ui/src/containers/TextEditorAsideContainer.js index 67fca99c..48e286ec 100644 --- a/embark-ui/src/containers/TextEditorAsideContainer.js +++ b/embark-ui/src/containers/TextEditorAsideContainer.js @@ -7,7 +7,7 @@ import Preview from '../components/Preview'; import {contracts as contractsAction} from '../actions'; import {getContractsByPath} from "../reducers/selectors"; import ContractDetail from '../components/ContractDetail'; -import ContractLoggerContainer from '../containers/ContractLoggerContainer'; +import ContractTransactionsContainer from './ContractTransactionsContainer'; import ContractOverviewContainer from '../containers/ContractOverviewContainer'; import ContractDebuggerContainer from '../containers/ContractDebuggerContainer'; @@ -18,8 +18,6 @@ class TextEditorAsideContainer extends Component { renderContent(contract, index) { switch (this.props.currentAsideTab) { - case 'browser': - return ; case 'debugger': return ( @@ -34,11 +32,11 @@ class TextEditorAsideContainer extends Component { ); - case 'logger': + case 'transactions': return (

{contract.className} - Transactions

- +
); case 'overview': @@ -54,6 +52,9 @@ class TextEditorAsideContainer extends Component { } render() { + if (this.props.currentAsideTab === 'browser') { + return ; + } return this.props.contracts.map((contract, index) => { return (