lablup / lablup/backend.ai-webui
Add per-field reset-to-current-revision icon in DeploymentAddRevisionModal
- Dominant language
- TypeScript
- Stars
- 133
- Forks
- 81
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 355
Description
## Summary
Add a per-form-item reset affordance to `DeploymentAddRevisionModal` (`react/src/components/DeploymentAddRevisionModal.tsx`) so users can revert an individual field they changed, without resetting the whole form.
## Motivation
When editing a new deployment revision from an existing one ("Load current revision"), users sometimes want to undo an accidental edit on a single field without losing other changes they made in the same form. A full-form reset is too coarse for this.
## Behavior
- A small reset icon appears **only next to fields whose value has diverged from the current revision's value** (dirty-field-only, not shown on every field — keeps the form readable).
- Clicking the icon reverts **only that field** to the current revision's value.
- Full-form reset is explicitly **out of scope** for this issue.
## Notes
- Applies to `PresetFormValues` fields such as resource allocation, image/preset selection, etc. — scope the exact field list during implementation.
- Consider whether this needs to account for both Preset and Custom modes in the modal.
JIRA Issue: FR-3468
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with react/src/components/DeploymentAddRevisionModal.tsx and trace how "Load current revision" stores current values and how PresetFormValues are edited. Identify the applicable fields in both Preset and Custom modes, then verify that each reset icon appears only for a changed field and restores only that field without affecting other edits.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100