Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Minimise transactions progress #4942

Merged
merged 35 commits into from
Mar 28, 2017
Merged

Minimise transactions progress #4942

merged 35 commits into from
Mar 28, 2017

Conversation

ngotchac
Copy link
Contributor

@ngotchac ngotchac commented Mar 17, 2017

Show transactions progress in the UI on the bottom-right corner, so the user can continue working while the transaction is in progress.

Still need to :

  • Clean-up every transaction dialog (CreateWallet, DeployContract, ExecuteContract, WalletSettings, WalletActions)
  • Check Verification dialog
  • Add infos on completion of the transaction (contract address for deploy, wallet info for wallet...)
  • Waiting for Don't remove confirmed requests to early. #4933 to be merged

We might want to add this also for dapps. It would be basically a one line change, but not sure we want to add it though...

@ngotchac ngotchac added A3-inprogress ⏳ Pull request is in progress. No review needed at this stage. M7-ui labels Mar 17, 2017
@ngotchac ngotchac added A0-pleasereview 🤓 Pull request needs code review. and removed A3-inprogress ⏳ Pull request is in progress. No review needed at this stage. labels Mar 20, 2017
.filter((s) => s.waiting)
.map((s) => s.idx);
}
constructor (api, props) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Would prefer being a bit more explicit here instead of just "props". Maybe the right approach would be to have

constructor (api, { accounts, onClose })

(Small difference, but always visible what is expected)

.execute('parity_postTransaction', inOptions(options));
.execute('parity_postTransaction', parsedOptions)
.then((requestId) => {
this._transport.emit('request', {
Copy link
Contributor

Choose a reason for hiding this comment

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

This would make more sense on the logging layer where events are already fired. As it stands it now does the "same" thing in 2 different places.

@@ -203,7 +194,9 @@ export default class WalletSettingsStore {
});
}

constructor (api, wallet) {
constructor (api, props) {
Copy link
Contributor

Choose a reason for hiding this comment

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

constructor (api, { wallet, onClose })

(Just so it is obvious what to expect, as opposed to passing anything in)


const nextState = {
...state,
[ requestId ]: {
Copy link
Contributor

Choose a reason for hiding this comment

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

[requestId]: {...} would make more sense, not an array/spaced, rather a key.


import styles from './scrollableText.css';

export default function ScrollableText (props) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Would prefer ({ small = false, text }) (especially in this case where the signature is on top and the properties only follow much later - linter still catches non-defined use in these cases)


const contractAddress = receipt.contractAddress;

return api.eth.getCode(contractAddress)
Copy link
Contributor

Choose a reason for hiding this comment

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

api.eth
  .getCode(...)
  .then(...)

(Just align with what we have elsewhere)

@jacogr
Copy link
Contributor

jacogr commented Mar 22, 2017

Ok, the overlay of dialogs needs to go, it really is super annoying when I actually try to get work done. (Which is what this improves, i.e. you can do multiples all at once.) Colours much better here, couldn't test the minimize (since I have the transactions overlaying my dialogs and have to keep moving them out of the way), but seems like a step in the right direction.

The txhash still seems way too long where it is displayed. Possibly would make sense to make that (txhash) a click-through to etherscan and have it available somehow in the actual list as well. (Real scenario - just sent ETH and wanted to send the txhash to somebody, couldn't easily find it without going back into my account. Just having it shortened and clickable will allow that)

Having said all that - love it :)

@jacogr jacogr added A5-grumble 🔥 Pull request has minor issues that must be addressed before merging. and removed A0-pleasereview 🤓 Pull request needs code review. labels Mar 22, 2017
@ngotchac
Copy link
Contributor Author

So to test the animation, you can create a transaction without signing it, close the signer, create a new one, and then close the bottom pending transaction popup.

I will update the z-indexes so that modals are always on top.
I will make the tx hashes shorter, but I don't think there's really a need for a link here. If you need to retrieve it, you can always go to the Signer page :)

@CraigglesO The transactions will auto-hide when they are validated (after being included into 6 blocks). This might be wrong for transactions with conditions though... But you can always hide those by clicking on them. The fact that they are persistent across page reloads is wanted, and it is especially useful when you deploy a contract!

@ngotchac ngotchac added A3-inprogress ⏳ Pull request is in progress. No review needed at this stage. and removed A5-grumble 🔥 Pull request has minor issues that must be addressed before merging. labels Mar 22, 2017
@jacogr
Copy link
Contributor

jacogr commented Mar 22, 2017

@ngotchac I'm not 100% sure transactions with conditions show up here. (I could be wrong, but I submitted one this morning and it didn't show - then again, was looking at 20 things in this PR at once, so could be wrong - briefly bugged me, I would just double-check the intent and if you are happy with the way it is handled.)

@ngotchac
Copy link
Contributor Author

@jacogr They are indeed displayed even with conditions. This is IMO the expected behavior so it's fine, but if it doesn't work on your side, there is an issue...

@ngotchac ngotchac added A0-pleasereview 🤓 Pull request needs code review. and removed A3-inprogress ⏳ Pull request is in progress. No review needed at this stage. labels Mar 22, 2017
@jacogr
Copy link
Contributor

jacogr commented Mar 23, 2017

As discussed, getting there, but a couple of things remaining -

  • Use the ShortenedHash for the hash display (the overflow/cutting is not 100% "nice" - and as per your comment above, no real need to click or copy from there, it is available)
  • Would make sense to show a condensed method decoding (i.e. method, recipient, value, no parameters)
  • Adjust the right/bottom margins slightly to be closer to the edges.

and not worth a grumble...

  • Still not convinced on the actual animation in use, still believe height from 100% -> 0% would be better to not have the drop effect. Which is especially jarring when the sizes change, so...
  • The sizes of the little boxes change as transaction states change and/or disappear. Probably a fixed size would make sense here.

@jacogr jacogr added A5-grumble 🔥 Pull request has minor issues that must be addressed before merging. and removed A0-pleasereview 🤓 Pull request needs code review. labels Mar 23, 2017
@ngotchac ngotchac added A3-inprogress ⏳ Pull request is in progress. No review needed at this stage. and removed A5-grumble 🔥 Pull request has minor issues that must be addressed before merging. labels Mar 27, 2017
@ngotchac
Copy link
Contributor Author

ngotchac commented Mar 27, 2017

I took care of every gumbles.

@ngotchac ngotchac added A0-pleasereview 🤓 Pull request needs code review. and removed A3-inprogress ⏳ Pull request is in progress. No review needed at this stage. labels Mar 27, 2017
@jacogr jacogr added A8-looksgood 🦄 Pull request is reviewed well. and removed A0-pleasereview 🤓 Pull request needs code review. labels Mar 28, 2017
@jacogr jacogr merged commit a997210 into master Mar 28, 2017
@ngotchac ngotchac deleted the ng-new-txs branch March 29, 2017 08:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A8-looksgood 🦄 Pull request is reviewed well.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants