-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Conversation
Conflicts: Cargo.lock hash-fetch/Cargo.toml hash-fetch/src/client.rs rpc/Cargo.toml rpc/src/lib.rs rpc/src/v1/impls/parity_set.rs util/fetch/Cargo.toml util/https-fetch/Cargo.toml
Conflicts: dapps/src/apps/fetcher/installers.rs dapps/src/apps/fetcher/mod.rs dapps/src/apps/mod.rs dapps/src/handlers/fetch.rs dapps/src/lib.rs dapps/src/web.rs js/src/views/Web/index.js parity/dapps.rs parity/run.rs util/fetch/src/client.rs util/fetch/src/lib.rs util/reactor/src/lib.rs
Changes Unknown when pulling afe25d7 on web-dapps3 into ** on master**. |
height: 100%; | ||
width: 100%; | ||
} | ||
.loading { |
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.
Would prefer a space between the blocks, doesn't cost anything but aids in readability. (Same for at the end of this block). -
.wrapper {
...
}
.loading {
...
}
.url {
...
}
display: flex; | ||
} | ||
|
||
.url > input { |
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.
PostCSS nesting enabled, so would generally prefer -
.url {
...
& > input {
...
}
}
|
||
handleUpdateUrl = (url) => { | ||
try { | ||
window.localStorage.setItem('parity-web-lastAddress', url); |
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.
Could use store
and not need the catch block. In addition, would make the key a constant of the form
const LS_LAST_ADDRESS = '_parity::webLastAddress';
While we are still wildly inconsistent in naming of localStorage keys, @ngotchac started the _parity::
movement so it would make sense for new keys to conform.
lastAddress () { | ||
let res = null; | ||
try { | ||
res = window.localStorage.getItem('parity-web-lastAddress'); |
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.
As per above, would prefer the key a constant and using store
(just a bit less boilerplate)
if (!token) { | ||
return ( | ||
<div | ||
className={ styles.wrapper } |
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.
Since we have a single attribute, could keep it on the preceding line.
|
||
return ( | ||
<div | ||
className={ styles.wrapper } |
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.
Single attribute.
} | ||
} | ||
|
||
class AddressBar 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.
Would prefer the component at least in a separate file, just aids things not growing uncontrollably in a single source.
} | ||
|
||
class AddressBar 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.
Unneeded blank line padding the class here. (Previous component didn't, which is preferred, although not always enforced.)
|
||
static propTypes = { | ||
isLoading: PropTypes.bool.isRequired, | ||
url: PropTypes.string.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.
Alphabetical order so nobody needs to wonder is preferred here with properties, state, passing props, imports, etc. (Just making some sense of the chaos)
currentUrl: this.props.url | ||
}; | ||
|
||
onUpdateUrl = (ev) => { |
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.
Could we move the event methods to beneath render? Lifecycle, render, events.
}; | ||
|
||
onKey = (ev) => { | ||
const KEY_ESC = 27; |
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.
Should rather define these at global file-level
type='text' | ||
value={ currentUrl } | ||
/> | ||
<button |
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.
Would probably have used ui/Button
here, but good as-is, we can tweak slightly as per your comments.
</div> | ||
); | ||
} | ||
|
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.
As per previous comment, unneeded blank line padding the class here.
Changes Unknown when pulling fd62442 on web-dapps3 into ** on master**. |
Changes Unknown when pulling 9a58a77 on web-dapps3 into ** on master**. |
Changes Unknown when pulling f54c502 on web-dapps3 into ** on master**. |
Changes Unknown when pulling e00690d on web-dapps3 into ** on master**. |
What's left
Testing:
npm start
and thenhttp://127.0.0.1:3000/#/web