-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/15873666 edit #3320
base: master
Are you sure you want to change the base?
Feat/15873666 edit #3320
Conversation
c0099a8
to
c60c833
Compare
This one also needs a rebase @CzarekDryl |
b6eed1c
to
b98a6fc
Compare
@jakubcolony @arrenv Branch rebased and ready to review |
b98a6fc
to
d4f0dcd
Compare
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.
Nice work overall @CzarekDryl, this was not a simple feature to handle 👍
Some notes from my testing:
- Missing translations:
-
Should the Make changes button be disabled if there are no changes? Otherwise it is just sending empty transactions.
-
After making changes, the values only update after a few seconds. I can't see this mentioned in the spec, but we may want to update them manually in cache so that they're visible to the user straightaway.
-
If amount is 0, the row should be hidden, that is how they get deleted on the contracts level:
- When I select an edit action, should it be the slots after the changes that are shown? That's what seems to be the case, but they change order when clicked on (could be also related to the issue below):
- The payment table should be sorted by slot ID, after editing the slots returned from the backend are not necessarily in order (see slot with ID 1 is displayed under slot with ID 2):
- I feel like this could be related to the above, I edited only the claim delay but the UI mentions 6 changes:
"expenditureSlotChanges": {
"oldSlots": [
{
"id": 1,
"recipientAddress": "0xb77D57F4959eAfA0339424b83FcFaf9c15407461",
"claimDelay": "0",
"payouts": [
{
"amount": "1000000000000000000000",
"tokenAddress": "0xeF841fe1611ce41bFCf0265097EFaf50486F5111"
}
]
},
{
"id": 2,
"recipientAddress": "0x9dF24e73f40b2a911Eb254A8825103723E13209C",
"claimDelay": "3600",
"payouts": [
{
"amount": "2000000000000000000000",
"tokenAddress": "0xeF841fe1611ce41bFCf0265097EFaf50486F5111"
}
]
}
],
"newSlots": [
{
"id": 2,
"recipientAddress": "0x9dF24e73f40b2a911Eb254A8825103723E13209C",
"claimDelay": "3600",
"payouts": [
{
"amount": "2000000000000000000000",
"tokenAddress": "0xeF841fe1611ce41bFCf0265097EFaf50486F5111"
}
]
},
{
"id": 1,
"recipientAddress": "0xb77D57F4959eAfA0339424b83FcFaf9c15407461",
"claimDelay": "18000",
"payouts": [
{
"amount": "1000000000000000000000",
"tokenAddress": "0xeF841fe1611ce41bFCf0265097EFaf50486F5111"
}
]
}
]
}
-
After making a change that required another funding step, I'm being asked to fund the entire amount instead of just the difference between payout sum and current expenditure balance for a given token
-
Adding slots seems to work fine ✅
- Editing in different steps shows correctly in the list, nicely done:
const getEditContent = () => { | ||
switch (actionType) { | ||
case ColonyActionType.CreateExpenditure: | ||
return <PaymentBuilderEdit action={action} />; | ||
default: | ||
return <div>Not implemented yet</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.
Could this be handled at the level of PaymentBuilder
component? It would keep the generic CompletedAction free of feature-specific logic
d4f0dcd
to
75ce3d4
Compare
Preferably not disabled, but, we should validate on click if no changes have been made. With a validation message: "No changes have been made yet."
My concern with showing cached values is if there is an issue with the transaction, you are going to get a flashing of the new then back to old values. My thinking here is that it would probably be better to show a skeleton loading state on the whole table. This could be done in a separate issue.
Yes, I agree, the ones with 0 values should be hidden.
Good pickup Jakub, yes, it would be good to have a consistent order. |
Description
This PR adds the ability to edit actions after the locked state during the Funding, Release steps. Editing in Payment step is not possible for now.
Edit Mode:
Change Payment Modal:
Changes Step in Stepper:
If there is funding needed after editing, new pill should show after changes one
Testing
Closed PR with comments - #3075
Design
Resolves #2238