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

Created skeleton transaction web view #1507

Merged
merged 1 commit into from
Oct 14, 2019

Conversation

erin-hughes
Copy link
Contributor

Closes #1475 and contributes to #1155

Signed-off-by: Erin Hughes Erin.Hughes@ibm.com

@@ -0,0 +1,28 @@
import React, { Component } from 'react';
Copy link
Contributor

Choose a reason for hiding this comment

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

As @cazfletch mentioned, we should probably make Page and Sidebar less generic as they're unlikely to be imported/used by other components.

expect(component).toMatchSnapshot();
});

afterEach(async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we move afterEach below beforeEach but before it as we do it similarly in our extension tests.

import sinonChai from 'sinon-chai';
chai.should();
chai.use(sinonChai);
const should: Chai.Should = chai.should();
Copy link
Contributor

Choose a reason for hiding this comment

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

You can remove this line as we do chai.should() above.

src/App.tsx Outdated
@@ -34,8 +33,7 @@ class App extends React.Component<any> {
<Router>
<div>
<Route render={() => <Redirect push to={this.state.redirectPath}/>}></Route>
<Route path='/one' component={OneComponent}></Route>
<Route path='/two' component={TwoComponent}></Route>
<Route path='/one' render={() => <Page activeSmartContract="penguinContract@0.0.1"/>}></Route>
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably worth changing the path /one to /transaction or something.
If OneComponent isn't being used anymore we can probably delete it.

Copy link
Contributor

Choose a reason for hiding this comment

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

Same with TwoComponent!

@import 'node_modules/carbon-components/scss/components/accordion/_accordion';
@import 'node_modules/carbon-components/scss/components/link/link';

body {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this styling something we should be doing at the App level instead?

.page-contents {
display: flex;
flex-direction: column;
margin-left: 325px;
Copy link
Contributor

Choose a reason for hiding this comment

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

For all page layout, we should probably try to use the carbon grid

<div className="contents-right" id="contents-right">
<h5>Getting Started</h5>
<Accordion>
<AccordionItem title="Create a new transaction"></AccordionItem>
Copy link
Contributor

Choose a reason for hiding this comment

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

When changing the theme from dark to light, this text doesn't seem to change colour.

@erin-hughes erin-hughes changed the title Created skeleton transaction web view [DO NOT MERGE] Created skeleton transaction web view Oct 10, 2019
@erin-hughes erin-hughes force-pushed the txn-view-1475 branch 6 times, most recently from f45dd4c to dbe8a51 Compare October 10, 2019 10:17
@erin-hughes erin-hughes changed the title [DO NOT MERGE] Created skeleton transaction web view Created skeleton transaction web view Oct 10, 2019
@erin-hughes
Copy link
Contributor Author

Yesterday Caroline asked me to get the build to publish the results of the jest tests like we do for the unit tests. I think I have the test report publishing, but am not sure how to tackle publishing the coverage report. Will have another go on Monday 👍

@erin-hughes erin-hughes changed the title Created skeleton transaction web view [DO NOT MERGE] Created skeleton transaction web view Oct 10, 2019
package.json Outdated
@@ -734,6 +734,14 @@
"command": "gatewaysExplorer.testSmartContractEntry",
"when": "view == gatewaysExplorer && viewItem == blockchain-instantiated-multi-contract-item || viewItem == blockchain-instantiated-contract-item || viewItem == blockchain-contract-item || viewItem == blockchain-instantiated-unknown-item"
},
{
"command": "reactPage.open",
Copy link
Contributor

Choose a reason for hiding this comment

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

Might be worth change reactPage.open to transactionPage.open or something similar.


if (this.state.panelType === 'buttons') {
panelTSX = (
<div className="panel-container" id="panel-container">
Copy link
Contributor

Choose a reason for hiding this comment

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

Spotted it in a few places - I don't think you want an id & a class. I think you could probably remove these ids.

<div className="inner-container bx--row">
<Sidebar/>
<div className="page-contents bx--col" id="page-contents">
<div className="titles-container" id="titles-container">
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure you need these ids as well!

@erin-hughes erin-hughes force-pushed the txn-view-1475 branch 2 times, most recently from 437dcd1 to 8eed3ac Compare October 14, 2019 10:54
Can be accessed by right-clicking on a smart contract in the gateways view

Signed-off-by: Erin Hughes <Erin.Hughes@ibm.com>
@erin-hughes erin-hughes changed the title [DO NOT MERGE] Created skeleton transaction web view Created skeleton transaction web view Oct 14, 2019
@erin-hughes erin-hughes merged commit 376e10c into IBM-Blockchain:master Oct 14, 2019
@erin-hughes erin-hughes deleted the txn-view-1475 branch October 28, 2019 12:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

As a user I can access the Transactions web view
2 participants