Skip to content

feat: add draft proposal state and workflow#4

Open
jaydenkalu wants to merge 1 commit into
mainfrom
feat/issue-375-draft-proposals
Open

feat: add draft proposal state and workflow#4
jaydenkalu wants to merge 1 commit into
mainfrom
feat/issue-375-draft-proposals

Conversation

@jaydenkalu

Copy link
Copy Markdown
Owner

Closes PrincessnJoy#375

Changes

  • Updated frontend/src/types.ts — added 'Draft' to ProposalState union and added DraftProposal interface
  • Added frontend/src/drafts.ts — localStorage-based CRUD for draft proposals (saveDraft, getDrafts, getDraft, deleteDraft)
  • Added frontend/src/components/DraftProposalList.tsx — UI component listing saved drafts with Edit, Delete, and Publish actions
  • Updated frontend/src/components/NewProposalForm.tsx — added initialDraft prop for pre-population and a Save as Draft button

Design Notes

Drafts are stored client-side in localStorage (off-chain). The on-chain Soroban contract is unchanged. A draft must be explicitly published (submitted on-chain via create_proposal) to become an Active proposal — enforcing the requirement that voting cannot start until the proposal is finalized.

Acceptance Criteria

  • Draft proposal state added (ProposalState includes 'Draft')
  • Drafts can be edited before publishing; votes only start after on-chain submission
  • UI for saving and publishing drafts (DraftProposalList + Save as Draft button)

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.

Add proposal amendment and draft proposal workflow

1 participant