Skip to content
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: add edit to payment builder action #3075

Closed
wants to merge 4 commits into from

Conversation

CzarekDryl
Copy link
Contributor

@CzarekDryl CzarekDryl commented Sep 11, 2024

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:

    • Displays yellow border and Edit Pill.
    • Disables stepper buttons and hides Kebab menu.
    • Makes Recipients, Amounts, and Claim Delays editable.
    • Change payment button opens modal, disabled until changes are made.
  • Change Payment Modal:

    • Dropdown for execution options (Reputation and Permissions).
  • Changes Step in Stepper:

    • Changes pill appears after edits in Funding, Release step.
    • Shows details on edits, permissions, and a change counter.
  • If there is funding needed after editing, new pill should show after changes one

Testing

  • Install Lazy Consensus extension to test funding with motion
  • Create advanced payment action and lock it
  • Play around with funding and editing

Design

Resolves #2238

@CzarekDryl CzarekDryl self-assigned this Sep 11, 2024
feat: handle add recipient

feat: add multiple funding steps

fix: changes type
@CzarekDryl CzarekDryl marked this pull request as ready for review September 23, 2024 13:57
@CzarekDryl CzarekDryl requested review from a team as code owners September 23, 2024 13:57
Copy link
Member

@arrenv arrenv left a comment

Choose a reason for hiding this comment

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

@CzarekDryl Nice one, a lot of work here, thank you for tackling it. I spent some time testing and came across a few things:

  1. Change payment modal is showing two rows of buttons as well as a red button. There should only be the Confirm changes button and it should not be red.
    image

  2. Clicking on the "Confirm changes" button did not do anything other than close the modal.

  3. Making a change in the Review stage showed the changes step after it, which I was not able to click on. While in the Review stage, the changes pill should appear before review and be clickable so that you can see who made changes, when and how (i.e. as the Payment creator), and be able to handle multiple.
    image

  4. There are some formatting issues with the edit mode, the recipients change to being unverified and the inputs change width, also, is there anyway to make the yellow border coming in not impact the content width?

    Read only

    image

    Edit mode

    image

  5. Confirm details button should be disabled while in edit mode, and while the edit transaction is happening in order to prevent a clash.
    image

  6. It seems the changes count and change history is not working fully it seems to only count the amount changes, in the following screenshot I had edited the following, a total of 5 changes but it only shows 2 changes, changes included:

    • 1st Row: Amount was changed from 2 to 1, claim delay was changed from 1 to 0.
    • 2nd Row: Recipient was changed from amy to leela, amount was changed from 3 to 1, claim delay was changed from 2 to 0.

    image

  7. Trying to fund the payment crashed the app with the following error and I could not continue testing any further.
    image

@CzarekDryl
Copy link
Contributor Author

@arrenv

  1. Fixed
  2. Fixed
  3. and 5. in this issue I'm taking care of editing after the locked state
  4. Which browser are you testing this on? On my end, the gaps aren't that large — it works like when creating actions
image
  1. It's working fine for me
image 7. Fixed image

@CzarekDryl CzarekDryl requested a review from arrenv October 8, 2024 10:40
@jakubcolony jakubcolony deleted the branch feat/advanced-payments-ui-next October 8, 2024 17:43
@jakubcolony jakubcolony closed this Oct 8, 2024
@CzarekDryl CzarekDryl deleted the feat/15873666-edit branch October 14, 2024 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants