-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Conversation
@@ -62,6 +62,10 @@ export default class Contracts { | |||
} | |||
|
|||
static create (api) { | |||
if (instance) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We still don't seem to assign the new instance to the instance variable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is done in the Contracts
constructor
|
||
<Route path='contracts'> | ||
<IndexRoute component={ Contracts } /> | ||
<Route path='write' component={ WriteContract } /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While we are renaming and fixing up - the "write contract" is very confusing. Had 2 people asking me now where the find the editor.
"Develop Contract" ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done (renamed the button)
return null; | ||
} | ||
|
||
const ethToken = balance.tokens.find((t) => t.token.tag.toLowerCase() === 'eth'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Naming is different from the
tok.token
in balancesReducer. - No nulls here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will fix
@@ -139,6 +187,8 @@ export default class AddressSelect extends Component { | |||
<IdentityName | |||
className={ styles.name } | |||
address={ address } /> | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason for the extra space?
import { PopoverAnimationVertical } from 'material-ui/Popover'; | ||
|
||
import { isEqual } from 'lodash'; | ||
|
||
// Hack to prevent "Unknown prop `disableFocusRipple` on <hr> tag" error | ||
class Divider extends Component { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Split components into their own files. Started doing that as cleanups where I've found them, the 100's of lines in a file just makes it very difficult to maintain.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. However this is just a Hack because there is a bug in Material UI (using directly <Divider />
spits out Unknown prop
disableFocusRipple on <hr> tag
error logs). This will be deleted when a fix is out
@@ -28,6 +28,7 @@ export default class AddAddress extends Component { | |||
|
|||
static propTypes = { | |||
contacts: PropTypes.object.isRequired, | |||
address: PropTypes.string, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
General comment. When changing these (or adding, removing), it would make sense to start putting them in alphabetical order since you are in there already. (It goes for everywhere - low overhead). This one should have been on-top as an example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So here we separate the isRequired
props to those optional. I think it's better to be able to see which props should absolutely be passed to a Component easily. Within those two categories, I agree they could be sorted from a-z
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, we don't conform to that at all currently. With the Redux issues and not being able to pass required props this whole methodology falls apart. (e.g. see isTest which is absolutely required and just currently needs to be moved to non-required since it just errors all-over)
So there are 3 categories, Required, non-required & Redux. It just becomes an absolute mess and mental overhead to manage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that it should be split into 3 categories. In the meanwhile, I prefer splitting in at least 2.
@@ -37,6 +37,7 @@ export default class DetailsStep extends Component { | |||
onParamsChange: PropTypes.func.isRequired, | |||
onInputsChange: PropTypes.func.isRequired, | |||
|
|||
balances: PropTypes.object, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment here as above (last time, I promise) - rather than trying arbitrary spacings between props, just sort and condense. Easy to find without understanding what the developer had in mind as a category system.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment as above ;)
@@ -97,6 +99,7 @@ export default class DetailsStep extends Component { | |||
value={ fromAddress } | |||
error={ fromAddressError } | |||
accounts={ accounts } | |||
balances={ balances } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same sorting goes for passed props where touched.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed
onValueChange: PropTypes.func.isRequired, | ||
values: PropTypes.array.isRequired, | ||
valuesError: PropTypes.array.isRequired, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra blank line for sorting, remove.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above
@@ -26,7 +26,7 @@ import VerifyIcon from 'material-ui/svg-icons/action/verified-user'; | |||
import { EditMeta, DeleteAccount, Shapeshift, SMSVerification, Transfer, PasswordManager } from '~/modals'; | |||
import { Actionbar, Button, Page } from '~/ui'; | |||
|
|||
import shapeshiftBtn from '../../../assets/images/shapeshift-btn.png'; | |||
import shapeshiftBtn from '~/../assets/images/shapeshift-btn.png'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great that it works.
|
||
if (hasContacts && Object.keys(balances).length === 0) { | ||
return ( | ||
<Loading size={ 3 } /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worried about the loading sizes everywhere - should pick one size and just stick with it throughout. (Only exceptions may be whole pages where everything is blank)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, I think size of loader should depend on where it is used. If it's displayed while loading the full app, it should be bigger than when loading MethodDecoding for example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. However in the UI itself it should be 100% consistent. So for the dapp example (not that it is used, agreed) - for the rest, all the same. This doesn't conform to the 2 used elsewhere since the introduction.
Merge in master for gitlab build checks. |
This PR includes these fixes:
Link
component for App Tabs: this enables the user to Ctrl+Click on a tab to open the page in a new tab (which wasn't the case previously). The tab active state is also handled by React Router, so no more map of URL path to Tab ; all is in the Router definition/addresses/:address
instead of/address/:address
. This enables React Router to properly manage the tabs active state. The old routes are still working, only a warning log is printed in the consoleContracts
instances, which was created by SMS Verification store (thus, contract lookups were occurring at each loading of an account page)/addresses/:unknownAddress
shows informations about the:unknownAddress
instead of a blank page. The user can then add it to his address bookonClose
prop of the Autocomplete instead of aonBlur
hack => better closing of autocompleteto
address