Commit 6ff16f7
Simplify Proposal Creation and Sending Process (#163)
* Separate proposal creation into two distinct steps
Previously, Step 5 combined both go_prepare and go_submit operations in a
single step, which was confusing to users. This change separates them into:
- Step 5: Prepare proposal (go_prepare command + payment txId entry)
- Step 6: Submit proposal (go_submit command + proposal hash entry)
Changes:
- Split Step 5 into two separate wizard steps
- Removed unused collapse state management
- Updated navigation logic to properly advance between steps
- Modified useProposalSubmission hook to use callback for step advancement
- Updated recovery flow to handle saved proposals correctly
This makes the proposal creation process clearer and easier to understand.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Refactor proposal creation into separate components
Created two new components to reduce bloat in ProposalForm.jsx:
- PrepareProposal.jsx: Handles Step 5 (go_prepare command and payment txId)
- SubmitProposal.jsx: Handles Step 6 (go_submit command and proposal hash)
Changes:
- Extracted Step 5 logic into PrepareProposal component
- Extracted Step 6 logic into SubmitProposal component
- Moved validation schemas to individual components
- Removed unused imports from ProposalForm.jsx
- Reduced ProposalForm.jsx from ~490 lines to ~390 lines
- Improved code maintainability and reusability
Benefits:
- Cleaner, more modular code structure
- Each component now has a single responsibility
- Easier to test and maintain individual steps
- Better separation of concerns
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Fix lint issues in proposal components
- Fix yup validation to handle null/undefined values
- Use consistent quote style (single quotes) for imports
- Fix useCallback dependency issue in ProposalForm
- Add semicolons for consistency
Changes:
- PrepareProposal.jsx: Update quotes and add null check in yup validator
- SubmitProposal.jsx: Update quotes and add null check in yup validator
- ProposalForm.jsx: Fix useCallback to use functional setState
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent e09aec3 commit 6ff16f7
4 files changed
Lines changed: 246 additions & 169 deletions
File tree
- src/components/proposal
- hooks
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
| 1 | + | |
3 | 2 | | |
4 | | - | |
5 | 3 | | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | 4 | | |
11 | 5 | | |
12 | 6 | | |
| |||
16 | 10 | | |
17 | 11 | | |
18 | 12 | | |
| 13 | + | |
| 14 | + | |
19 | 15 | | |
20 | 16 | | |
21 | 17 | | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | 18 | | |
35 | 19 | | |
36 | 20 | | |
| |||
46 | 30 | | |
47 | 31 | | |
48 | 32 | | |
49 | | - | |
50 | | - | |
51 | 33 | | |
52 | 34 | | |
53 | 35 | | |
| |||
61 | 43 | | |
62 | 44 | | |
63 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
64 | 50 | | |
65 | 51 | | |
66 | 52 | | |
67 | 53 | | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
| 54 | + | |
79 | 55 | | |
80 | 56 | | |
81 | 57 | | |
| |||
179 | 155 | | |
180 | 156 | | |
181 | 157 | | |
182 | | - | |
183 | 158 | | |
184 | | - | |
185 | | - | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
186 | 167 | | |
187 | 168 | | |
188 | 169 | | |
| |||
200 | 181 | | |
201 | 182 | | |
202 | 183 | | |
203 | | - | |
204 | | - | |
205 | 184 | | |
206 | 185 | | |
207 | 186 | | |
| |||
216 | 195 | | |
217 | 196 | | |
218 | 197 | | |
219 | | - | |
| 198 | + | |
220 | 199 | | |
221 | 200 | | |
222 | 201 | | |
223 | 202 | | |
224 | 203 | | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | 204 | | |
239 | 205 | | |
240 | 206 | | |
| |||
371 | 337 | | |
372 | 338 | | |
373 | 339 | | |
374 | | - | |
| 340 | + | |
375 | 341 | | |
376 | 342 | | |
377 | | - | |
378 | | - | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | | - | |
397 | | - | |
398 | | - | |
399 | | - | |
400 | | - | |
401 | | - | |
402 | | - | |
403 | | - | |
404 | | - | |
405 | | - | |
406 | | - | |
407 | | - | |
408 | | - | |
409 | | - | |
410 | | - | |
411 | | - | |
412 | | - | |
413 | | - | |
414 | | - | |
415 | | - | |
416 | | - | |
417 | | - | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | | - | |
422 | | - | |
423 | | - | |
424 | | - | |
425 | | - | |
426 | | - | |
427 | | - | |
428 | | - | |
429 | | - | |
430 | | - | |
431 | | - | |
432 | | - | |
433 | | - | |
434 | | - | |
435 | | - | |
436 | | - | |
437 | | - | |
438 | | - | |
439 | | - | |
440 | | - | |
441 | | - | |
442 | | - | |
443 | | - | |
444 | | - | |
445 | | - | |
446 | | - | |
447 | | - | |
448 | | - | |
449 | | - | |
450 | | - | |
451 | | - | |
452 | | - | |
453 | | - | |
454 | | - | |
455 | | - | |
456 | | - | |
457 | | - | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
466 | | - | |
467 | | - | |
468 | | - | |
469 | | - | |
470 | | - | |
471 | | - | |
472 | | - | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
473 | 349 | | |
474 | | - | |
475 | | - | |
476 | | - | |
477 | | - | |
478 | | - | |
479 | | - | |
480 | | - | |
481 | | - | |
482 | | - | |
483 | | - | |
484 | | - | |
485 | | - | |
486 | | - | |
487 | | - | |
488 | | - | |
489 | | - | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
490 | 359 | | |
491 | 360 | | |
492 | 361 | | |
| |||
0 commit comments