-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Conversation
Yes, layout looks fine although validation is still not working (Firefox 50.1.0).
It will always indicate that TLA should be 3 characters long, bluring input doesn't help. |
@@ -105,22 +105,22 @@ export default class InputText extends Component { | |||
const { validationType, contract } = this.props; | |||
const validation = validate(value, validationType, contract); | |||
|
|||
if (validation instanceof Promise) { |
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.
👍
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.
Yep, this wasn't working in Firefox...
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.
and we shouldn't do it anyway. there's Promise.resolve
and npm i is-promise
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.
why doesn't it work in firefox? it's valid JS isn't it?
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.
It doesn't work reliably with the es6-promise
shim, which I'm guessing is included in FF. (Bluebird
has the same issue.)
Chrome doesn't show it since it has native Promises.
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.
@gavofyork In JS, it is considered bad practice to assert instanceof
in these cases. We only care about getting a thenable interface, which Promise.resolve
should happily accept. See then/is-promise#6
Issue for the TLA validation - https://github.com/ethcore/parity/issues/4334 |
disabled: false, | ||
loading: false | ||
}); | ||
return Promise.resolve(validation) |
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.
+1
this.setState({ disabled: true, loading: true }); | ||
}, 50); |
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.
Doing this always feels very hacky, i.e. you are working around something you shouldn't be doing :) Only a mustn't-grumble.
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.
Hmmm... It's more that it's not necessary to change the state twice if the request resolves in less than 50ms, no ?
* New chains (#4720) * Add Kovan chain. * Fix up --testnet. * Fix tests. * Fix test. * fix test * Fix test. * Fix to UglifyJS 2.8.2 to fix app build issues (#4723) * Update classic bootnodes, ref #4717 (#4735) * allow failure docker beta * adjust pruning history default to 64 (#4709) * backporting from master [ci-skip]update docker-build.sh * update gitlab.ci fix docker hub build [ci skip] * update gitlab docker beta-release->latest * Add registry. * Add info on forks. * Fixed spec file * Support both V1 & V2 DataChanged events in registry (#4734) * Add info on forks. * Add new registry ABI * Import registry2 & fix exports * Select ABI based on code hash * Render new event types (owner not available) * New registry. * Rename old chain. * Fix test. * Another fix. * Finish rename. * Fixed fonts URLs (#4579) * Fix Token Reg Dapp issues in Firefox (#4489) * Fix overflow issues in Firefox (#4348) * Fix wrong Promise inferance * Add new Componennt for Token Images (#4496) * Revert "Add new Componennt for Token Images (#4496)" This reverts commit 6ffbdab. * Add StackEventListener (#4745) * Update testnet detection (#4746) * Fix Account Selection in Signer (#4744) * Can pass FormattedMessage to Input (eg. Status // RPC Enabled) * Simple fixed-width fix for Accoutn Selection in Parity Signer
Fixes #4348
@tomusdrw I couldn't reproduce the modal layout issue, but fixed one. Let me know if it still breaks on your side.