bcgov / bcgov/bcparks-ar-admin
A&R - Discard modal displayed even when no change made
- Dominant language
- TypeScript
- Stars
- 5
- Forks
- 15
- PR merge metrics
- No merged PRs in 30d
Description
## Description
### How to replicate:
* Navigate to any form in edit mode
* Don’t change any field and click on `Cancel` at the bottom of the page
### Expected Behavior:
Because we haven’t made any change, we should just be redirected to the previous screen
### Issue:
Even though we haven’t made any change in the form, the “Discard” modal is displayed, which is contradicting the content of the modal since it says “You have unsaved changes” and that’s not true in this use case
[See recording](https://api.media.atlassian.com/file/0732345e-7cd3-462a-9117-6ea1c563b55a/artifact/video_1280.mp4/binary?client=388df08e-596c-468b-8d69-8aea68058aa1&collection=&max-age=2592000&token=eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiIzODhkZjA4ZS01OTZjLTQ2OGItOGQ2OS04YWVhNjgwNThhYTEiLCJhY2Nlc3MiOnsidXJuOmZpbGVzdG9yZTpmaWxlOjA3MzIzNDVlLTdjZDMtNDYyYS05MTE3LTZlYTFjNTYzYjU1YSI6WyJyZWFkIl19LCJleHAiOjE2OTgyNzMwNTIsIm5iZiI6MTY5ODI3MjE1Mn0.tEWFOgl_i9Wv06dk6Pmod183ff1lEOQTD27RfqETk_A)
**Another scenario**: Try to navigate away from the page using other controls (e.g., breadcrumb, left hand nav). Warning should be shown if I make changes and try to navigate away, no matter how I do it.
### Environment
**TEST** : [A&R Admin](https://d3ahrzu0mpndj3.cloudfront.net/enter-data)
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the issue in the A&R Admin edit-mode form described in the report, checking Cancel, breadcrumbs, and left-hand navigation with and without edits. Trace the form’s unsaved-change and discard-modal handling; done means unchanged forms navigate away without a warning, while changed forms show the warning through each navigation path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100