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

[Refactoring] Split Creation / Edit flow into its own pages #1204

Open
3 tasks
GrandSchtroumpf opened this issue May 7, 2024 · 0 comments · May be fixed by #1243
Open
3 tasks

[Refactoring] Split Creation / Edit flow into its own pages #1204

GrandSchtroumpf opened this issue May 7, 2024 · 0 comments · May be fixed by #1243

Comments

@GrandSchtroumpf
Copy link
Collaborator

GrandSchtroumpf commented May 7, 2024

Currently the edit & creation flow are only 2 pages. It makes it very difficult to create custom design & logic for each form.

Goals

  • Simplify behavior specific to each strategy
  • Reduce technical debt
  • Avoid side effect when adding a new feature
  • Keep state on reload
  • Share prefilled strategy

Tasks

  • Token selection should be its own page

  • Split create / deposit / withdraw & edit price into 4 pages per type of strategy :

  • create/overlapping

  • edit/deposit/overlapping

  • edit/withdraw/overlapping

  • edit/price/overlapping
    -> Same for recurring and disposable

  • Use the search params URL to keep state of the fields

For overlapping :

  • marketPrice
  • min
  • max
  • spread
  • budget
  • anchor

For recurring :

  • buy.min
  • buy.max
  • buy.budget
  • sell.min
  • sell.max
  • sell.budget
    -> We can derive limit/range from min/max

For disposable: same are recurring with

  • direction

Extract logic from useCreateStrategy:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant