-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Only update affected media list when deleting destination in HTMX frontend #1120
Conversation
Test results 10 files 1 060 suites 38m 7s ⏱️ Results for commit 4e46505. ♻️ This comment has been updated with latest results. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1120 +/- ##
==========================================
- Coverage 79.71% 79.67% -0.05%
==========================================
Files 141 141
Lines 5285 5288 +3
==========================================
Hits 4213 4213
- Misses 1072 1075 +3 ☔ View full report in Codecov by Sentry. |
a4325bf
to
fdfda05
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Self-review: This PR does not update the number in the media header that says how many emaiil/sms destinations exist. So if you have 5, then delete them all, it will still say Email(5)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree on that it does not update the number of destinations of that media. But that could also be a polish issue.
Otherwise it looks good, just lacks a news fragment
e1fba78
to
796cf8c
Compare
Updated this PR quite drastically: Now refreshes the list and not only the row |
71b7284
to
1cccf5e
Compare
This was added so the "This destination cannot be deleted error" could be shown separate from field specific errors, but after the changes done to the delete endpoint this is no longer used. _render_destination_list is complicated enough as-is that removing this makes it a bit nicer
1cccf5e
to
4e46505
Compare
Quality Gate passedIssues Measures |
Fixes #1128
Makes it so only the media list for the destination you try to delete is updated with HTMX. If it is deleted succesfully, it just disappears. If it cannot be deleted, a error message is shown at the top of the list.
There was supposed to already be an error message if a destination could not be deleted, but the location of the error message in the templates did not match up with the template used for HTMX when deleting, so the error message was never actually shown prior to this PR, so this PR is also effectively a bugfix to that.