Remove the leftover draft mode from VmDetail, Hardware and Sidebar

Open Beginner friendly
#82 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Active
Tech stack
electron, react, typescript
Domain
desktop, frontend

Research direction

Read the App.tsx call site and the draft-related code in VmDetail.tsx, Hardware.tsx, and Sidebar.tsx. Remove the listed draft props and UI states, then check those components and their callers for remaining references. Done means the obsolete draft flow is gone with no behavior change.

Written by the indexing model from the issue text.

Description

ui

Since the new VM wizard (#73), a new VM is never shown as an unsaved draft anymore. App.tsx always passes isDraft={false}, draftName={null} and a no-op onCancelDraft.

The code for it is still in:

  • VmDetail.tsx: isDraft, onCancelDraft, the "Not created yet" state, tabs disabled for drafts
  • Hardware.tsx: the Cancel/Create button labels and the draft disk size hint
  • Sidebar.tsx: the draftName row

It can all go, along with the props. No behavior change.

Dominant language
TypeScript
Stars
3
Forks
0
Avg merge
2m
Merged PRs (30d)
59

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from A21-devs/Virtual-Machine-Manager

All issues in A21-devs/Virtual-Machine-Manager

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.